#include <unistd.h>
extern struct mail_storage_callbacks mail_storage_callbacks;
+struct imap_module_register imap_module_register = { 0 };
static struct client *my_client; /* we don't need more than one currently */
cmd = p_new(client->command_pool, struct client_command_context, 1);
cmd->client = client;
cmd->pool = client->command_pool;
+ p_array_init(&cmd->module_contexts, cmd->pool, 5);
if (client->free_parser != NULL) {
cmd->parser = client->free_parser;
CLIENT_COMMAND_STATE_DONE
};
+struct imap_module_register {
+ unsigned int id;
+};
+
+union imap_module_context {
+ struct imap_module_register *reg;
+};
+extern struct imap_module_register imap_module_register;
+
struct client_command_context {
struct client_command_context *prev, *next;
struct client *client;
command_func_t *func;
void *context;
+ /* Module-specific contexts. */
+ ARRAY_DEFINE(module_contexts, union imap_module_context *);
+
struct imap_parser *parser;
enum client_command_state state;