[evolution-ews] Adapt evolution-ews to support backend-per-process
- From: Fabiano Fidêncio <ffidencio src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Adapt evolution-ews to support backend-per-process
- Date: Fri, 11 Jul 2014 07:34:23 +0000 (UTC)
commit dcb6d20036d6b9b71241b75bc89659340165c420
Author: Fabiano Fidêncio <fidencio redhat com>
Date: Thu Jul 10 01:21:28 2014 +0200
Adapt evolution-ews to support backend-per-process
https://bugzilla.gnome.org/show_bug.cgi?id=732948
src/addressbook/e-book-backend-ews-factory.c | 11 +++++++++++
src/calendar/e-cal-backend-ews-factory.c | 23 +++++++++++++++++++++++
2 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews-factory.c b/src/addressbook/e-book-backend-ews-factory.c
index c5f23a7..188081c 100644
--- a/src/addressbook/e-book-backend-ews-factory.c
+++ b/src/addressbook/e-book-backend-ews-factory.c
@@ -36,6 +36,8 @@
typedef EBookBackendFactory EBookBackendEwsFactory;
typedef EBookBackendFactoryClass EBookBackendEwsFactoryClass;
+static EModule *e_module;
+
/* Module Entry Points */
void e_module_load (GTypeModule *type_module);
void e_module_unload (GTypeModule *type_module);
@@ -51,6 +53,12 @@ G_DEFINE_DYNAMIC_TYPE (
static void
e_book_backend_ews_factory_class_init (EBookBackendFactoryClass *class)
{
+ EBackendFactoryClass *backend_factory_class;
+
+ backend_factory_class = E_BACKEND_FACTORY_CLASS (class);
+ backend_factory_class->e_module = e_module;
+ backend_factory_class->share_subprocess = TRUE;
+
class->factory_name = "ews";
class->backend_type = E_TYPE_BOOK_BACKEND_EWS;
}
@@ -71,6 +79,8 @@ e_module_load (GTypeModule *type_module)
bindtextdomain (GETTEXT_PACKAGE, EXCHANGE_EWS_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ e_module = E_MODULE (type_module);
+
e_source_ews_folder_type_register (type_module);
e_book_backend_ews_factory_register_type (type_module);
@@ -79,4 +89,5 @@ e_module_load (GTypeModule *type_module)
G_MODULE_EXPORT void
e_module_unload (GTypeModule *type_module)
{
+ e_module = NULL;
}
diff --git a/src/calendar/e-cal-backend-ews-factory.c b/src/calendar/e-cal-backend-ews-factory.c
index fdba1b1..c816029 100644
--- a/src/calendar/e-cal-backend-ews-factory.c
+++ b/src/calendar/e-cal-backend-ews-factory.c
@@ -29,6 +29,8 @@ typedef ECalBackendFactoryClass ECalBackendEwsJournalFactoryClass;
typedef ECalBackendFactory ECalBackendEwsTodosFactory;
typedef ECalBackendFactoryClass ECalBackendEwsTodosFactoryClass;
+static EModule *e_module;
+
/* Module Entry Points */
void e_module_load (GTypeModule *type_module);
void e_module_unload (GTypeModule *type_module);
@@ -56,6 +58,12 @@ G_DEFINE_DYNAMIC_TYPE (
static void
e_cal_backend_ews_events_factory_class_init (ECalBackendFactoryClass *class)
{
+ EBackendFactoryClass *backend_factory_class;
+
+ backend_factory_class = E_BACKEND_FACTORY_CLASS (class);
+ backend_factory_class->e_module = e_module;
+ backend_factory_class->share_subprocess = TRUE;
+
class->factory_name = FACTORY_NAME;
class->component_kind = ICAL_VEVENT_COMPONENT;
class->backend_type = E_TYPE_CAL_BACKEND_EWS;
@@ -74,6 +82,12 @@ e_cal_backend_ews_events_factory_init (ECalBackendFactory *factory)
static void
e_cal_backend_ews_journal_factory_class_init (ECalBackendFactoryClass *class)
{
+ EBackendFactoryClass *backend_factory_class;
+
+ backend_factory_class = E_BACKEND_FACTORY_CLASS (class);
+ backend_factory_class->e_module = e_module;
+ backend_factory_class->share_subprocess = TRUE;
+
class->factory_name = FACTORY_NAME;
class->component_kind = ICAL_VJOURNAL_COMPONENT;
class->backend_type = E_TYPE_CAL_BACKEND_EWS;
@@ -92,6 +106,12 @@ e_cal_backend_ews_journal_factory_init (ECalBackendFactory *factory)
static void
e_cal_backend_ews_todos_factory_class_init (ECalBackendFactoryClass *class)
{
+ EBackendFactoryClass *backend_factory_class;
+
+ backend_factory_class = E_BACKEND_FACTORY_CLASS (class);
+ backend_factory_class->e_module = e_module;
+ backend_factory_class->share_subprocess = TRUE;
+
class->factory_name = FACTORY_NAME;
class->component_kind = ICAL_VTODO_COMPONENT;
class->backend_type = E_TYPE_CAL_BACKEND_EWS;
@@ -113,6 +133,8 @@ e_module_load (GTypeModule *type_module)
bindtextdomain (GETTEXT_PACKAGE, EXCHANGE_EWS_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ e_module = E_MODULE (type_module);
+
e_source_ews_folder_type_register (type_module);
e_cal_backend_ews_events_factory_register_type (type_module);
@@ -123,4 +145,5 @@ e_module_load (GTypeModule *type_module)
G_MODULE_EXPORT void
e_module_unload (GTypeModule *type_module)
{
+ e_module = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]