[evolution-data-server] EBookBackend: Implement authenticate_sync() method.



commit caf83caae6d3a5a1ad07542932fefb8285ea24df
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue Jul 31 17:45:35 2012 -0400

    EBookBackend: Implement authenticate_sync() method.

 addressbook/libedata-book/e-book-backend.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-backend.c b/addressbook/libedata-book/e-book-backend.c
index ebe55b5..83fd371 100644
--- a/addressbook/libedata-book/e-book-backend.c
+++ b/addressbook/libedata-book/e-book-backend.c
@@ -203,6 +203,24 @@ book_backend_finalize (GObject *object)
 }
 
 static gboolean
+book_backend_authenticate_sync (EBackend *backend,
+                                ESourceAuthenticator *auth,
+                                GCancellable *cancellable,
+                                GError **error)
+{
+	EBookBackend *book_backend;
+	ESourceRegistry *registry;
+	ESource *source;
+
+	book_backend = E_BOOK_BACKEND (backend);
+	registry = e_book_backend_get_registry (book_backend);
+	source = e_backend_get_source (backend);
+
+	return e_source_registry_authenticate_sync (
+		registry, source, auth, cancellable, error);
+}
+
+static gboolean
 view_notify_update (EDataBookView *view,
                     gpointer contact)
 {
@@ -222,6 +240,7 @@ static void
 e_book_backend_class_init (EBookBackendClass *class)
 {
 	GObjectClass *object_class;
+	EBackendClass *backend_class;
 
 	g_type_class_add_private (class, sizeof (EBookBackendPrivate));
 
@@ -231,6 +250,9 @@ e_book_backend_class_init (EBookBackendClass *class)
 	object_class->dispose = book_backend_dispose;
 	object_class->finalize = book_backend_finalize;
 
+	backend_class = E_BACKEND_CLASS (class);
+	backend_class->authenticate_sync = book_backend_authenticate_sync;
+
 	class->get_backend_property = book_backend_get_backend_property;
 	class->set_backend_property = book_backend_set_backend_property;
 	class->notify_update        = book_backend_notify_update;



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