#ifndef DOVEADM_CMD_H
#define DOVEADM_CMD_H
#include "net.h"
#define DOVEADM_CMD_PARAM(optP, nameP, typeP, flagP ) { .short_opt = optP, .name = nameP, .type = typeP, .flags = flagP },
#define DOVEADM_CMD_PARAMS_END { .short_opt = '\0', .name = NULL, .type = CMD_PARAM_BOOL, .flags = CMD_PARAM_FLAG_NONE } }
struct doveadm_cmd_ver2;
struct doveadm_cmd_context;
struct doveadm_mail_cmd_context;
typedef enum {
typedef enum {
typedef enum {
struct doveadm_cmd_param {
char short_opt;
const char *name;
bool value_set;
struct {
bool v_bool;
const char* v_string;
} value;
};
struct doveadm_cmd {
const char *name;
const char *short_usage;
};
struct doveadm_cmd_ver2 {
const char *name;
const char *usage;
};
struct doveadm_cmd_context {
int argc;
const char *username;
};
extern struct doveadm_cmd doveadm_cmd_dump;
extern struct doveadm_cmd doveadm_cmd_pw;
extern struct doveadm_cmd doveadm_cmd_mailbox_mutf7;
extern struct doveadm_cmd doveadm_cmd_sis_deduplicate;
extern struct doveadm_cmd doveadm_cmd_sis_find;
extern struct doveadm_cmd doveadm_cmd_zlibconnect;
const struct doveadm_cmd *
const char *const *argv[]);
void doveadm_register_auth_commands(void);
void doveadm_register_auth_server_commands(void);
void doveadm_register_director_commands(void);
void doveadm_register_proxy_commands(void);
void doveadm_register_log_commands(void);
void doveadm_register_instance_commands(void);
void doveadm_register_mount_commands(void);
void doveadm_register_replicator_commands(void);
void doveadm_register_dict_commands(void);
void doveadm_register_fs_commands(void);
void doveadm_cmds_init(void);
void doveadm_cmds_deinit(void);
const struct doveadm_cmd_ver2 *
const char *const *argv[]);
/* Returns FALSE if cmd_name doesn't exist, TRUE if it exists. */
bool doveadm_cmd_try_run_ver2(const char *cmd_name,
struct doveadm_cmd_context *cctx);
/* Returns 0 if success, -1 if parameters were invalid. */
struct doveadm_cmd_context *cctx);
extern struct doveadm_cmd_ver2 doveadm_cmd_service_stop_ver2;
extern struct doveadm_cmd_ver2 doveadm_cmd_service_status_ver2;
extern struct doveadm_cmd_ver2 doveadm_cmd_process_status_ver2;
extern struct doveadm_cmd_ver2 doveadm_cmd_stop_ver2;
extern struct doveadm_cmd_ver2 doveadm_cmd_reload_ver2;
extern struct doveadm_cmd_ver2 doveadm_cmd_stats_dump_ver2;
extern struct doveadm_cmd_ver2 doveadm_cmd_oldstats_reset_ver2;
extern struct doveadm_cmd_ver2 doveadm_cmd_oldstats_dump_ver2;
extern struct doveadm_cmd_ver2 doveadm_cmd_oldstats_top_ver2;
extern struct doveadm_cmd_ver2 doveadm_cmd_penalty_ver2;
extern struct doveadm_cmd_ver2 doveadm_cmd_kick_ver2;
extern struct doveadm_cmd_ver2 doveadm_cmd_who_ver2;
#endif