GnuCash  5.6-150-g038405b370+
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
gnc-module.h
1 /*************************************************************
2  * gnc-module.h -- loadable plugin/module system for gnucash
3  * Copyright 2001 Linux Developers Group, Inc.
4  *************************************************************/
5 /********************************************************************\
6  * This program is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation; either version 2 of *
9  * the License, or (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License*
17  * along with this program; if not, contact: *
18  * *
19  * Free Software Foundation Voice: +1-617-542-5942 *
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21  * Boston, MA 02110-1301, USA gnu@gnu.org *
22  * *
23 \********************************************************************/
24 
25 
26 #ifndef GNC_MODULE_H
27 #define GNC_MODULE_H
28 
29 #include <glib.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 typedef void * GNCModule;
36 
37 #define DEFAULT_MODULE_PATH "/usr/local/gnucash/lib/modules"
38 #define GNC_MODULE_PREFIX "libgncmod"
39 
40 /* the basics: initialize the module system, refresh its module
41  * database, and get a list of all known modules */
42 void gnc_module_system_init(void);
43 void gnc_module_system_refresh(void);
44 GList * gnc_module_system_modinfo(void);
45 
46 /* load and unload a module. gnc_module_system_init() must be called
47  * before loading and unloading.
48  */
49 /*@ dependent @*/
50 GNCModule gnc_module_load(const gchar * module_name, gint iface);
51 GNCModule gnc_module_load_optional(const gchar * module_name, gint iface);
52 int gnc_module_unload(GNCModule mod);
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif