GnuCash 2.4.99
gncmod-ofx-import.c
00001 /********************************************************************\
00002  * This program is free software; you can redistribute it and/or    *
00003  * modify it under the terms of the GNU General Public License as   *
00004  * published by the Free Software Foundation; either version 2 of   *
00005  * the License, or (at your option) any later version.              *
00006  *                                                                  *
00007  * This program is distributed in the hope that it will be useful,  *
00008  * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
00009  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
00010  * GNU General Public License for more details.                     *
00011  *                                                                  *
00012  * You should have received a copy of the GNU General Public License*
00013  * along with this program; if not, contact:                        *
00014  *                                                                  *
00015  * Free Software Foundation           Voice:  +1-617-542-5942       *
00016  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
00017  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
00018 \********************************************************************/
00026 #include "config.h"
00027 
00028 #include <gmodule.h>
00029 
00030 #include "gnc-ofx-import.h"
00031 #include "gnc-module.h"
00032 #include "gnc-module-api.h"
00033 #include "gnc-plugin-ofx.h"
00034 
00035 GNC_MODULE_API_DECL(libgncmod_ofx)
00036 
00037 /* version of the gnc module system interface we require */
00038 int libgncmod_ofx_gnc_module_system_interface = 0;
00039 
00040 /* module versioning uses libtool semantics. */
00041 int libgncmod_ofx_gnc_module_current  = 0;
00042 int libgncmod_ofx_gnc_module_revision = 0;
00043 int libgncmod_ofx_gnc_module_age      = 0;
00044 
00045 //static GNCModule bus_core;
00046 //static GNCModule file;
00047 
00048 
00049 char *
00050 libgncmod_ofx_gnc_module_path(void)
00051 {
00052     return g_strdup("gnucash/import-export/ofx");
00053 }
00054 
00055 char *
00056 libgncmod_ofx_gnc_module_description(void)
00057 {
00058     return g_strdup("Gnome GUI and C code for OFX importer using libofx");
00059 }
00060 
00061 int
00062 libgncmod_ofx_gnc_module_init(int refcount)
00063 {
00064     if (!gnc_module_load("gnucash/engine", 0))
00065     {
00066         return FALSE;
00067     }
00068     if (!gnc_module_load("gnucash/app-utils", 0))
00069     {
00070         return FALSE;
00071     }
00072     if (!gnc_module_load("gnucash/gnome-utils", 0))
00073     {
00074         return FALSE;
00075     }
00076     if (!gnc_module_load("gnucash/import-export", 0))
00077     {
00078         return FALSE;
00079     }
00080 
00081     /* Add menu items with C callbacks */
00082     gnc_plugin_ofx_create_plugin();
00083 
00084     return TRUE;
00085 }
00086 
00087 int
00088 libgncmod_ofx_gnc_module_end(int refcount)
00089 {
00090     return TRUE;
00091 }
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines