GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
libgncmod-customer_import.c
1 /*********************************************************************
2  * gncmod-customer_import.c
3  * module definition/initialization for the customer_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"
41 
42 GNC_MODULE_API_DECL(libgncmod_customer_import);
43 
44 /* version of the gnc module system interface we require */
45 int libgncmod_customer_import_gnc_module_system_interface = 0;
46 
47 /* module versioning uses libtool semantics. */
48 int libgncmod_customer_import_gnc_module_current = 0;
49 int libgncmod_customer_import_gnc_module_revision = 0;
50 int libgncmod_customer_import_gnc_module_age = 0;
51 
52 
53 char *
54 libgncmod_customer_import_gnc_module_path (void)
55 {
56  return g_strdup("gnucash/plugins/customer_import");
57 }
58 
59 char *
60 libgncmod_customer_import_gnc_module_description (void)
61 {
62  return g_strdup("The GnuCash customer_import plugin");
63 }
64 
65 int
66 libgncmod_customer_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/business-core", 0)) {
77  // return FALSE;
78  //}
79  if (!gnc_module_load ("gnucash/engine", 0))
80  {
81  return FALSE;
82  }
83 
84  if (refcount == 0)
85  {
86  /* this is the first time the module is loaded */
87 
90  }
91 
92  return TRUE;
93 }
94 
95 int
96 libgncmod_customer_import_gnc_module_end (int refcount)
97 {
98  if (refcount == 0)
99  {
100  /* this is the last time the module is unloaded */
101  }
102 
103  return TRUE;
104 }
GncPlugin * gnc_plugin_customer_import_new(void)
Plugin registration of the customer_import module.
Plugin management functions for the GnuCash UI.
void gnc_plugin_manager_add_plugin(GncPluginManager *manager, GncPlugin *plugin)
GncPluginManager * gnc_plugin_manager_get(void)