[evolution-kolab] KolabSettingsHandler: moved default port numbers to util header file



commit ab6ddd8d48d08d4e8e24f6f37448a42e51024102
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Tue Jun 5 19:25:18 2012 +0200

    KolabSettingsHandler: moved default port numbers to util header file

 src/libekolab/kolab-settings-handler.c |   13 +++++++------
 src/libekolabutil/kolab-util-camel.h   |    8 ++++++++
 2 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/src/libekolab/kolab-settings-handler.c b/src/libekolab/kolab-settings-handler.c
index d0bf10f..b19afac 100644
--- a/src/libekolab/kolab-settings-handler.c
+++ b/src/libekolab/kolab-settings-handler.c
@@ -32,6 +32,7 @@
 #include <glib/gi18n-lib.h>
 
 #include <libedataserver/e-data-server-util.h>
+#include <libekolabutil/kolab-util-camel.h>
 #include <libekolabutil/kolab-util-glib.h>
 
 #include "kolab-util-backend.h"
@@ -334,12 +335,12 @@ kolab_settings_handler_init (KolabSettingsHandler *object)
 
 	/* documenting initial settings (dumb fallback values) */
 	priv->sdata_uint[KOLAB_SETTINGS_HANDLER_UINT_FIELD_FOLDER_CONTEXT] = KOLAB_FOLDER_CONTEXT_INVAL;
-	priv->sdata_int[KOLAB_SETTINGS_HANDLER_INT_FIELD_KOLAB_SERVER_IMAP_PORT]  = 143;
-	priv->sdata_int[KOLAB_SETTINGS_HANDLER_INT_FIELD_KOLAB_SERVER_IMAPS_PORT] = 993;
-	priv->sdata_int[KOLAB_SETTINGS_HANDLER_INT_FIELD_KOLAB_SERVER_HTTP_PORT]  = 80;
-	priv->sdata_int[KOLAB_SETTINGS_HANDLER_INT_FIELD_KOLAB_SERVER_HTTPS_PORT] = 443;
-	priv->sdata_int[KOLAB_SETTINGS_HANDLER_INT_FIELD_KOLAB_SERVER_LDAP_PORT]  = 389;
-	priv->sdata_int[KOLAB_SETTINGS_HANDLER_INT_FIELD_KOLAB_SERVER_LDAPS_PORT] = 636;
+	priv->sdata_int[KOLAB_SETTINGS_HANDLER_INT_FIELD_KOLAB_SERVER_IMAP_PORT]  = KOLAB_SERVER_IMAP_PORT;
+	priv->sdata_int[KOLAB_SETTINGS_HANDLER_INT_FIELD_KOLAB_SERVER_IMAPS_PORT] = KOLAB_SERVER_IMAPS_PORT;
+	priv->sdata_int[KOLAB_SETTINGS_HANDLER_INT_FIELD_KOLAB_SERVER_HTTP_PORT]  = KOLAB_SERVER_HTTP_PORT;
+	priv->sdata_int[KOLAB_SETTINGS_HANDLER_INT_FIELD_KOLAB_SERVER_HTTPS_PORT] = KOLAB_SERVER_HTTPS_PORT;
+	priv->sdata_int[KOLAB_SETTINGS_HANDLER_INT_FIELD_KOLAB_SERVER_LDAP_PORT]  = KOLAB_SERVER_LDAP_PORT;
+	priv->sdata_int[KOLAB_SETTINGS_HANDLER_INT_FIELD_KOLAB_SERVER_LDAPS_PORT] = KOLAB_SERVER_LDAPS_PORT;
 
 	priv->sdata_tbl = NULL;
 
diff --git a/src/libekolabutil/kolab-util-camel.h b/src/libekolabutil/kolab-util-camel.h
index f5790ba..3f7af30 100644
--- a/src/libekolabutil/kolab-util-camel.h
+++ b/src/libekolabutil/kolab-util-camel.h
@@ -49,6 +49,14 @@
 #define KOLAB_IMAP_CLIENT_DUMMY_FROM_NAME  "Nobody"
 #define KOLAB_IMAP_CLIENT_DUMMY_FROM_ADDR  "nobody localhost localdomain"
 
+/* default fallback TCP ports */
+#define KOLAB_SERVER_IMAP_PORT  143
+#define KOLAB_SERVER_IMAPS_PORT 993
+#define KOLAB_SERVER_HTTP_PORT  80
+#define KOLAB_SERVER_HTTPS_PORT 443
+#define KOLAB_SERVER_LDAP_PORT  389
+#define KOLAB_SERVER_LDAPS_PORT 636
+
 /*----------------------------------------------------------------------------*/
 /* Camel init/shutdown */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]