Mercurial > dovecot > original-hg > dovecot-1.2
comparison src/imap/client.h @ 8731:3949c6d2e4c8 HEAD
imap: Added module contexts to struct client_command_context.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 06 Feb 2009 13:49:07 -0500 |
parents | 9b5d68776d03 |
children | 9a0aa39a3a14 |
comparison
equal
deleted
inserted
replaced
8730:9b5d68776d03 | 8731:3949c6d2e4c8 |
---|---|
41 CLIENT_COMMAND_STATE_WAIT_SYNC, | 41 CLIENT_COMMAND_STATE_WAIT_SYNC, |
42 /* Command is finished */ | 42 /* Command is finished */ |
43 CLIENT_COMMAND_STATE_DONE | 43 CLIENT_COMMAND_STATE_DONE |
44 }; | 44 }; |
45 | 45 |
46 struct imap_module_register { | |
47 unsigned int id; | |
48 }; | |
49 | |
50 union imap_module_context { | |
51 struct imap_module_register *reg; | |
52 }; | |
53 extern struct imap_module_register imap_module_register; | |
54 | |
46 struct client_command_context { | 55 struct client_command_context { |
47 struct client_command_context *prev, *next; | 56 struct client_command_context *prev, *next; |
48 struct client *client; | 57 struct client *client; |
49 | 58 |
50 pool_t pool; | 59 pool_t pool; |
58 const char *args; | 67 const char *args; |
59 enum command_flags cmd_flags; | 68 enum command_flags cmd_flags; |
60 | 69 |
61 command_func_t *func; | 70 command_func_t *func; |
62 void *context; | 71 void *context; |
72 | |
73 /* Module-specific contexts. */ | |
74 ARRAY_DEFINE(module_contexts, union imap_module_context *); | |
63 | 75 |
64 struct imap_parser *parser; | 76 struct imap_parser *parser; |
65 enum client_command_state state; | 77 enum client_command_state state; |
66 | 78 |
67 struct client_sync_context *sync; | 79 struct client_sync_context *sync; |