[evolution-ews] e_ews_connection_new(): Remove password argument.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] e_ews_connection_new(): Remove password argument.
- Date: Tue, 31 Jul 2012 17:32:13 +0000 (UTC)
commit 62a03332a0e244c893c444c8cd7ee6ea8740887e
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Jul 31 12:41:51 2012 -0400
e_ews_connection_new(): Remove password argument.
After creating the connection call e_ews_connection_set_password() or
e_source_authenticator_try_password(). In the case of try_password(),
if the provided password works, the "password" property is updated.
src/addressbook/e-book-backend-ews.c | 13 +++++++------
src/calendar/e-cal-backend-ews.c | 4 ++--
src/camel/camel-ews-store.c | 4 ++--
src/collection/e-ews-backend.c | 4 ++--
src/configuration/e-ews-config-utils.c | 3 ++-
.../e-mail-config-ews-oal-combo-box.c | 4 ++--
src/configuration/e-mail-config-ews-ooo-page.c | 4 ++--
src/server/e-ews-connection.c | 6 ++----
src/server/e-ews-connection.h | 1 -
src/server/tests/test-autocompletion.c | 3 ++-
src/server/tests/test-connection.c | 3 ++-
src/server/tests/test-createfolder.c | 3 ++-
src/server/tests/test-cuditem.c | 3 ++-
src/server/tests/test-deletefolder.c | 3 ++-
src/server/tests/test-get-oof-settings.c | 3 ++-
src/server/tests/test-getattachment.c | 3 ++-
src/server/tests/test-getdelegate.c | 3 ++-
src/server/tests/test-set-oof-settings.c | 3 ++-
src/server/tests/test-syncfolder.c | 9 ++++++---
src/utils/ews-test-finditem-query.c | 3 ++-
20 files changed, 47 insertions(+), 35 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index 86ec903..90dae5a 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -1691,8 +1691,9 @@ ews_download_full_gal (EBookBackendEws *cbews,
cache_dir = e_book_backend_get_cache_dir (E_BOOK_BACKEND (cbews));
comp_cache_file = g_build_filename (cache_dir, full->filename, NULL);
- oab_cnc = e_ews_connection_new (
- full_url, priv->password, ews_settings);
+ oab_cnc = e_ews_connection_new (full_url, ews_settings);
+ e_ews_connection_set_password (oab_cnc, priv->password);
+
if (!e_ews_connection_download_oal_file_sync (
oab_cnc, comp_cache_file, NULL, NULL, cancellable, error))
goto exit;
@@ -1846,8 +1847,8 @@ ebews_start_gal_sync (gpointer data)
ews_settings = book_backend_ews_get_collection_settings (cbews);
priv = cbews->priv;
- oab_cnc = e_ews_connection_new (
- priv->oab_url, priv->password, ews_settings);
+ oab_cnc = e_ews_connection_new (priv->oab_url, ews_settings);
+ e_ews_connection_set_password (oab_cnc, priv->password);
d(printf ("Ewsgal: Fetching oal full details file \n");)
@@ -2938,8 +2939,8 @@ book_backend_ews_try_password_sync (ESourceAuthenticator *authenticator,
ews_settings = book_backend_ews_get_collection_settings (backend);
hosturl = camel_ews_settings_dup_hosturl (ews_settings);
- connection = e_ews_connection_new (
- hosturl, password->str, ews_settings);
+ connection = e_ews_connection_new (hosturl, ews_settings);
+ e_ews_connection_set_password (connection, password->str);
g_free (hosturl);
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index f37ac55..bc2fdea 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -4070,8 +4070,8 @@ cal_backend_ews_try_password_sync (ESourceAuthenticator *authenticator,
ews_settings = cal_backend_ews_get_collection_settings (backend);
hosturl = camel_ews_settings_dup_hosturl (ews_settings);
- connection = e_ews_connection_new (
- hosturl, password->str, ews_settings);
+ connection = e_ews_connection_new (hosturl, ews_settings);
+ e_ews_connection_set_password (connection, password->str);
g_free (hosturl);
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index ac3b6e8..5ee9cfd 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -360,8 +360,8 @@ ews_authenticate_sync (CamelService *service,
ews_settings = CAMEL_EWS_SETTINGS (settings);
hosturl = camel_ews_settings_dup_hosturl (ews_settings);
- connection = e_ews_connection_new (
- hosturl, password, ews_settings);
+ connection = e_ews_connection_new (hosturl, ews_settings);
+ e_ews_connection_set_password (connection, password);
g_free (hosturl);
diff --git a/src/collection/e-ews-backend.c b/src/collection/e-ews-backend.c
index 43d8ee0..62c8257 100644
--- a/src/collection/e-ews-backend.c
+++ b/src/collection/e-ews-backend.c
@@ -605,8 +605,8 @@ ews_backend_try_password_sync (ESourceAuthenticator *authenticator,
ews_settings = ews_backend_get_settings (backend);
hosturl = camel_ews_settings_dup_hosturl (ews_settings);
- connection = e_ews_connection_new (
- hosturl, password->str, ews_settings);
+ connection = e_ews_connection_new (hosturl, ews_settings);
+ e_ews_connection_set_password (connection, password->str);
g_free (hosturl);
diff --git a/src/configuration/e-ews-config-utils.c b/src/configuration/e-ews-config-utils.c
index 982dac8..c2ed8e9 100644
--- a/src/configuration/e-ews-config-utils.c
+++ b/src/configuration/e-ews-config-utils.c
@@ -275,7 +275,8 @@ ews_config_utils_authenticator_try_password_sync (ESourceAuthenticator *auth,
user = camel_network_settings_dup_user (network_settings);
authenticator->conn = e_ews_connection_new (
- hosturl, password->str, authenticator->ews_settings);
+ hosturl, authenticator->ews_settings);
+ e_ews_connection_set_password (authenticator->conn, password->str);
g_free (hosturl);
g_free (user);
diff --git a/src/configuration/e-mail-config-ews-oal-combo-box.c b/src/configuration/e-mail-config-ews-oal-combo-box.c
index 9e2e298..015a325 100644
--- a/src/configuration/e-mail-config-ews-oal-combo-box.c
+++ b/src/configuration/e-mail-config-ews-oal-combo-box.c
@@ -154,8 +154,8 @@ mail_config_ews_oal_combo_box_try_password_sync (ESourceAuthenticator *auth,
ews_settings = CAMEL_EWS_SETTINGS (settings);
oab_url = camel_ews_settings_get_oaburl (ews_settings);
- cnc = e_ews_connection_new (
- oab_url, password->str, ews_settings);
+ cnc = e_ews_connection_new (oab_url, ews_settings);
+ e_ews_connection_set_password (cnc, password->str);
e_ews_connection_get_oal_list_sync (
cnc, &oal_items, cancellable, &local_error);
diff --git a/src/configuration/e-mail-config-ews-ooo-page.c b/src/configuration/e-mail-config-ews-ooo-page.c
index 4ab1036..62ea848 100644
--- a/src/configuration/e-mail-config-ews-ooo-page.c
+++ b/src/configuration/e-mail-config-ews-ooo-page.c
@@ -796,8 +796,8 @@ mail_config_ews_ooo_page_try_password_sync (ESourceAuthenticator *auth,
ews_settings = CAMEL_EWS_SETTINGS (settings);
hosturl = camel_ews_settings_get_hosturl (ews_settings);
- connection = e_ews_connection_new (
- hosturl, password->str, ews_settings);
+ connection = e_ews_connection_new (hosturl, ews_settings);
+ e_ews_connection_set_password (connection, password->str);
e_ews_connection_set_mailbox (connection, mailbox);
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 4edd3c3..de9d16e 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -1555,7 +1555,6 @@ e_ews_connection_find (const gchar *uri,
/**
* e_ews_connection_new
* @uri: Exchange server uri
- * @password:
* @settings: a #CamelEwsSettings
*
* This does not authenticate to the server. It merely stores the username and password.
@@ -1565,7 +1564,6 @@ e_ews_connection_find (const gchar *uri,
**/
EEwsConnection *
e_ews_connection_new (const gchar *uri,
- const gchar *password,
CamelEwsSettings *settings)
{
CamelNetworkSettings *network_settings;
@@ -1603,7 +1601,6 @@ e_ews_connection_new (const gchar *uri,
E_TYPE_EWS_CONNECTION,
"settings", settings, NULL);
- cnc->priv->password = g_strdup (password);
cnc->priv->uri = g_strdup (uri);
cnc->priv->hash_key = hash_key; /* takes ownership */
@@ -2077,7 +2074,8 @@ e_ews_autodiscover_ws_url (CamelEwsSettings *settings,
if (user == NULL || *user == '\0')
user = email_address;
- cnc = e_ews_connection_new (url3, password, settings);
+ cnc = e_ews_connection_new (url3, settings);
+ e_ews_connection_set_password (cnc, password);
/*
* http://msdn.microsoft.com/en-us/library/ee332364.aspx says we are
diff --git a/src/server/e-ews-connection.h b/src/server/e-ews-connection.h
index 6813d46..cec2f09 100644
--- a/src/server/e-ews-connection.h
+++ b/src/server/e-ews-connection.h
@@ -179,7 +179,6 @@ void ews_oal_details_free (EwsOALDetails *details);
GType e_ews_connection_get_type (void);
EEwsConnection *e_ews_connection_new (const gchar *uri,
- const gchar *password,
CamelEwsSettings *settings);
const gchar * e_ews_connection_get_uri (EEwsConnection *cnc);
const gchar * e_ews_connection_get_password (EEwsConnection *cnc);
diff --git a/src/server/tests/test-autocompletion.c b/src/server/tests/test-autocompletion.c
index 075fa6e..657f7e8 100644
--- a/src/server/tests/test-autocompletion.c
+++ b/src/server/tests/test-autocompletion.c
@@ -93,7 +93,8 @@ op_test_resolve_names ()
CAMEL_TYPE_EWS_SETTINGS,
"user", username, NULL);
- cnc = e_ews_connection_new (uri, password, settings);
+ cnc = e_ews_connection_new (uri, settings);
+ e_ews_connection_set_password (cnc, password);
g_object_unref (settings);
diff --git a/src/server/tests/test-connection.c b/src/server/tests/test-connection.c
index 0703adf..cf71f0c 100644
--- a/src/server/tests/test-connection.c
+++ b/src/server/tests/test-connection.c
@@ -59,7 +59,8 @@ con_test_create_new_connection ()
CAMEL_TYPE_EWS_SETTINGS,
"user", username, NULL);
- cnc = e_ews_connection_new (uri, password, settings);
+ cnc = e_ews_connection_new (uri, settings);
+ e_ews_connection_set_password (cnc, password);
g_object_unref (settings);
diff --git a/src/server/tests/test-createfolder.c b/src/server/tests/test-createfolder.c
index 8fe4253..9337667 100644
--- a/src/server/tests/test-createfolder.c
+++ b/src/server/tests/test-createfolder.c
@@ -90,7 +90,8 @@ op_test_create_folder ()
CAMEL_TYPE_EWS_SETTINGS,
"user", username, NULL);
- cnc = e_ews_connection_new (uri, password, settings);
+ cnc = e_ews_connection_new (uri, settings);
+ e_ews_connection_set_password (cnc, password);
g_object_unref (settings);
diff --git a/src/server/tests/test-cuditem.c b/src/server/tests/test-cuditem.c
index fd5e137..c3c80b6 100644
--- a/src/server/tests/test-cuditem.c
+++ b/src/server/tests/test-cuditem.c
@@ -113,7 +113,8 @@ op_test_create_item ()
CAMEL_TYPE_EWS_SETTINGS,
"user", username, NULL);
- cnc = e_ews_connection_new (uri, password, settings);
+ cnc = e_ews_connection_new (uri, settings);
+ e_ews_connection_set_password (cnc, password);
g_object_unref (settings);
diff --git a/src/server/tests/test-deletefolder.c b/src/server/tests/test-deletefolder.c
index 2ec4bae..6bc206f 100644
--- a/src/server/tests/test-deletefolder.c
+++ b/src/server/tests/test-deletefolder.c
@@ -81,7 +81,8 @@ op_test_delete_folder (gpointer data)
CAMEL_TYPE_EWS_SETTINGS,
"user", username, NULL);
- cnc = e_ews_connection_new (uri, password, settings);
+ cnc = e_ews_connection_new (uri, settings);
+ e_ews_connection_set_password (cnc, password);
g_object_unref (settings);
diff --git a/src/server/tests/test-get-oof-settings.c b/src/server/tests/test-get-oof-settings.c
index 08c6bb8..38fc3b3 100644
--- a/src/server/tests/test-get-oof-settings.c
+++ b/src/server/tests/test-get-oof-settings.c
@@ -82,7 +82,8 @@ op_test_get_oof_settings ()
CAMEL_TYPE_EWS_SETTINGS,
"username", username, NULL);
- cnc = e_ews_connection_new (uri, password, settings);
+ cnc = e_ews_connection_new (uri, settings);
+ e_ews_connection_set_password (cnc, password);
g_object_unref (settings);
diff --git a/src/server/tests/test-getattachment.c b/src/server/tests/test-getattachment.c
index 200c511..881aa16 100644
--- a/src/server/tests/test-getattachment.c
+++ b/src/server/tests/test-getattachment.c
@@ -87,7 +87,8 @@ op_test_get_attachments ()
CAMEL_TYPE_EWS_SETTINGS,
"user", username, NULL);
- cnc = e_ews_connection_new (uri, password, settings);
+ cnc = e_ews_connection_new (uri, settings);
+ e_ews_connection_set_password (cnc, password);
g_object_unref (settings);
diff --git a/src/server/tests/test-getdelegate.c b/src/server/tests/test-getdelegate.c
index 7080186..cab3e31 100644
--- a/src/server/tests/test-getdelegate.c
+++ b/src/server/tests/test-getdelegate.c
@@ -89,7 +89,8 @@ op_test_get_delegate ()
CAMEL_TYPE_EWS_SETTINGS,
"user", username, NULL);
- cnc = e_ews_connection_new (uri, password, settings);
+ cnc = e_ews_connection_new (uri, settings);
+ e_ews_connection_set_password (cnc, password);
g_object_unref (settings);
diff --git a/src/server/tests/test-set-oof-settings.c b/src/server/tests/test-set-oof-settings.c
index e46417c..c2f3c67 100644
--- a/src/server/tests/test-set-oof-settings.c
+++ b/src/server/tests/test-set-oof-settings.c
@@ -97,7 +97,8 @@ op_test_set_oof_settings ()
CAMEL_TYPE_EWS_SETTINGS,
"user", username, NULL);
- cnc = e_ews_connection_new (uri, password, settings);
+ cnc = e_ews_connection_new (uri, settings);
+ e_ews_connection_set_password (cnc, password);
g_object_unref (settings);
diff --git a/src/server/tests/test-syncfolder.c b/src/server/tests/test-syncfolder.c
index 768dabe..808f306 100644
--- a/src/server/tests/test-syncfolder.c
+++ b/src/server/tests/test-syncfolder.c
@@ -105,7 +105,8 @@ op_test_sync_folder_items ()
CAMEL_TYPE_EWS_SETTINGS,
"user", username, NULL);
- cnc = e_ews_connection_new (uri, password, settings);
+ cnc = e_ews_connection_new (uri, settings);
+ e_ews_connection_set_password (cnc, password);
g_object_unref (settings);
@@ -184,7 +185,8 @@ op_test_sync_folder_hierarchy ()
CAMEL_TYPE_EWS_SETTINGS,
"user", username, NULL);
- cnc = e_ews_connection_new (uri, password, settings);
+ cnc = e_ews_connection_new (uri, settings);
+ e_ews_connection_set_password (cnc, password);
g_object_unref (settings);
@@ -251,7 +253,8 @@ op_test_get_item ()
CAMEL_TYPE_EWS_SETTINGS,
"user", username, NULL);
- cnc = e_ews_connection_new (uri, password, settings);
+ cnc = e_ews_connection_new (uri, settings);
+ e_ews_connection_set_password (cnc, password);
g_object_unref (settings);
diff --git a/src/utils/ews-test-finditem-query.c b/src/utils/ews-test-finditem-query.c
index 3bfc5b4..ba56a75 100644
--- a/src/utils/ews-test-finditem-query.c
+++ b/src/utils/ews-test-finditem-query.c
@@ -117,7 +117,8 @@ op_test_finditem_run (void)
CAMEL_TYPE_EWS_SETTINGS,
"user", username, NULL);
- cnc = e_ews_connection_new (uri, password, settings);
+ cnc = e_ews_connection_new (uri, settings);
+ e_ews_connection_set_password (cnc, password);
g_object_unref (settings);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]