[evolution-kolab] Replace e_book_backend_notify_auth_required().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab] Replace e_book_backend_notify_auth_required().
- Date: Thu, 12 Jul 2012 12:41:49 +0000 (UTC)
commit d5e936cb12a5a197dc9fde26cdaceebb6d7e51b4
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Jun 29 14:52:38 2012 -0400
Replace e_book_backend_notify_auth_required().
Instead call e_source_registry_authenticate_sync(), passing the
KolabMailAccess instance as the ESourceAuthenticator.
src/addressbook/e-book-backend-kolab.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-kolab.c b/src/addressbook/e-book-backend-kolab.c
index 54ee1a4..3dce66f 100644
--- a/src/addressbook/e-book-backend-kolab.c
+++ b/src/addressbook/e-book-backend-kolab.c
@@ -231,6 +231,7 @@ e_book_backend_kolab_open (EBookBackendSync *backend,
{
EBookBackendKolab *self = NULL;
EBookBackendKolabPrivate *priv = NULL;
+ ESourceRegistry *registry;
ESource *esource = NULL;
CamelKolabIMAPXSettings *kolab_settings;
CamelNetworkSettings *network_settings;
@@ -258,11 +259,7 @@ e_book_backend_kolab_open (EBookBackendSync *backend,
g_mutex_lock (&koma_objects_lock);
- /* to trigger eds to pass along username and password, set the property
- * "auth" to "true" in the source setting:
- * <property name="auth" value="true"/>
- * <property name="username" value="..."/>
- */
+ registry = e_book_backend_get_registry (E_BOOK_BACKEND (backend));
esource = e_backend_get_source (E_BACKEND (backend));
if (! E_IS_SOURCE (esource)) {
@@ -414,10 +411,16 @@ e_book_backend_kolab_open (EBookBackendSync *backend,
return;
}
- /* do we need authentication data? if so, notify and return */
+ /* authenticate now if required */
if (auth_required) {
- e_book_backend_notify_auth_required (E_BOOK_BACKEND (self), TRUE, NULL);
- return;
+ ESourceAuthenticator *authenticator;
+
+ authenticator = E_SOURCE_AUTHENTICATOR (priv->book_koma);
+
+ ok = e_source_registry_authenticate_sync (
+ registry, esource, authenticator, cancellable, error);
+ if (!ok)
+ return;
}
/* all good, notify that we're open for business */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]