]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-ldap: ldap_client_settings - Move to ldap-settings.h
authorMarco Bettini <marco.bettini@open-xchange.com>
Fri, 20 Sep 2024 13:38:45 +0000 (13:38 +0000)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:40:01 +0000 (10:40 +0200)
src/lib-ldap/Makefile.am
src/lib-ldap/ldap-client.h
src/lib-ldap/ldap-settings.c [new file with mode: 0644]
src/lib-ldap/ldap-settings.h [new file with mode: 0644]

index d2b688cd9500295939008b31177bb83eef3dd26d..63b3d19c4d8cc1237822608a10926b0d1405d595 100644 (file)
@@ -14,6 +14,7 @@ libdldap_la_SOURCES = \
        ldap-connection-pool.c \
        ldap-iterator.c \
        ldap-search.c \
+       ldap-settings.c \
        ldap-compare.c \
        ldap-entry.c
 
@@ -32,6 +33,7 @@ headers = \
 noinst_HEADERS = \
        ldap-connection-pool.h \
        ldap-private.h \
+       ldap-settings.h \
        ldap-settings-parse.h
 
 pkginc_libdir=$(pkgincludedir)
index ce10332f78962cb454730ee0657af73fc5e21d29..bb9b6de5b35f259d03731db2b6ef3f2b0f1d6a6e 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef LDAP_CLIENT_H
 #define LDAP_CLIENT_H
 
+#include "ldap-settings.h"
+
 enum ldap_scope {
        LDAP_SEARCH_SCOPE_BASE    = 0x0000,
        LDAP_SEARCH_SCOPE_ONE     = 0x0001,
@@ -18,23 +20,6 @@ struct ldap_entry;
    callback finishes. */
 typedef void ldap_result_callback_t(struct ldap_result *result, void *context);
 
-struct ldap_client_settings {
-       /* NOTE: when adding here, remember to update
-          ldap_connection_have_settings() and ldap_connection_init() */
-       const char *uris;
-       const char *auth_dn;
-       const char *auth_dn_password;
-
-       struct event *event_parent;
-       const struct ssl_iostream_settings *ssl_ioset;
-
-       unsigned int timeout_secs;
-       unsigned int max_idle_time_secs;
-       unsigned int debug_level;
-       bool require_ssl;
-       bool starttls;
-};
-
 struct ldap_search_input {
        const char *base_dn;
        const char *filter;
diff --git a/src/lib-ldap/ldap-settings.c b/src/lib-ldap/ldap-settings.c
new file mode 100644 (file)
index 0000000..f32f380
--- /dev/null
@@ -0,0 +1 @@
+/* Copyright (c) 2024 Dovecot authors, see the included COPYING file */
diff --git a/src/lib-ldap/ldap-settings.h b/src/lib-ldap/ldap-settings.h
new file mode 100644 (file)
index 0000000..f55b54d
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef LDAP_SETTINGS_H
+#define LDAP_SETTINGS_H
+
+struct ldap_client_settings {
+       pool_t pool;
+
+       const char *uris;
+       const char *auth_dn;
+       const char *auth_dn_password;
+
+       unsigned int timeout_secs;
+       unsigned int max_idle_time_secs;
+       unsigned int debug_level;
+       bool require_ssl;
+       bool starttls;
+
+       struct event *event_parent;
+       const struct ssl_iostream_settings *ssl_ioset;
+};
+
+#endif