[evolution-exchange] Adapt to CamelSession and e-passwords changes.



commit 1d3270d530382dc67d2c58544c8caffb86e472b5
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Jul 4 09:53:21 2011 -0400

    Adapt to CamelSession and e-passwords changes.

 camel/camel-exchange-store.c       |    2 +-
 eplugin/exchange-config-listener.c |    6 +++---
 server/lib/e2k-autoconfig.c        |   10 +++++-----
 server/lib/test-utils.c            |    2 +-
 server/storage/exchange-account.c  |   18 +++++++++---------
 tools/exchange-autoconfig-wizard.c |    2 +-
 6 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/camel/camel-exchange-store.c b/camel/camel-exchange-store.c
index d685812..146f734 100644
--- a/camel/camel-exchange-store.c
+++ b/camel/camel-exchange-store.c
@@ -317,7 +317,7 @@ exchange_store_connect_sync (CamelService *service,
 				"Exchange", url->user, url->host);
 
 			url->passwd = camel_session_get_password (
-				session, service, "Exchange", prompt,
+				session, service, prompt,
 				"password", prompt_flags, error);
 
 			g_free (prompt);
diff --git a/eplugin/exchange-config-listener.c b/eplugin/exchange-config-listener.c
index 7efd4c4..7153a39 100644
--- a/eplugin/exchange-config-listener.c
+++ b/eplugin/exchange-config-listener.c
@@ -823,11 +823,11 @@ exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener,
 
 	camel_url = camel_url_new (priv->configured_uri, NULL);
 	key = camel_url_to_string (camel_url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
-	password = e_passwords_get_password ("Exchange", key);
+	password = e_passwords_get_password (NULL, key);
 	if (!password) {
 		oldremember = remember = exchange_account_is_save_password (account);
 		title = g_strdup_printf (_("Enter Password for %s"), account->account_name);
-		password = e_passwords_ask_password (title, "Exchange", key, title,
+		password = e_passwords_ask_password (title, NULL, key, title,
 						     E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET,
 						     &remember, NULL);
 		if (remember != oldremember) {
@@ -847,7 +847,7 @@ exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener,
 		 * whis is stored temporarily by e2k_validate_user(), to avoid
 		 * asking for password again, at the end of account creation.
 		 */
-		e_passwords_forget_password ("Exchange", key);
+		e_passwords_forget_password (NULL, key);
 		exchange_account_set_save_password (account, FALSE);
 	}
 
diff --git a/server/lib/e2k-autoconfig.c b/server/lib/e2k-autoconfig.c
index 6127093..616124e 100644
--- a/server/lib/e2k-autoconfig.c
+++ b/server/lib/e2k-autoconfig.c
@@ -1680,18 +1680,18 @@ e2k_validate_user (const gchar *owa_url, gchar *pkey, gchar **user,
 try_auth_again:
 	username = g_strdup (*user);
 
-	password = e_passwords_get_password ("Exchange", key);
+	password = e_passwords_get_password (NULL, key);
 	if (password) {
 		/* This can be the case, where user presses authenticate button and
 		 * later cancels the account setup or removal of account fails for
 		 * some reason. We need to prompt for the password always when
 		 * authenticate button is pressed */
-		e_passwords_forget_password ("Exchange", key);
+		e_passwords_forget_password (NULL, key);
 	}
 
 	prompt = g_strdup_printf (_("Enter password for %s"), username);
 	password = e_passwords_ask_password (_("Enter password"),
-				"Exchange", key, prompt,
+				NULL, key, prompt,
 				E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET,
 				&remember, parent);
 	g_free (prompt);
@@ -1718,7 +1718,7 @@ try_auth_again:
 		else
 			key = g_strdup_printf ("exchange://%s %s/", username, exchange_params->host);
 		e_passwords_add_password (key, password);
-		e_passwords_remember_password ("Exchange", key);
+		e_passwords_remember_password (NULL, key);
 	}
 	else {
 		if (try == 0) {
@@ -1738,7 +1738,7 @@ try_auth_again:
 			}
 		}
 		/* if validation failed*/
-		e_passwords_forget_password ("Exchange", key);
+		e_passwords_forget_password (NULL, key);
 	}
 
 	g_free (key);
diff --git a/server/lib/test-utils.c b/server/lib/test-utils.c
index 5d40881..5bd1558 100644
--- a/server/lib/test-utils.c
+++ b/server/lib/test-utils.c
@@ -101,7 +101,7 @@ test_get_password (const gchar *user, const gchar *host)
 		gchar *key;
 
 		key = g_strdup_printf ("exchange://%s %s", user, host);
-		password = e_passwords_get_password ("Exchange", key);
+		password = e_passwords_get_password (NULL, key);
 		g_free (key);
 	}
 
diff --git a/server/storage/exchange-account.c b/server/storage/exchange-account.c
index a5b4440..80a1d0f 100644
--- a/server/storage/exchange-account.c
+++ b/server/storage/exchange-account.c
@@ -943,9 +943,9 @@ get_password (ExchangeAccount *account, E2kAutoconfig *ac, ExchangeAccountResult
 	gchar *password;
 
 	if (error != EXCHANGE_ACCOUNT_CONNECT_SUCCESS)
-		e_passwords_forget_password ("Exchange", account->priv->password_key);
+		e_passwords_forget_password (NULL, account->priv->password_key);
 
-	password = e_passwords_get_password ("Exchange", account->priv->password_key);
+	password = e_passwords_get_password (NULL, account->priv->password_key);
 #if 0
 	if (exchange_component_is_interactive (global_exchange_component)) {
 		gboolean remember, oldremember;
@@ -958,7 +958,7 @@ get_password (ExchangeAccount *account, E2kAutoconfig *ac, ExchangeAccountResult
 					account->priv->account->source->save_passwd;
 			password = e_passwords_ask_password (
 					_("Enter password"),
-					"Exchange",
+					NULL,
 					account->priv->password_key,
 					prompt,
 					E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET,
@@ -974,7 +974,7 @@ get_password (ExchangeAccount *account, E2kAutoconfig *ac, ExchangeAccountResult
 			 * selected remember password option, forget this password
 			 * whis is stored temporarily by e2k_validate_user()
 			 */
-			e_passwords_forget_password ("Exchange", account->priv->password_key);
+			e_passwords_forget_password (NULL, account->priv->password_key);
 		}
 	}
 #endif
@@ -985,7 +985,7 @@ get_password (ExchangeAccount *account, E2kAutoconfig *ac, ExchangeAccountResult
 		 * selected remember password option, forget this password
 		 * whis is stored temporarily by e2k_validate_user()
 		 */
-		e_passwords_forget_password ("Exchange", account->priv->password_key);
+		e_passwords_forget_password (NULL, account->priv->password_key);
 	}
 
 	if (password) {
@@ -1092,13 +1092,13 @@ find_passwd_exp_period (ExchangeAccount *account, E2kGlobalCatalogEntry *entry)
 gchar *
 exchange_account_get_password (ExchangeAccount *account)
 {
-	return e_passwords_get_password ("Exchange", account->priv->password_key);
+	return e_passwords_get_password (NULL, account->priv->password_key);
 }
 
 void
 exchange_account_forget_password (ExchangeAccount *account)
 {
-	e_passwords_forget_password ("Exchange", account->priv->password_key);
+	e_passwords_forget_password (NULL, account->priv->password_key);
 }
 
 ExchangeAccountResult
@@ -1135,10 +1135,10 @@ exchange_account_set_password (ExchangeAccount *account, gchar *old_pass, gchar
 	}
 	switch (result) {
 	case E2K_KERBEROS_OK:
-		e_passwords_forget_password ("Exchange", account->priv->password_key);
+		e_passwords_forget_password (NULL, account->priv->password_key);
 		e_passwords_add_password (account->priv->password_key, new_pass);
 		if (account->priv->account->source->save_passwd)
-			e_passwords_remember_password ("Exchange", account->priv->password_key);
+			e_passwords_remember_password (NULL, account->priv->password_key);
 		break;
 
 	case E2K_KERBEROS_PASSWORD_TOO_WEAK:
diff --git a/tools/exchange-autoconfig-wizard.c b/tools/exchange-autoconfig-wizard.c
index 5e0e600..42571e4 100644
--- a/tools/exchange-autoconfig-wizard.c
+++ b/tools/exchange-autoconfig-wizard.c
@@ -599,7 +599,7 @@ autoconfig_gui_apply (ExchangeAutoconfigGUI *gui)
 	/* Maybe longer */
 	if (gtk_toggle_button_get_active (gui->remember_password_check)) {
 		account->source->save_passwd = TRUE;
-		e_passwords_remember_password ("Exchange", pw_key);
+		e_passwords_remember_password (NULL, pw_key);
 	}
 	g_free (pw_key);
 



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