diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-05-07 03:37:58 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-05-07 03:37:58 +0200 |
commit | 86c69dcc64df4e1b0c94b8e3ed4b2ce99d0cc7e4 (patch) | |
tree | 6b48a05068a4f0288451fde3b05513afbb80a916 /src/mds-server.h | |
parent | m doc (diff) | |
download | mds-86c69dcc64df4e1b0c94b8e3ed4b2ce99d0cc7e4.tar.gz mds-86c69dcc64df4e1b0c94b8e3ed4b2ce99d0cc7e4.tar.bz2 mds-86c69dcc64df4e1b0c94b8e3ed4b2ce99d0cc7e4.tar.xz |
I should really write better commit messages
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-server.h')
-rw-r--r-- | src/mds-server.h | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/src/mds-server.h b/src/mds-server.h index b751125..c8a4ac2 100644 --- a/src/mds-server.h +++ b/src/mds-server.h @@ -26,6 +26,36 @@ #include <stdint.h> + +/** + * A condition for a message being intercepted by a client + */ +typedef struct interception_condition +{ + /** + * The header of messages to intercept, optionally with a value, + * empty (most not be NULL) for all messages. + */ + char* condition; + + /** + * The hash of the header of messages to intercept + */ + size_t header_hash; + + /** + * The interception priority + */ + int64_t priority; + + /** + * Whether the messages may get modified by the client + */ + int modifying; + +} interception_condition_t; + + /** * Client information structure */ @@ -62,10 +92,22 @@ typedef struct client uint64_t id; /** - * Mutex for sending data + * Mutex for sending data and other + * actions that only affacts this client */ pthread_mutex_t mutex; + /** + * The messages interception conditions conditions + * for the client + */ + interception_condition_t* interception_conditions; + + /** + * The number of interception conditions + */ + size_t interception_conditions_count; + } client_t; |