[evolution-data-server] Make ECollectionBackend and ECollectionBackendFactory instantiable.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Make ECollectionBackend and ECollectionBackendFactory instantiable.
- Date: Mon, 28 Jan 2013 17:18:58 +0000 (UTC)
commit c0e7bfd277e0ee56a45a4125ec087ec24fa3ba47
Author: Matthew Barnes <mbarnes redhat com>
Date: Mon Jan 28 11:37:22 2013 -0500
Make ECollectionBackend and ECollectionBackendFactory instantiable.
ECollectionBackendFactory will use a backend name of "none" and will
instantiate an ECollectionBackend, which takes no action on its own.
Believe it or not, there's actually a use case for this.
GOA will soon add a provider for generic IMAP/SMTP accounts. Our GOA
module will support these accounts by configuring a collection source
with a backend name of "none" as well as mail account, mail identity,
and mail transport sources.
The mechanics of ESourceRegistryServer do require a collection backend
to support a collection source but the backend will have nothing to do.
libebackend/e-collection-backend-factory.c | 6 ++++--
libebackend/e-collection-backend.c | 13 ++++++-------
2 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/libebackend/e-collection-backend-factory.c b/libebackend/e-collection-backend-factory.c
index 2903a33..aaa7bbf 100644
--- a/libebackend/e-collection-backend-factory.c
+++ b/libebackend/e-collection-backend-factory.c
@@ -19,7 +19,7 @@
/**
* SECTION: e-collection-backend-factory
* @include: libebackend/libebackend.h
- * @short_description: An abstract base class for a data source collection
+ * @short_description: A base class for a data source collection
* backend factory
*
* #ECollectionBackendFactory is a type of #EBackendFactory for creating
@@ -33,7 +33,7 @@
#include <libebackend/e-collection-backend.h>
#include <libebackend/e-source-registry-server.h>
-G_DEFINE_ABSTRACT_TYPE (
+G_DEFINE_TYPE (
ECollectionBackendFactory,
e_collection_backend_factory,
E_TYPE_BACKEND_FACTORY)
@@ -135,6 +135,8 @@ e_collection_backend_factory_class_init (ECollectionBackendFactoryClass *class)
factory_class->get_hash_key = collection_backend_factory_get_hash_key;
factory_class->new_backend = collection_backend_factory_new_backend;
+ class->factory_name = "none";
+ class->backend_type = E_TYPE_COLLECTION_BACKEND;
class->prepare_mail = collection_backend_factory_prepare_mail;
}
diff --git a/libebackend/e-collection-backend.c b/libebackend/e-collection-backend.c
index 7a18cbb..c760e86 100644
--- a/libebackend/e-collection-backend.c
+++ b/libebackend/e-collection-backend.c
@@ -19,13 +19,12 @@
/**
* SECTION: e-collection-backend
* @include: libebackend/libebackend.h
- * @short_description: An abstract base class for a data source
- * collection backend
+ * @short_description: A base class for a data source collection backend
*
- * #ECollectionBackend is an abstract base class for backends which
- * manage a collection of data sources which collectively represent the
- * resources on a remote server. The resources can include any number
- * of private and shared email stores, calendars and address books.
+ * #ECollectionBackend is a base class for backends which manage a
+ * collection of data sources that collectively represent the resources
+ * on a remote server. The resources can include any number of private
+ * and shared email stores, calendars and address books.
*
* The backend's job is to synchronize local representations of remote
* resources by adding and removing #EServerSideSource instances in an
@@ -83,7 +82,7 @@ enum {
static guint signals[LAST_SIGNAL];
-G_DEFINE_ABSTRACT_TYPE (
+G_DEFINE_TYPE (
ECollectionBackend,
e_collection_backend,
E_TYPE_BACKEND)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]