[evolution-mapi] Use e_backend_authenticate_sync() in backends.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Use e_backend_authenticate_sync() in backends.
- Date: Tue, 31 Jul 2012 23:18:11 +0000 (UTC)
commit 25f3b8cf347fe66e1818f5177c105e87ea3e04a5
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Jul 31 19:01:38 2012 -0400
Use e_backend_authenticate_sync() in backends.
src/addressbook/e-book-backend-mapi.c | 8 ++------
src/calendar/e-cal-backend-mapi.c | 8 ++------
src/collection/e-mapi-backend.c | 20 ++++----------------
3 files changed, 8 insertions(+), 28 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-mapi.c b/src/addressbook/e-book-backend-mapi.c
index 2957842..7302c8d 100644
--- a/src/addressbook/e-book-backend-mapi.c
+++ b/src/addressbook/e-book-backend-mapi.c
@@ -448,12 +448,8 @@ e_book_backend_mapi_ensure_connected (EBookBackendMAPI *ebma,
if (!camel_mapi_settings_get_kerberos (settings) ||
ebbm_connect_user (ebma, cancellable, NULL, &local_error) != E_SOURCE_AUTHENTICATION_ACCEPTED) {
- ESourceRegistry *registry;
-
- registry = e_book_backend_get_registry (E_BOOK_BACKEND (ebma));
-
- e_source_registry_authenticate_sync (
- registry, e_backend_get_source (E_BACKEND (ebma)),
+ e_backend_authenticate_sync (
+ E_BACKEND (ebma),
E_SOURCE_AUTHENTICATOR (ebma),
cancellable, &local_error);
}
diff --git a/src/calendar/e-cal-backend-mapi.c b/src/calendar/e-cal-backend-mapi.c
index 79f0a7a..3112c1a 100644
--- a/src/calendar/e-cal-backend-mapi.c
+++ b/src/calendar/e-cal-backend-mapi.c
@@ -1321,12 +1321,8 @@ e_cal_backend_mapi_ensure_connected (ECalBackendMAPI *cbma,
if (!camel_mapi_settings_get_kerberos (settings) ||
ecbm_connect_user (E_CAL_BACKEND (cbma), cancellable, NULL, &local_error) != E_SOURCE_AUTHENTICATION_ACCEPTED) {
- ESourceRegistry *registry;
-
- registry = e_cal_backend_get_registry (E_CAL_BACKEND (cbma));
-
- e_source_registry_authenticate_sync (
- registry, e_backend_get_source (E_BACKEND (cbma)),
+ e_backend_authenticate_sync (
+ E_BACKEND (cbma),
E_SOURCE_AUTHENTICATOR (cbma),
cancellable, &local_error);
}
diff --git a/src/collection/e-mapi-backend.c b/src/collection/e-mapi-backend.c
index 9f8155e..f207df3 100644
--- a/src/collection/e-mapi-backend.c
+++ b/src/collection/e-mapi-backend.c
@@ -68,26 +68,14 @@ mapi_backend_get_settings (EMapiBackend *backend)
static void
mapi_backend_queue_auth_session (EMapiBackend *backend)
{
- ESourceRegistryServer *server;
- EAuthenticationSession *session;
- ESource *source;
-
backend->priv->need_update_folders = FALSE;
- server = e_collection_backend_ref_server (E_COLLECTION_BACKEND (backend));
- source = e_backend_get_source (E_BACKEND (backend));
-
- session = e_authentication_session_new (
- server, E_SOURCE_AUTHENTICATOR (backend),
- e_source_get_uid (source));
-
/* For now at least, we don't need to know the
* results, so no callback function is needed. */
- e_source_registry_server_authenticate (
- server, session, NULL, NULL, NULL);
-
- g_object_unref (session);
- g_object_unref (server);
+ e_backend_authenticate (
+ E_BACKEND (backend),
+ E_SOURCE_AUTHENTICATOR (backend),
+ NULL, NULL, NULL);
}
struct SyndFoldersData
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]