GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gncmod-aqbanking.c
1 /*
2  * gncmod-aqbanking.c --
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of
7  * the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, contact:
16  *
17  * Free Software Foundation Voice: +1-617-542-5942
18  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
19  * Boston, MA 02110-1301, USA [email protected]
20  */
21 
30 #include "config.h"
31 #include <glib/gi18n.h>
32 
33 #include "gnc-ab-utils.h"
34 #include "gnc-module.h"
35 #include "gnc-module-api.h"
36 #include "gnc-plugin-aqbanking.h"
37 #include "dialog-preferences.h"
38 
39 GNC_MODULE_API_DECL(libgncmod_aqbanking)
40 
41 /* version of the gnc module system interface we require */
42 gint libgncmod_aqbanking_gnc_module_system_interface = 0;
43 
44 /* module versioning uses libtool semantics. */
45 gint libgncmod_aqbanking_gnc_module_current = 0;
46 gint libgncmod_aqbanking_gnc_module_revision = 0;
47 gint libgncmod_aqbanking_gnc_module_age = 0;
48 
49 gchar *
50 libgncmod_aqbanking_gnc_module_path(void)
51 {
52  return g_strdup("gnucash/import-export/aqbanking");
53 }
54 
55 gchar *
56 libgncmod_aqbanking_gnc_module_description(void)
57 {
58  return g_strdup("Support for Online Banking protocols");
59 }
60 
61 gint
62 libgncmod_aqbanking_gnc_module_init(gint refcount)
63 {
64  /* Load modules we depend on */
65  if (!gnc_module_load("gnucash/engine", 0)
66  || !gnc_module_load("gnucash/app-utils", 0)
67  || !gnc_module_load("gnucash/gnome-utils", 0)
68  || !gnc_module_load("gnucash/import-export", 0))
69  {
70  return FALSE;
71  }
72 
73  /* Add menu items with C callbacks */
75 
76 
77  /* Add AqBanking preferences to the preferences dialog */
78  gnc_preferences_add_to_page("dialog-ab.glade", "aqbanking_prefs",
79  _("Online Banking"));
80 
81  /* Initialize gwen library */
82  gnc_GWEN_Init();
83 
84  return 1;
85 }
86 
87 gint
88 libgncmod_aqbanking_gnc_module_end(gint refcount)
89 {
90  /* Delete the shared AB_BANKING object */
92 
93  /* Finalize gwen library */
94  gnc_GWEN_Fini();
95 
96  return 1;
97 }
void gnc_preferences_add_to_page(const gchar *filename, const gchar *widgetname, const gchar *tabname)
Dialog for handling user preferences.
void gnc_AB_BANKING_delete(AB_BANKING *api)
Definition: gnc-ab-utils.c:218
void gnc_GWEN_Fini(void)
Definition: gnc-ab-utils.c:122
Plugin registration of the AqBanking module.
void gnc_plugin_aqbanking_create_plugin(void)
void gnc_GWEN_Init(void)
Definition: gnc-ab-utils.c:87
AqBanking utility functions.