2001-08-07 18:29:04 -05:00
|
|
|
/*************************************************************
|
|
|
|
* gnc-module.h -- loadable plugin/module system for gnucash
|
|
|
|
* Copyright 2001 Linux Developers Group, Inc.
|
|
|
|
*************************************************************/
|
|
|
|
|
2001-08-08 06:11:54 -05:00
|
|
|
#ifndef GNC_MODULE_H
|
|
|
|
#define GNC_MODULE_H
|
|
|
|
|
2001-08-07 18:29:04 -05:00
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
typedef void * GNCModule;
|
|
|
|
|
|
|
|
#define DEFAULT_MODULE_PATH "/usr/local/gnucash/lib/modules"
|
2010-05-25 15:20:52 -05:00
|
|
|
#define GNC_MODULE_PREFIX "libgncmod"
|
2001-08-07 18:29:04 -05:00
|
|
|
|
2009-12-29 14:12:48 -06:00
|
|
|
/* the basics: initialize the module system, refresh its module
|
2001-08-07 18:29:04 -05:00
|
|
|
* database, and get a list of all known modules */
|
|
|
|
void gnc_module_system_init(void);
|
|
|
|
void gnc_module_system_refresh(void);
|
|
|
|
GList * gnc_module_system_modinfo(void);
|
|
|
|
|
|
|
|
/* load and unload a module. gnc_module_system_init() must be called
|
2009-12-29 14:12:48 -06:00
|
|
|
* before loading and unloading.
|
2005-01-10 15:34:40 -06:00
|
|
|
*
|
|
|
|
* Note/FIXME: There seems to be no real reason for why the argument
|
|
|
|
* module_name is not a const gchar?! It certainly should be const
|
|
|
|
* (because of passing string literals), and from a quick glance it is
|
|
|
|
* also only used in a const way. */
|
2009-12-29 14:12:48 -06:00
|
|
|
/*@ dependent @*/
|
|
|
|
GNCModule gnc_module_load(gchar * module_name, gint iface);
|
2006-12-11 11:48:44 -06:00
|
|
|
GNCModule gnc_module_load_optional(gchar * module_name, gint iface);
|
2001-08-07 18:29:04 -05:00
|
|
|
int gnc_module_unload(GNCModule mod);
|
|
|
|
|
2001-08-08 06:11:54 -05:00
|
|
|
#endif
|