EDataBookFactory: Implement GInitable.
authorMatthew Barnes <mbarnes@redhat.com>
Mon, 16 Apr 2012 14:53:40 +0000 (10:53 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Mon, 16 Apr 2012 14:53:40 +0000 (10:53 -0400)
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

index 80af3a0..a900036 100644 (file)
@@ -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)