]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm: Rename client_connection_type to doveadm_client_connection_type
authorAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 27 Oct 2017 18:57:31 +0000 (21:57 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Sat, 28 Oct 2017 12:21:51 +0000 (15:21 +0300)
Move it to doveadm.h to allow plugins use doveadm-cmd.h

src/doveadm/client-connection-private.h
src/doveadm/client-connection.c
src/doveadm/client-connection.h
src/doveadm/doveadm-cmd.h
src/doveadm/doveadm-kick.c
src/doveadm/doveadm.h

index 5b6b698ce58a26cbbedd574029b68527d9f784b5..bb703cd2945a016a8892bc6245ba11d5e620495b 100644 (file)
@@ -7,7 +7,7 @@ bool doveadm_client_is_allowed_command(const struct doveadm_settings *set,
        const char *cmd_name);
 
 int client_connection_init(struct client_connection *conn,
-       enum client_connection_type type, pool_t pool, int fd);
+       enum doveadm_client_connection_type type, pool_t pool, int fd);
 void client_connection_destroy(struct client_connection **_conn);
 
 void client_connection_set_proctitle(struct client_connection *conn,
index 92a8cfbda333d33790eec80425932f74397a60a8..c0e67bb7601d7a520869089f311fcbd7146c14e2 100644 (file)
@@ -59,7 +59,7 @@ static int client_connection_read_settings(struct client_connection *conn)
 }
 
 int client_connection_init(struct client_connection *conn,
-       enum client_connection_type type, pool_t pool, int fd)
+       enum doveadm_client_connection_type type, pool_t pool, int fd)
 {
        const char *ip;
 
index b33b82e30472b47db23ace9b99b047ec2dd7fae6..025e35bd323fbfc480a5870ba122a9c28968899b 100644 (file)
@@ -5,15 +5,9 @@
 
 #define DOVEADM_LOG_CHANNEL_ID 'L'
 
-enum client_connection_type {
-       CLIENT_CONNECTION_TYPE_CLI = 0,
-       CLIENT_CONNECTION_TYPE_TCP,
-       CLIENT_CONNECTION_TYPE_HTTP,
-};
-
 struct client_connection {
        pool_t pool;
-       enum client_connection_type type;
+       enum doveadm_client_connection_type type;
        const char *name;
 
        struct ip_addr local_ip, remote_ip;
index 743f4be263c5907260310a1f0cdf8942f1c136a4..6c974f8c8d1e92777b687babb8a3c68163943718 100644 (file)
@@ -2,7 +2,6 @@
 #define DOVEADM_CMD_H
 
 #include "net.h"
-#include "client-connection.h"
 
 #define DOVEADM_CMD_PARAMS_START .parameters = (const struct doveadm_cmd_param[]){
 #define DOVEADM_CMD_PARAM(optP, nameP, typeP, flagP ) { .short_opt = optP, .name = nameP, .type = typeP, .flags = flagP },
@@ -80,7 +79,7 @@ struct doveadm_cmd_context {
        struct ip_addr local_ip, remote_ip;
        in_port_t local_port, remote_port;
 
-       enum client_connection_type conn_type;
+       enum doveadm_client_connection_type conn_type;
        struct istream *input;
        struct ostream *output;
 };
index 1805d86b1a2137139bd8d7ec463cfa9c96c098f0..97a4b796af4369a6ec314fbdb9304d4c9327f392 100644 (file)
@@ -28,7 +28,7 @@ struct kick_pid {
 struct kick_context {
        struct who_context who;
        HASH_TABLE(void *, struct kick_pid *) pids;
-       enum client_connection_type conn_type;
+       enum doveadm_client_connection_type conn_type;
        bool force_kick;
        ARRAY(const char *) kicked_users;
 };
index 89f5c8dc6254fb84bffd743f11390946d7cb5d7c..bedf404a43d47781fc5adc815814f6dba5dcaefc 100644 (file)
@@ -3,7 +3,6 @@
 
 #include <sysexits.h>
 #include "doveadm-util.h"
-#include "doveadm-cmd.h"
 #include "doveadm-settings.h"
 
 #define USAGE_CMDNAME_FMT "  %-12s"
 #define DOVEADM_EX_NOTPOSSIBLE EX_DATAERR
 #define DOVEADM_EX_UNKNOWN -1
 
+enum doveadm_client_connection_type {
+       CLIENT_CONNECTION_TYPE_CLI = 0,
+       CLIENT_CONNECTION_TYPE_TCP,
+       CLIENT_CONNECTION_TYPE_HTTP,
+};
+
+#include "doveadm-cmd.h"
+
 extern bool doveadm_verbose_proctitle;
 extern int doveadm_exit_code;