[evolution-data-server] EDataBookFactory: Implement GInitable.



commit b3132ee14a442004d0dc89a62f245d0ae5ee0d57
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Apr 16 10:53:40 2012 -0400

    EDataBookFactory: Implement GInitable.
    
    Not needed just yet, but my previous batch of commits broke this
    and it's needed on the account-mgmt branch.  So rough it in now.

 addressbook/libedata-book/e-data-book-factory.c |   30 +++++++++++++++++++++-
 1 files changed, 28 insertions(+), 2 deletions(-)
---
diff --git a/addressbook/libedata-book/e-data-book-factory.c b/addressbook/libedata-book/e-data-book-factory.c
index 80af3a0..a900036 100644
--- a/addressbook/libedata-book/e-data-book-factory.c
+++ b/addressbook/libedata-book/e-data-book-factory.c
@@ -48,8 +48,6 @@
 	(G_TYPE_INSTANCE_GET_PRIVATE \
 	((obj), E_TYPE_DATA_BOOK_FACTORY, EDataBookFactoryPrivate))
 
-G_DEFINE_TYPE (EDataBookFactory, e_data_book_factory, E_TYPE_DATA_FACTORY);
-
 struct _EDataBookFactoryPrivate {
 	EGdbusBookFactory *gdbus_object;
 
@@ -67,6 +65,18 @@ struct _EDataBookFactoryPrivate {
 #endif
 };
 
+/* Forward Declarations */
+static void	e_data_book_factory_initable_init
+						(GInitableIface *interface);
+
+G_DEFINE_TYPE_WITH_CODE (
+	EDataBookFactory,
+	e_data_book_factory,
+	E_TYPE_DATA_FACTORY,
+	G_IMPLEMENT_INTERFACE (
+		G_TYPE_INITABLE,
+		e_data_book_factory_initable_init))
+
 static gchar *
 e_data_book_factory_extract_proto_from_uri (const gchar *uri)
 {
@@ -412,6 +422,16 @@ data_book_factory_bus_name_lost (EDBusServer *server,
 		bus_name_lost (server, connection);
 }
 
+static gboolean
+data_book_factory_initable_init (GInitable *initable,
+                                 GCancellable *cancellable,
+                                 GError **error)
+{
+	/* XXX Nothing to do here just yet.  More to come soon. */
+
+	return TRUE;
+}
+
 static void
 e_data_book_factory_class_init (EDataBookFactoryClass *class)
 {
@@ -435,6 +455,12 @@ e_data_book_factory_class_init (EDataBookFactoryClass *class)
 	data_factory_class->backend_factory_type = E_TYPE_BOOK_BACKEND_FACTORY;
 }
 
+static void
+e_data_book_factory_initable_init (GInitableIface *interface)
+{
+	interface->init = data_book_factory_initable_init;
+}
+
 #ifdef HAVE_GOA
 static void
 e_data_book_factory_update_goa_accounts (EDataBookFactory *factory)



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