"Fossies" - the Fresh Open Source Software Archive

Member "evolution-mapi-3.46.1/src/calendar/e-cal-backend-mapi-factory.c" (2 Dec 2022, 4543 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-cal-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  *    Suman Manjunath <msuman@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-cal/libedata-cal.h>
   29 
   30 #include "e-source-mapi-folder.h"
   31 #include "e-cal-backend-mapi.h"
   32 
   33 #define FACTORY_NAME "mapi"
   34 
   35 typedef ECalBackendFactory ECalBackendMapiEventsFactory;
   36 typedef ECalBackendFactoryClass ECalBackendMapiEventsFactoryClass;
   37 
   38 typedef ECalBackendFactory ECalBackendMapiJournalFactory;
   39 typedef ECalBackendFactoryClass ECalBackendMapiJournalFactoryClass;
   40 
   41 typedef ECalBackendFactory ECalBackendMapiTodosFactory;
   42 typedef ECalBackendFactoryClass ECalBackendMapiTodosFactoryClass;
   43 
   44 static EModule *e_module;
   45 
   46 /* Module Entry Points */
   47 void e_module_load (GTypeModule *type_module);
   48 void e_module_unload (GTypeModule *type_module);
   49 
   50 /* Forward Declarations */
   51 GType e_cal_backend_mapi_events_factory_get_type (void);
   52 GType e_cal_backend_mapi_journal_factory_get_type (void);
   53 GType e_cal_backend_mapi_todos_factory_get_type (void);
   54 
   55 G_DEFINE_DYNAMIC_TYPE (
   56     ECalBackendMapiEventsFactory,
   57     e_cal_backend_mapi_events_factory,
   58     E_TYPE_CAL_BACKEND_FACTORY)
   59 
   60 G_DEFINE_DYNAMIC_TYPE (
   61     ECalBackendMapiJournalFactory,
   62     e_cal_backend_mapi_journal_factory,
   63     E_TYPE_CAL_BACKEND_FACTORY)
   64 
   65 G_DEFINE_DYNAMIC_TYPE (
   66     ECalBackendMapiTodosFactory,
   67     e_cal_backend_mapi_todos_factory,
   68     E_TYPE_CAL_BACKEND_FACTORY)
   69 
   70 static void
   71 e_cal_backend_mapi_events_factory_class_init (ECalBackendFactoryClass *class)
   72 {
   73     EBackendFactoryClass *backend_factory_class;
   74 
   75     backend_factory_class = E_BACKEND_FACTORY_CLASS (class);
   76     backend_factory_class->e_module = e_module;
   77     backend_factory_class->share_subprocess = TRUE;
   78 
   79     class->factory_name = FACTORY_NAME;
   80     class->component_kind = I_CAL_VEVENT_COMPONENT;
   81     class->backend_type = E_TYPE_CAL_BACKEND_MAPI;
   82 }
   83 
   84 static void
   85 e_cal_backend_mapi_events_factory_class_finalize (ECalBackendFactoryClass *class)
   86 {
   87 }
   88 
   89 static void
   90 e_cal_backend_mapi_events_factory_init (ECalBackendFactory *factory)
   91 {
   92 }
   93 
   94 static void
   95 e_cal_backend_mapi_journal_factory_class_init (ECalBackendFactoryClass *class)
   96 {
   97     EBackendFactoryClass *backend_factory_class;
   98 
   99     backend_factory_class = E_BACKEND_FACTORY_CLASS (class);
  100     backend_factory_class->e_module = e_module;
  101     backend_factory_class->share_subprocess = TRUE;
  102 
  103     class->factory_name = FACTORY_NAME;
  104     class->component_kind = I_CAL_VJOURNAL_COMPONENT;
  105     class->backend_type = E_TYPE_CAL_BACKEND_MAPI;
  106 }
  107 
  108 static void
  109 e_cal_backend_mapi_journal_factory_class_finalize (ECalBackendFactoryClass *class)
  110 {
  111 }
  112 
  113 static void
  114 e_cal_backend_mapi_journal_factory_init (ECalBackendFactory *factory)
  115 {
  116 }
  117 
  118 static void
  119 e_cal_backend_mapi_todos_factory_class_init (ECalBackendFactoryClass *class)
  120 {
  121     EBackendFactoryClass *backend_factory_class;
  122 
  123     backend_factory_class = E_BACKEND_FACTORY_CLASS (class);
  124     backend_factory_class->e_module = e_module;
  125     backend_factory_class->share_subprocess = TRUE;
  126 
  127     class->factory_name = FACTORY_NAME;
  128     class->component_kind = I_CAL_VTODO_COMPONENT;
  129     class->backend_type = E_TYPE_CAL_BACKEND_MAPI;
  130 }
  131 
  132 static void
  133 e_cal_backend_mapi_todos_factory_class_finalize (ECalBackendFactoryClass *class)
  134 {
  135 }
  136 
  137 static void
  138 e_cal_backend_mapi_todos_factory_init (ECalBackendFactory *factory)
  139 {
  140 }
  141 
  142 G_MODULE_EXPORT void
  143 e_module_load (GTypeModule *type_module)
  144 {
  145     bindtextdomain (GETTEXT_PACKAGE, EXCHANGE_MAPI_LOCALEDIR);
  146     bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
  147 
  148     e_module = E_MODULE (type_module);
  149 
  150     e_source_mapi_folder_type_register (type_module);
  151 
  152     e_cal_backend_mapi_events_factory_register_type (type_module);
  153     e_cal_backend_mapi_journal_factory_register_type (type_module);
  154     e_cal_backend_mapi_todos_factory_register_type (type_module);
  155 }
  156 
  157 G_MODULE_EXPORT void
  158 e_module_unload (GTypeModule *type_module)
  159 {
  160     e_module = NULL;
  161 }
  162