GnuCash 2.4.99
gncmod-bi-import.c
00001 /*********************************************************************
00002  * gncmod-bi-import.c
00003  * module definition/initialization for the bi-import GNOME UI module
00004  *
00005  * Copyright (c) 2009 Sebastian Held <sebastian.held@gmx.de>
00006  * Copyright (c) 2001 Derek Atkins <warlord@MIT.EDU>
00007  *
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License as
00010  * published by the Free Software Foundation; either version 2 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, contact:
00020  *
00021  * Free Software Foundation           Voice:  +1-617-542-5942
00022  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652
00023  * Boston, MA  02110-1301,  USA       gnu@gnu.org
00024  *
00025  *********************************************************************/
00026 
00027 #ifdef HAVE_CONFIG_H
00028 #include <config.h>
00029 #endif
00030 
00031 #include <gmodule.h>
00032 #include <gtk/gtk.h>
00033 #include <glib/gi18n.h>
00034 
00035 #include "gnc-hooks.h"
00036 #include "gnc-module.h"
00037 #include "gnc-module-api.h"
00038 
00039 #include "gnc-plugin-manager.h"
00040 #include "gnc-plugin-bi-import.h"
00041 
00042 GNC_MODULE_API_DECL(libgncmod_bi_import);
00043 
00044 /* version of the gnc module system interface we require */
00045 int libgncmod_bi_import_gnc_module_system_interface = 0;
00046 
00047 /* module versioning uses libtool semantics. */
00048 int libgncmod_bi_import_gnc_module_current  = 0;
00049 int libgncmod_bi_import_gnc_module_revision = 0;
00050 int libgncmod_bi_import_gnc_module_age      = 0;
00051 
00052 
00053 char *
00054 libgncmod_bi_import_gnc_module_path (void)
00055 {
00056     return g_strdup("gnucash/plugins/bi_import");
00057 }
00058 
00059 char *
00060 libgncmod_bi_import_gnc_module_description (void)
00061 {
00062     return g_strdup("The GnuCash bi_import plugin");
00063 }
00064 
00065 int
00066 libgncmod_bi_import_gnc_module_init (int refcount)
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/engine", 0))
00077     {
00078         return FALSE;
00079     }
00080 
00081     if (refcount == 0)
00082     {
00083         /* this is the first time the module is loaded */
00084 
00085         gnc_plugin_manager_add_plugin ( gnc_plugin_manager_get (),
00086                                         gnc_plugin_bi_import_new ());
00087     }
00088 
00089     return TRUE;
00090 }
00091 
00092 int
00093 libgncmod_bi_import_gnc_module_end (int refcount)
00094 {
00095     if (refcount == 0)
00096     {
00097         /* this is the last time the module is unloaded */
00098     }
00099 
00100     return TRUE;
00101 }
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines