|
GnuCash 2.4.99
|
00001 /* 00002 * gncmod-aqbanking.c -- 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License as 00006 * published by the Free Software Foundation; either version 2 of 00007 * the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, contact: 00016 * 00017 * Free Software Foundation Voice: +1-617-542-5942 00018 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 00019 * Boston, MA 02110-1301, USA gnu@gnu.org 00020 */ 00021 00030 #include "config.h" 00031 #include <glib/gi18n.h> 00032 00033 #include "gnc-ab-utils.h" 00034 #include "gnc-module.h" 00035 #include "gnc-module-api.h" 00036 #include "gnc-plugin-aqbanking.h" 00037 #include "dialog-preferences.h" 00038 00039 GNC_MODULE_API_DECL(libgncmod_aqbanking) 00040 00041 /* version of the gnc module system interface we require */ 00042 gint libgncmod_aqbanking_gnc_module_system_interface = 0; 00043 00044 /* module versioning uses libtool semantics. */ 00045 gint libgncmod_aqbanking_gnc_module_current = 0; 00046 gint libgncmod_aqbanking_gnc_module_revision = 0; 00047 gint libgncmod_aqbanking_gnc_module_age = 0; 00048 00049 gchar * 00050 libgncmod_aqbanking_gnc_module_path(void) 00051 { 00052 return g_strdup("gnucash/import-export/aqbanking"); 00053 } 00054 00055 gchar * 00056 libgncmod_aqbanking_gnc_module_description(void) 00057 { 00058 return g_strdup("Support for Online Banking protocols"); 00059 } 00060 00061 gint 00062 libgncmod_aqbanking_gnc_module_init(gint refcount) 00063 { 00064 /* Load modules we depend on */ 00065 if (!gnc_module_load("gnucash/engine", 0) 00066 || !gnc_module_load("gnucash/app-utils", 0) 00067 || !gnc_module_load("gnucash/gnome-utils", 0) 00068 || !gnc_module_load("gnucash/import-export", 0)) 00069 { 00070 return FALSE; 00071 } 00072 00073 /* Add menu items with C callbacks */ 00074 gnc_plugin_aqbanking_create_plugin(); 00075 00076 00077 /* Add AqBanking preferences to the preferences dialog */ 00078 gnc_preferences_add_to_page("dialog-ab.glade", "aqbanking_prefs", 00079 _("Online Banking")); 00080 00081 /* Initialize gwen library */ 00082 gnc_GWEN_Init(); 00083 00084 return 1; 00085 } 00086 00087 gint 00088 libgncmod_aqbanking_gnc_module_end(gint refcount) 00089 { 00090 /* Delete the shared AB_BANKING object */ 00091 gnc_AB_BANKING_delete(NULL); 00092 00093 /* Finalize gwen library */ 00094 gnc_GWEN_Fini(); 00095 00096 return 1; 00097 }
1.7.4