GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gncmod-bi-import.c
1 /*********************************************************************
2  * gncmod-bi-import.c
3  * module definition/initialization for the bi-import GNOME UI module
4  *
5  * Copyright (c) 2009 Sebastian Held <[email protected]>
6  * Copyright (c) 2001 Derek Atkins <[email protected]>
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of
11  * the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, contact:
20  *
21  * Free Software Foundation Voice: +1-617-542-5942
22  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
23  * Boston, MA 02110-1301, USA [email protected]
24  *
25  *********************************************************************/
26 
27 #ifdef HAVE_CONFIG_H
28 #include <config.h>
29 #endif
30 
31 #include <gmodule.h>
32 #include <gtk/gtk.h>
33 #include <glib/gi18n.h>
34 
35 #include "gnc-hooks.h"
36 #include "gnc-module.h"
37 #include "gnc-module-api.h"
38 
39 #include "gnc-plugin-manager.h"
40 #include "gnc-plugin-bi-import.h"
41 
42 GNC_MODULE_API_DECL(libgncmod_bi_import);
43 
44 /* version of the gnc module system interface we require */
45 int libgncmod_bi_import_gnc_module_system_interface = 0;
46 
47 /* module versioning uses libtool semantics. */
48 int libgncmod_bi_import_gnc_module_current = 0;
49 int libgncmod_bi_import_gnc_module_revision = 0;
50 int libgncmod_bi_import_gnc_module_age = 0;
51 
52 
53 char *
54 libgncmod_bi_import_gnc_module_path (void)
55 {
56  return g_strdup("gnucash/plugins/bi_import");
57 }
58 
59 char *
60 libgncmod_bi_import_gnc_module_description (void)
61 {
62  return g_strdup("The GnuCash bi_import plugin");
63 }
64 
65 int
66 libgncmod_bi_import_gnc_module_init (int refcount)
67 {
68  if (!gnc_module_load ("gnucash/app-utils", 0))
69  {
70  return FALSE;
71  }
72  if (!gnc_module_load ("gnucash/gnome-utils", 0))
73  {
74  return FALSE;
75  }
76  if (!gnc_module_load ("gnucash/engine", 0))
77  {
78  return FALSE;
79  }
80 
81  if (refcount == 0)
82  {
83  /* this is the first time the module is loaded */
84 
87  }
88 
89  return TRUE;
90 }
91 
92 int
93 libgncmod_bi_import_gnc_module_end (int refcount)
94 {
95  if (refcount == 0)
96  {
97  /* this is the last time the module is unloaded */
98  }
99 
100  return TRUE;
101 }
Plugin management functions for the GnuCash UI.
void gnc_plugin_manager_add_plugin(GncPluginManager *manager, GncPlugin *plugin)
GncPlugin * gnc_plugin_bi_import_new(void)
GncPluginManager * gnc_plugin_manager_get(void)
Plugin registration of the bi-import module.