[evolution-patches] Exchange: change of calls to exchange_account methods



Hi all,

In evolution-exchange, this patch
changes the calls to exchange_account_connect
and exchange_account_set_password to include
the error argument and error return value
respectively to reflect the changes in libexchange-storage.

Please review it.

Thanks,
Arunprakash.

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.350
diff -u -p -r1.350 ChangeLog
--- ChangeLog	2 Jul 2005 11:05:45 -0000	1.350
+++ ChangeLog	9 Jul 2005 13:42:57 -0000
@@ -1,3 +1,13 @@
+2005-07-09  Arunprakash <arunp novell com>
+
+	* e-book-backend-gal.c (set_mode)
+	* exchange-component.c (new_connection)
+	* exchange-config-listener.c (account_added)
+	* exchange-storage.c (idle_open_folder) :
+	Modified the call to exchange_account_connect to include error argument.
+	* xc-commands.c (do_change_password) : Modified to get the error as
+	return value from exchange_account_set_password.
+
 2005-07-01  Sarfraaz Ahmed <asarfraaz novell com>
 
 	* configure.in : Bumped the version to 2.3.4
Index: addressbook/e-book-backend-gal.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/addressbook/e-book-backend-gal.c,v
retrieving revision 1.24
diff -u -p -r1.24 e-book-backend-gal.c
--- addressbook/e-book-backend-gal.c	14 Jun 2005 07:03:37 -0000	1.24
+++ addressbook/e-book-backend-gal.c	9 Jul 2005 13:42:57 -0000
@@ -31,7 +31,7 @@
 
 #include <e2k-utils.h>
 #include <e2k-global-catalog-ldap.h>
-#include <exchange-account.h>
+#include <exchange/exchange-account.h>
 #include "exchange-component.h"
 
 #ifdef DEBUG
@@ -1710,6 +1710,7 @@ set_mode (EBookBackend *backend, int mod
 {
 	EBookBackendGAL *be = E_BOOK_BACKEND_GAL (backend);
 	EBookBackendGALPrivate *bepriv;
+	ExchangeAccountResult result;
 
 	bepriv = be->priv;
 
@@ -1731,7 +1732,7 @@ set_mode (EBookBackend *backend, int mod
 			}
 			}
 		} else if (mode == GNOME_Evolution_Addressbook_MODE_REMOTE) {
-			if (exchange_account_connect (bepriv->account)) {
+			if (exchange_account_connect (bepriv->account, &result)) { /* FIXME: error not handled. */
 				e_book_backend_set_is_writable (backend, FALSE);
 				e_book_backend_notify_writable (backend, FALSE);
 				e_book_backend_notify_connection_status (backend, TRUE);
Index: storage/exchange-component.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/storage/exchange-component.c,v
retrieving revision 1.8
diff -u -p -r1.8 exchange-component.c
--- storage/exchange-component.c	10 Jun 2005 11:35:34 -0000	1.8
+++ storage/exchange-component.c	9 Jul 2005 13:42:58 -0000
@@ -32,7 +32,7 @@
 //#include "e-storage-set.h"
 //#include "e-storage-set-view.h"
 
-#include <exchange-account.h>
+#include <exchange/exchange-account.h>
 #include <exchange-constants.h>
 #include "exchange-config-listener.h"
 #include "exchange-oof.h"
@@ -248,6 +248,7 @@ new_connection (MailStubListener *listen
 	MailStub *mse;
 	ExchangeAccount *account = baccount->account;
 	int mode;
+	ExchangeAccountResult result;
 
 	g_object_ref (account);
 
@@ -257,7 +258,7 @@ new_connection (MailStubListener *listen
 		goto end;
 	}
 
-	if (exchange_account_connect (account))
+	if (exchange_account_connect (account, &result)) /* FIXME: error not handled. */
 		mse = mail_stub_exchange_new (account, cmd_fd, status_fd);
 	else {
 		close (cmd_fd);
Index: storage/exchange-config-listener.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/storage/exchange-config-listener.c,v
retrieving revision 1.24
diff -u -p -r1.24 exchange-config-listener.c
--- storage/exchange-config-listener.c	1 Jul 2005 05:52:51 -0000	1.24
+++ storage/exchange-config-listener.c	9 Jul 2005 13:42:58 -0000
@@ -28,7 +28,7 @@
 
 #include "exchange-config-listener.h"
 
-#include <exchange-account.h>
+#include <exchange/exchange-account.h>
 #include <e-folder-exchange.h>
 #include <e2k-marshal.h>
 #include <e2k-uri.h>
@@ -764,6 +764,7 @@ account_added (EAccountList *account_lis
 {
 	ExchangeConfigListener *config_listener;
 	ExchangeAccount *exchange_account;
+	ExchangeAccountResult result;
 
 	if (!is_active_exchange_account (account))
 		return;
@@ -802,7 +803,7 @@ account_added (EAccountList *account_lis
 	g_signal_emit (config_listener, signals[EXCHANGE_ACCOUNT_CREATED], 0,
 		       exchange_account);
 	//add_sources (exchange_account);
-	exchange_account_connect (exchange_account);
+ 	exchange_account_connect (exchange_account, &result); /* FIXME: error not handled. */
 }
 
 struct account_update_data {
Index: storage/exchange-storage.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/storage/exchange-storage.c,v
retrieving revision 1.2
diff -u -p -r1.2 exchange-storage.c
--- storage/exchange-storage.c	4 Feb 2005 11:29:45 -0000	1.2
+++ storage/exchange-storage.c	9 Jul 2005 13:42:58 -0000
@@ -23,8 +23,9 @@
 #include <config.h>
 #endif
 
+#include <exchange/exchange-account.h>
+
 #include "exchange-storage.h"
-#include "exchange-account.h"
 #include "exchange-hierarchy.h"
 #include "e-folder-exchange.h"
 
@@ -224,10 +225,11 @@ idle_open_folder (gpointer user_data)
 	ExchangeStorage *exstorage = EXCHANGE_STORAGE (ofd->storage);
 	ExchangeAccount *account = exstorage->priv->account;
 	ExchangeAccountFolderResult result;
+	ExchangeAccountResult res;
 	E2kContext *ctx;
 
 	if (!strcmp (ofd->path, "/")) {
-		ctx = exchange_account_connect (account);
+		ctx = exchange_account_connect (account, &res); /* FIXME: error not handled. */
 		result = ctx ?
 			E_STORAGE_OK :
 			E_STORAGE_NOTONLINE;
Index: storage/xc-commands.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/storage/xc-commands.c,v
retrieving revision 1.18
diff -u -p -r1.18 xc-commands.c
--- storage/xc-commands.c	2 Jul 2005 07:38:15 -0000	1.18
+++ storage/xc-commands.c	9 Jul 2005 13:42:58 -0000
@@ -71,6 +71,7 @@ do_change_password (BonoboUIComponent *c
 {
 	XCBackendView *view = user_data;
 	ExchangeAccount *account;
+	ExchangeAccountResult result;
 	char *old_password, *new_password;
 
 	account = xc_backend_view_get_selected_account (view);
@@ -78,7 +79,7 @@ do_change_password (BonoboUIComponent *c
 	old_password = exchange_account_get_password (account);
 	new_password = exchange_get_new_password (old_password, 1);
 
-	exchange_account_set_password (account, old_password, new_password);
+	result = exchange_account_set_password (account, old_password, new_password); /* FIXME: error not handled. */
 
 	g_free (old_password);
 	g_free (new_password);


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