1
/* Copyright (c) 2002-2010 Dovecot Sieve authors, see the included COPYING file
7
struct client_command_context;
9
#include "managesieve-parser.h"
11
typedef bool command_func_t(struct client_command_context *cmd);
18
/* Register command. Given name parameter must be permanently stored until
19
command is unregistered. */
20
void command_register(const char *name, command_func_t *func);
21
void command_unregister(const char *name);
23
/* Register array of commands. */
24
void command_register_array(const struct command *cmdarr, unsigned int count);
25
void command_unregister_array(const struct command *cmdarr, unsigned int count);
27
struct command *command_find(const char *name);
29
void commands_init(void);
30
void commands_deinit(void);
32
/* MANAGESIEVE commands: */
34
/* Non-Authenticated State */
35
extern bool cmd_logout(struct client_command_context *cmd);
36
extern bool cmd_capability(struct client_command_context *cmd);
37
extern bool cmd_noop(struct client_command_context *cmd);
39
/* Authenticated State */
40
extern bool cmd_putscript(struct client_command_context *cmd);
41
extern bool cmd_checkscript(struct client_command_context *cmd);
42
extern bool cmd_getscript(struct client_command_context *cmd);
43
extern bool cmd_setactive(struct client_command_context *cmd);
44
extern bool cmd_deletescript(struct client_command_context *cmd);
45
extern bool cmd_listscripts(struct client_command_context *cmd);
46
extern bool cmd_havespace(struct client_command_context *cmd);
47
extern bool cmd_renamescript(struct client_command_context *cmd);
49
#endif /* __COMMANDS_H */