a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen#ifndef DOVEADM_H
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen#define DOVEADM_H
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen
5fbccc935e3f7b916aa7c6e302a212821072e83aTimo Sirainen#include <sysexits.h>
1c633f71ec2060e5bfa500a97f34cd881a958ecdTimo Sirainen#include "doveadm-util.h"
1c7b846a17612b1fe7dcee797d0d8115201e58f4Timo Sirainen#include "doveadm-settings.h"
1c7b846a17612b1fe7dcee797d0d8115201e58f4Timo Sirainen
acc039dfc0b0f4588cf2feec04727b61e1c672a1Timo Sirainen#define USAGE_CMDNAME_FMT " %-12s"
acc039dfc0b0f4588cf2feec04727b61e1c672a1Timo Sirainen
5fbccc935e3f7b916aa7c6e302a212821072e83aTimo Sirainen#define DOVEADM_EX_NOTFOUND EX_NOHOST
5fbccc935e3f7b916aa7c6e302a212821072e83aTimo Sirainen#define DOVEADM_EX_NOTPOSSIBLE EX_DATAERR
c466bbccb4b8b0026aea13540ebdef3bddbd67ddAki Tuomi#define DOVEADM_EX_UNKNOWN -1
5fbccc935e3f7b916aa7c6e302a212821072e83aTimo Sirainen
7f0dcac9942910c2934ceab1230e539043167601Aki Tuomi#define DOVEADM_EX_NOREPLICATE 1001
7f0dcac9942910c2934ceab1230e539043167601Aki Tuomi
6fc40674e5a33787ae7fcd47a77a77ea20977994Aki Tuomienum doveadm_client_type {
6fc40674e5a33787ae7fcd47a77a77ea20977994Aki Tuomi DOVEADM_CONNECTION_TYPE_CLI = 0,
6fc40674e5a33787ae7fcd47a77a77ea20977994Aki Tuomi DOVEADM_CONNECTION_TYPE_TCP,
6fc40674e5a33787ae7fcd47a77a77ea20977994Aki Tuomi DOVEADM_CONNECTION_TYPE_HTTP,
2ba5e7dcc2a280904fe8a7af12c63f65bd5bee10Aki Tuomi};
2ba5e7dcc2a280904fe8a7af12c63f65bd5bee10Aki Tuomi
2ba5e7dcc2a280904fe8a7af12c63f65bd5bee10Aki Tuomi#include "doveadm-cmd.h"
2ba5e7dcc2a280904fe8a7af12c63f65bd5bee10Aki Tuomi
5e327e031d1591f8bff17b67eba7139afbd36cddTimo Sirainenextern bool doveadm_verbose_proctitle;
5fbccc935e3f7b916aa7c6e302a212821072e83aTimo Sirainenextern int doveadm_exit_code;
5fbccc935e3f7b916aa7c6e302a212821072e83aTimo Sirainen
e376e08040b5f21ff79a15ae728d2532a34207f6Timo Sirainenvoid usage(void) ATTR_NORETURN;
9ce62fcb795a4bb57f1c003fc8cbd63bff6e5463Timo Sirainenvoid help(const struct doveadm_cmd *cmd) ATTR_NORETURN;
14af7be4aa26d55c341cd6efe32bb2add2c39830Aki Tuomivoid help_ver2(const struct doveadm_cmd_ver2 *cmd) ATTR_NORETURN;
bf333c7645b8ddb6eedd6834db2fd908888793e1Timo Sirainenvoid doveadm_master_send_signal(int signo);
bf333c7645b8ddb6eedd6834db2fd908888793e1Timo Sirainen
c466bbccb4b8b0026aea13540ebdef3bddbd67ddAki Tuomiconst char *doveadm_exit_code_to_str(int code);
c466bbccb4b8b0026aea13540ebdef3bddbd67ddAki Tuomiint doveadm_str_to_exit_code(const char *reason);
c466bbccb4b8b0026aea13540ebdef3bddbd67ddAki Tuomi
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen#endif