GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gncmod-ofx-import.c
1 /********************************************************************\
2  * This program is free software; you can redistribute it and/or *
3  * modify it under the terms of the GNU General Public License as *
4  * published by the Free Software Foundation; either version 2 of *
5  * the License, or (at your option) any later version. *
6  * *
7  * This program is distributed in the hope that it will be useful, *
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
10  * GNU General Public License for more details. *
11  * *
12  * You should have received a copy of the GNU General Public License*
13  * along with this program; if not, contact: *
14  * *
15  * Free Software Foundation Voice: +1-617-542-5942 *
16  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
17  * Boston, MA 02110-1301, USA [email protected] *
18 \********************************************************************/
26 #include "config.h"
27 
28 #include <gmodule.h>
29 
30 #include "gnc-ofx-import.h"
31 #include "gnc-module.h"
32 #include "gnc-module-api.h"
33 #include "gnc-plugin-ofx.h"
34 
35 GNC_MODULE_API_DECL(libgncmod_ofx)
36 
37 /* version of the gnc module system interface we require */
38 int libgncmod_ofx_gnc_module_system_interface = 0;
39 
40 /* module versioning uses libtool semantics. */
41 int libgncmod_ofx_gnc_module_current = 0;
42 int libgncmod_ofx_gnc_module_revision = 0;
43 int libgncmod_ofx_gnc_module_age = 0;
44 
45 //static GNCModule bus_core;
46 //static GNCModule file;
47 
48 
49 char *
50 libgncmod_ofx_gnc_module_path(void)
51 {
52  return g_strdup("gnucash/import-export/ofx");
53 }
54 
55 char *
56 libgncmod_ofx_gnc_module_description(void)
57 {
58  return g_strdup("Gnome GUI and C code for OFX importer using libofx");
59 }
60 
61 int
62 libgncmod_ofx_gnc_module_init(int refcount)
63 {
64  if (!gnc_module_load("gnucash/engine", 0))
65  {
66  return FALSE;
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/import-export", 0))
77  {
78  return FALSE;
79  }
80 
81  /* Add menu items with C callbacks */
82  gnc_plugin_ofx_create_plugin();
83 
84  return TRUE;
85 }
86 
87 int
88 libgncmod_ofx_gnc_module_end(int refcount)
89 {
90  return TRUE;
91 }
Ofx import module interface.