imap-login-commands.c revision 2454dfa32c93c20a8522c6ed42fe057baaac9f9a
6ae232055d4d8a97267517c5e50074c2c819941and/* Copyright (c) 2016-2017 Dovecot authors, see the included COPYING file */
6ae232055d4d8a97267517c5e50074c2c819941andstatic ARRAY(struct imap_login_command *) imap_login_commands;
6ae232055d4d8a97267517c5e50074c2c819941andstruct imap_login_command *imap_login_command_lookup(const char *name)
6ae232055d4d8a97267517c5e50074c2c819941andvoid imap_login_commands_register(const struct imap_login_command *commands,
6ae232055d4d8a97267517c5e50074c2c819941and unsigned int count)
4b3a8afbfcea8b265d179a122bf40dfedd1ce280takashi unsigned int i;
6ae232055d4d8a97267517c5e50074c2c819941and for (i = 0; i < count; i++) {
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi cmd = p_new(imap_login_commands_pool, struct imap_login_command, 1);
1d980e5489836e977ba59b419e27b0ec875c4bd3takashi cmd->name = p_strdup(imap_login_commands_pool, commands[i].name);
6ae232055d4d8a97267517c5e50074c2c819941andstatic void
6ae232055d4d8a97267517c5e50074c2c819941andimap_login_command_unregister(const struct imap_login_command *unreg_cmd)
6ae232055d4d8a97267517c5e50074c2c819941and i_panic("imap_login_command_unregister: Command '%s' not found", unreg_cmd->name);
6ae232055d4d8a97267517c5e50074c2c819941andvoid imap_login_commands_unregister(const struct imap_login_command *commands,
6ae232055d4d8a97267517c5e50074c2c819941and unsigned int count)
6ae232055d4d8a97267517c5e50074c2c819941and unsigned int i;
6ae232055d4d8a97267517c5e50074c2c819941and for (i = 0; i < count; i++)