"Fossies" - the Fresh Open Source Software Archive

Member "evolution-mapi-3.46.1/src/addressbook/e-book-backend-mapi-factory.c" (2 Dec 2022, 3506 Bytes) of package /linux/misc/evolution-mapi-3.46.1.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "e-book-backend-mapi-factory.c" see the Fossies "Dox" file reference documentation.

    1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
    2 /*
    3  * This program is free software; you can redistribute it and/or
    4  * modify it under the terms of the GNU Lesser General Public
    5  * License as published by the Free Software Foundation; either
    6  * version 2 of the License, or (at your option) version 3.
    7  *
    8  * This program is distributed in the hope that it will be useful,
    9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   11  * Lesser General Public License for more details.
   12  *
   13  * You should have received a copy of the GNU Lesser General Public
   14  * License along with the program; if not, see <http://www.gnu.org/licenses/>
   15  *
   16  *
   17  * Authors:
   18  *    Srinivasa Ragavan <sragavan@novell.com>
   19  *
   20  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
   21  *
   22  */
   23 
   24 #include "evolution-mapi-config.h"
   25 
   26 #include <glib/gi18n-lib.h>
   27 
   28 #include <libedata-book/libedata-book.h>
   29 
   30 #include "e-book-backend-mapi-contacts.h"
   31 #include "e-book-backend-mapi-gal.h"
   32 #include "e-source-mapi-folder.h"
   33 
   34 typedef EBookBackendFactory EBookBackendMapiContactsFactory;
   35 typedef EBookBackendFactoryClass EBookBackendMapiContactsFactoryClass;
   36 
   37 typedef EBookBackendFactory EBookBackendMapiGalFactory;
   38 typedef EBookBackendFactoryClass EBookBackendMapiGalFactoryClass;
   39 
   40 static EModule *e_module;
   41 
   42 /* Module Entry Points */
   43 void e_module_load (GTypeModule *type_module);
   44 void e_module_unload (GTypeModule *type_module);
   45 
   46 /* Forward Declarations */
   47 GType e_book_backend_mapi_contacts_factory_get_type ();
   48 GType e_book_backend_mapi_gal_factory_get_type ();
   49 
   50 G_DEFINE_DYNAMIC_TYPE (
   51     EBookBackendMapiContactsFactory,
   52     e_book_backend_mapi_contacts_factory,
   53     E_TYPE_BOOK_BACKEND_FACTORY)
   54 
   55 G_DEFINE_DYNAMIC_TYPE (
   56     EBookBackendMapiGalFactory,
   57     e_book_backend_mapi_gal_factory,
   58     E_TYPE_BOOK_BACKEND_FACTORY)
   59 
   60 static void
   61 e_book_backend_mapi_contacts_factory_class_init (EBookBackendFactoryClass *class)
   62 {
   63     EBackendFactoryClass *backend_factory_class;
   64 
   65     backend_factory_class = E_BACKEND_FACTORY_CLASS (class);
   66     backend_factory_class->e_module = e_module;
   67     backend_factory_class->share_subprocess = TRUE;
   68 
   69     class->factory_name = "mapi";
   70     class->backend_type = E_TYPE_BOOK_BACKEND_MAPI_CONTACTS;
   71 }
   72 
   73 static void
   74 e_book_backend_mapi_contacts_factory_class_finalize (EBookBackendFactoryClass *class)
   75 {
   76 }
   77 
   78 static void
   79 e_book_backend_mapi_contacts_factory_init (EBookBackendFactory *factory)
   80 {
   81 }
   82 
   83 static void
   84 e_book_backend_mapi_gal_factory_class_init (EBookBackendFactoryClass *class)
   85 {
   86     EBackendFactoryClass *backend_factory_class;
   87 
   88     backend_factory_class = E_BACKEND_FACTORY_CLASS (class);
   89     backend_factory_class->e_module = e_module;
   90     backend_factory_class->share_subprocess = TRUE;
   91 
   92     class->factory_name = "mapigal";
   93     class->backend_type = E_TYPE_BOOK_BACKEND_MAPI_GAL;
   94 }
   95 
   96 static void
   97 e_book_backend_mapi_gal_factory_class_finalize (EBookBackendFactoryClass *class)
   98 {
   99 }
  100 
  101 static void
  102 e_book_backend_mapi_gal_factory_init (EBookBackendFactory *factory)
  103 {
  104 }
  105 
  106 G_MODULE_EXPORT void
  107 e_module_load (GTypeModule *type_module)
  108 {
  109     bindtextdomain (GETTEXT_PACKAGE, EXCHANGE_MAPI_LOCALEDIR);
  110     bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
  111 
  112     e_module = E_MODULE (type_module);
  113 
  114     e_source_mapi_folder_type_register (type_module);
  115 
  116     e_book_backend_mapi_contacts_factory_register_type (type_module);
  117     e_book_backend_mapi_gal_factory_register_type (type_module);
  118 }
  119 
  120 G_MODULE_EXPORT void
  121 e_module_unload (GTypeModule *type_module)
  122 {
  123     e_module = NULL;
  124 }
  125