Mercurial > dovecot > core-2.2
diff src/imap-login/imap-login-commands.h @ 19568:828dd58e03a4
imap-login: Added API for registering/unregistering commands (for plugins).
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Fri, 15 Jan 2016 16:46:34 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/imap-login/imap-login-commands.h Fri Jan 15 16:46:34 2016 +0200 @@ -0,0 +1,25 @@ +#ifndef IMAP_LOGIN_COMMANDS_H +#define IMAP_LOGIN_COMMANDS_H + +struct imap_arg; +struct imap_client; + +typedef int imap_login_command_t(struct imap_client *client, + const struct imap_arg *args); + +struct imap_login_command { + const char *name; + imap_login_command_t *func; +}; + +struct imap_login_command *imap_login_command_lookup(const char *name); + +void imap_login_commands_register(const struct imap_login_command *commands, + unsigned int count); +void imap_login_commands_unregister(const struct imap_login_command *commands, + unsigned int count); + +void imap_login_commands_init(void); +void imap_login_commands_deinit(void); + +#endif