[evolution-data-server] EDataFactory: Add 'backend_factory_type' class member.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] EDataFactory: Add 'backend_factory_type' class member.
- Date: Sun, 15 Apr 2012 18:14:49 +0000 (UTC)
commit defd7692d83a1813d64205e32166ca9f253f6a7f
Author: Matthew Barnes <mbarnes redhat com>
Date: Sun Apr 15 12:12:29 2012 -0400
EDataFactory: Add 'backend_factory_type' class member.
Subclasses may now specify exactly what type of backend factories to
instantiate by setting the 'backend_factory_type' class member, which
defaults to E_TYPE_BACKEND_FACTORY.
Note that because sizeof(GType) and sizeof(gpointer) are not necessarily
equal, the reserved pointer pool at the end of the class struct does not
help us avoid an ABI break in this case. But the libebackend's ABI has
already been broken since 3.4.0.
libebackend/e-data-factory.c | 6 +++++-
libebackend/e-data-factory.h | 2 ++
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libebackend/e-data-factory.c b/libebackend/e-data-factory.c
index 8f27afd..0d5be47 100644
--- a/libebackend/e-data-factory.c
+++ b/libebackend/e-data-factory.c
@@ -99,9 +99,11 @@ data_factory_finalize (GObject *object)
static void
data_factory_constructed (GObject *object)
{
+ EDataFactoryClass *class;
EDataFactoryPrivate *priv;
GList *list, *link;
+ class = E_DATA_FACTORY_GET_CLASS (object);
priv = E_DATA_FACTORY_GET_PRIVATE (object);
/* Chain up to parent's constructed() method. */
@@ -110,7 +112,7 @@ data_factory_constructed (GObject *object)
/* Collect all backend factories into a hash table. */
list = e_extensible_list_extensions (
- E_EXTENSIBLE (object), E_TYPE_BACKEND_FACTORY);
+ E_EXTENSIBLE (object), class->backend_factory_type);
for (link = list; link != NULL; link = g_list_next (link)) {
EBackendFactory *backend_factory;
@@ -165,6 +167,8 @@ e_data_factory_class_init (EDataFactoryClass *class)
dbus_server_class = E_DBUS_SERVER_CLASS (class);
dbus_server_class->quit_server = data_factory_quit_server;
+
+ class->backend_factory_type = E_TYPE_BACKEND_FACTORY;
}
static void
diff --git a/libebackend/e-data-factory.h b/libebackend/e-data-factory.h
index 0ed5682..3788789 100644
--- a/libebackend/e-data-factory.h
+++ b/libebackend/e-data-factory.h
@@ -63,6 +63,8 @@ struct _EDataFactory {
struct _EDataFactoryClass {
EDBusServerClass parent_class;
+ GType backend_factory_type;
+
gpointer reserved[16];
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]