[evolution-kolab] Get host/user from CamelKolabIMAPXSettings.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab] Get host/user from CamelKolabIMAPXSettings.
- Date: Thu, 12 Jul 2012 12:40:53 +0000 (UTC)
commit 5dda750f267eb1234daa81dd7466bc7ed3da8f12
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Jun 21 14:51:58 2012 -0400
Get host/user from CamelKolabIMAPXSettings.
src/addressbook/e-book-backend-kolab.c | 15 +++++++--------
src/calendar/e-cal-backend-kolab.c | 15 +++++++--------
2 files changed, 14 insertions(+), 16 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-kolab.c b/src/addressbook/e-book-backend-kolab.c
index 8a7b410..48b8134 100644
--- a/src/addressbook/e-book-backend-kolab.c
+++ b/src/addressbook/e-book-backend-kolab.c
@@ -233,7 +233,8 @@ e_book_backend_kolab_open (EBookBackendSync *backend,
EBookBackendKolab *self = NULL;
EBookBackendKolabPrivate *priv = NULL;
ESource *esource = NULL;
- CamelURL *c_url = NULL;
+ CamelKolabIMAPXSettings *kolab_settings;
+ CamelNetworkSettings *network_settings;
KolabSettingsHandler *ksettings = NULL;
KolabMailAccess *tmp_koma = NULL;
KolabSyncStrategyID sync_value = KOLAB_SYNC_STRATEGY_DEFAULT;
@@ -274,12 +275,12 @@ e_book_backend_kolab_open (EBookBackendSync *backend,
}
priv->book_uri = e_source_get_uri (esource);
- c_url = camel_url_new (priv->book_uri, &tmp_err);
- if (c_url == NULL)
- goto exit;
- servername = g_strdup (c_url->host);
- username = g_strdup (c_url->user);
+ kolab_settings = book_backend_kolab_get_collection_settings (self);
+ network_settings = CAMEL_NETWORK_SETTINGS (kolab_settings);
+
+ servername = camel_network_settings_dup_host (network_settings);
+ username = camel_network_settings_dup_user (network_settings);
g_debug ("%s()[%u] servername = %s", __func__, __LINE__, servername);
g_debug ("%s()[%u] username = %s", __func__, __LINE__, username);
@@ -404,8 +405,6 @@ e_book_backend_kolab_open (EBookBackendSync *backend,
g_mutex_unlock (&koma_objects_lock);
- if (c_url != NULL)
- camel_url_free (c_url);
if (servername != NULL)
g_free (servername);
if (username != NULL)
diff --git a/src/calendar/e-cal-backend-kolab.c b/src/calendar/e-cal-backend-kolab.c
index 5b7ff3f..26690fd 100644
--- a/src/calendar/e-cal-backend-kolab.c
+++ b/src/calendar/e-cal-backend-kolab.c
@@ -257,7 +257,8 @@ e_cal_backend_kolab_open (ECalBackendSync *backend,
ECalBackendKolab *self = NULL;
ECalBackendKolabPrivate *priv = NULL;
ESource *esource = NULL;
- CamelURL *c_url = NULL;
+ CamelKolabIMAPXSettings *kolab_settings;
+ CamelNetworkSettings *network_settings;
KolabSettingsHandler *ksettings = NULL;
KolabMailAccess *tmp_koma = NULL;
KolabSyncStrategyID sync_value = KOLAB_SYNC_STRATEGY_DEFAULT;
@@ -319,12 +320,12 @@ e_cal_backend_kolab_open (ECalBackendSync *backend,
}
priv->cal_uri = e_source_get_uri (esource);
- c_url = camel_url_new (priv->cal_uri, &tmp_err);
- if (c_url == NULL)
- goto exit;
- servername = g_strdup (c_url->host);
- username = g_strdup (c_url->user);
+ kolab_settings = cal_backend_kolab_get_collection_settings (self);
+ network_settings = CAMEL_NETWORK_SETTINGS (kolab_settings);
+
+ servername = camel_network_settings_dup_host (network_settings);
+ username = camel_network_settings_dup_user (network_settings);
g_debug ("%s()[%u] servername = %s", __func__, __LINE__, servername);
g_debug ("%s()[%u] username = %s", __func__, __LINE__, username);
@@ -463,8 +464,6 @@ e_cal_backend_kolab_open (ECalBackendSync *backend,
g_mutex_unlock (&koma_objects_lock);
- if (c_url != NULL)
- camel_url_free (c_url);
if (servername != NULL)
g_free (servername);
if (username != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]