diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/doveadm/doveadm-util.h | |
parent | Initial commit. (diff) | |
download | dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/doveadm/doveadm-util.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/doveadm/doveadm-util.h b/src/doveadm/doveadm-util.h new file mode 100644 index 0000000..8aefd92 --- /dev/null +++ b/src/doveadm/doveadm-util.h @@ -0,0 +1,31 @@ +#ifndef DOVEADM_UTIL_H +#define DOVEADM_UTIL_H + +#include "net.h" + +#define DOVEADM_SERVER_PROTOCOL_VERSION_MAJOR 1 +#define DOVEADM_SERVER_PROTOCOL_VERSION_MINOR 2 +#define DOVEADM_SERVER_PROTOCOL_VERSION_LINE "VERSION\tdoveadm-server\t1\t2" +#define DOVEADM_CLIENT_PROTOCOL_VERSION_LINE "VERSION\tdoveadm-client\t1\t2" + +extern bool doveadm_verbose, doveadm_debug, doveadm_server; + +const char *unixdate2str(time_t timestamp); +const char *doveadm_plugin_getenv(const char *name); +int doveadm_connect(const char *path); +int doveadm_tcp_connect(const char *target, in_port_t default_port); +int doveadm_connect_with_default_port(const char *path, + in_port_t default_port); + +void doveadm_load_modules(void); +void doveadm_unload_modules(void); +bool doveadm_has_unloaded_plugin(const char *name); + +char doveadm_log_type_to_char(enum log_type type) ATTR_PURE; +bool doveadm_log_type_from_char(char c, enum log_type *type_r); + +/* Similar to strcmp(), except "camel case" == "camel-case" == "camelCase". + Otherwise the comparison is case-sensitive. */ +int i_strccdascmp(const char *a, const char *b) ATTR_PURE; + +#endif |