Debian Codegraph @

src/EWS/addressbook/e-book-backend-ews-factory.c

raw
1 /*
2 * SPDX-FileCopyrightText: (C) 1999-2008 Novell, Inc. (www.novell.com)
3 * SPDX-FileContributor: Chris Toshok <[email protected]>
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6
7 #include "evolution-ews-config.h"
8
9 #include <glib/gi18n-lib.h>
10
11 #include <libedata-book/libedata-book.h>
12
13 #include "common/e-oauth2-service-office365.h"
14 #include "common/e-source-ews-folder.h"
15
16 #include "e-book-backend-ews.h"
17
18 typedef EBookBackendFactory EBookBackendEwsFactory;
19 typedef EBookBackendFactoryClass EBookBackendEwsFactoryClass;
20
21 static EModule *e_module;
22
23 /* Module Entry Points */
24 void e_module_load (GTypeModule *type_module);
25 void e_module_unload (GTypeModule *type_module);
26
27 /* Forward Declarations */
28 GType e_book_backend_ews_factory_get_type (void);
29
30 G_DEFINE_DYNAMIC_TYPE (
31 EBookBackendEwsFactory,
32 e_book_backend_ews_factory,
33 E_TYPE_BOOK_BACKEND_FACTORY)
34
35 static void
36 e_book_backend_ews_factory_class_init (EBookBackendFactoryClass *class)
37 {
38 EBackendFactoryClass *backend_factory_class;
39
40 backend_factory_class = E_BACKEND_FACTORY_CLASS (class);
41 backend_factory_class->e_module = e_module;
42 backend_factory_class->share_subprocess = TRUE;
43
44 class->factory_name = "ews";
45 class->backend_type = E_TYPE_BOOK_BACKEND_EWS;
46 }
47
48 static void
49 e_book_backend_ews_factory_class_finalize (EBookBackendFactoryClass *class)
50 {
51 }
52
53 static void
54 e_book_backend_ews_factory_init (EBookBackendFactory *factory)
55 {
56 }
57
58 G_MODULE_EXPORT void
59 e_module_load (GTypeModule *type_module)
60 {
61 bindtextdomain (GETTEXT_PACKAGE, EXCHANGE_EWS_LOCALEDIR);
62 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
63
64 e_module = E_MODULE (type_module);
65
66 e_source_ews_folder_type_register (type_module);
67 e_oauth2_service_office365_type_register (type_module);
68
69 e_book_backend_ews_factory_register_type (type_module);
70 }
71
72 G_MODULE_EXPORT void
73 e_module_unload (GTypeModule *type_module)
74 {
75 e_module = NULL;
76 }