GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gncmod-csv-export.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-module.h"
31 #include "gnc-module-api.h"
32 #include "gnc-plugin-csv-export.h"
33 
34 GNC_MODULE_API_DECL(libgncmod_csv_export)
35 
36 /* version of the gnc module system interface we require */
37 int libgncmod_csv_export_gnc_module_system_interface = 0;
38 
39 /* module versioning uses libtool semantics. */
40 int libgncmod_csv_export_gnc_module_current = 0;
41 int libgncmod_csv_export_gnc_module_revision = 0;
42 int libgncmod_csv_export_gnc_module_age = 0;
43 
44 //static GNCModule bus_core;
45 //static GNCModule file;
46 
47 char *
48 libgncmod_csv_export_gnc_module_path(void)
49 {
50  return g_strdup("gnucash/import-export/csv-export");
51 }
52 
53 char *
54 libgncmod_csv_export_gnc_module_description(void)
55 {
56  return g_strdup("Gnome GUI and C code for CSV exporter.");
57 }
58 
59 int
60 libgncmod_csv_export_gnc_module_init(int refcount)
61 {
62  if (!gnc_module_load("gnucash/engine", 0))
63  {
64  return FALSE;
65  }
66  if (!gnc_module_load("gnucash/app-utils", 0))
67  {
68  return FALSE;
69  }
70  if (!gnc_module_load("gnucash/gnome-utils", 0))
71  {
72  return FALSE;
73  }
74  if (!gnc_module_load("gnucash/import-export", 0))
75  {
76  return FALSE;
77  }
78 
79  /* Add menu items with C callbacks */
80  gnc_plugin_csv_export_create_plugin();
81 
82  return TRUE;
83 }
84 
85 int
86 libgncmod_csv_export_gnc_module_end(int refcount)
87 {
88  return TRUE;
89 }