2001-08-07 23:29:04 +00:00
|
|
|
/*********************************************************************
|
|
|
|
|
* gnc-mod-engine.c
|
|
|
|
|
* module definition/initialization for the Engine module
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2001 Linux Developers Group, Inc.
|
|
|
|
|
*********************************************************************/
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <guile/gh.h>
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
2001-08-08 11:11:54 +00:00
|
|
|
#include "gnc-engine.h"
|
|
|
|
|
#include "gnc-module-api.h"
|
2001-08-07 23:29:04 +00:00
|
|
|
#include "gw-engine.h"
|
|
|
|
|
|
|
|
|
|
/* version of the gnc module system interface we require */
|
2002-05-07 23:22:24 +00:00
|
|
|
int libgncmod_engine_LTX_gnc_module_system_interface = 0;
|
2001-08-07 23:29:04 +00:00
|
|
|
|
|
|
|
|
/* module versioning uses libtool semantics. */
|
2002-05-07 23:22:24 +00:00
|
|
|
int libgncmod_engine_LTX_gnc_module_current = 0;
|
|
|
|
|
int libgncmod_engine_LTX_gnc_module_revision = 0;
|
|
|
|
|
int libgncmod_engine_LTX_gnc_module_age = 0;
|
2001-08-07 23:29:04 +00:00
|
|
|
|
2002-06-24 05:58:58 +00:00
|
|
|
/* forward references */
|
|
|
|
|
char *libgncmod_engine_LTX_gnc_module_path(void);
|
|
|
|
|
char *libgncmod_engine_LTX_gnc_module_description(void);
|
|
|
|
|
int libgncmod_engine_LTX_gnc_module_init(int refcount);
|
|
|
|
|
int libgncmod_engine_LTX_gnc_module_end(int refcount);
|
|
|
|
|
|
|
|
|
|
|
2001-08-07 23:29:04 +00:00
|
|
|
char *
|
2002-05-07 23:22:24 +00:00
|
|
|
libgncmod_engine_LTX_gnc_module_path(void)
|
2001-08-07 23:29:04 +00:00
|
|
|
{
|
|
|
|
|
return g_strdup("gnucash/engine");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *
|
2002-05-07 23:22:24 +00:00
|
|
|
libgncmod_engine_LTX_gnc_module_description(void)
|
2001-08-07 23:29:04 +00:00
|
|
|
{
|
|
|
|
|
return g_strdup("The Gnucash accounting engine");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
2002-05-07 23:22:24 +00:00
|
|
|
libgncmod_engine_LTX_gnc_module_init(int refcount)
|
2001-08-07 23:29:04 +00:00
|
|
|
{
|
|
|
|
|
if(refcount == 0)
|
|
|
|
|
{
|
|
|
|
|
/* initialize the engine on the first load */
|
|
|
|
|
gnc_engine_init(0, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gh_eval_str("(use-modules (gnucash engine))");
|
2002-01-09 21:42:29 +00:00
|
|
|
|
|
|
|
|
gh_eval_str("(use-modules (g-wrap gw-glib))");
|
|
|
|
|
|
2001-10-18 21:48:17 +00:00
|
|
|
gh_eval_str("(use-modules (g-wrapped gw-kvp))");
|
2001-08-07 23:29:04 +00:00
|
|
|
gh_eval_str("(use-modules (g-wrapped gw-engine))");
|
|
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
2002-05-07 23:22:24 +00:00
|
|
|
libgncmod_engine_LTX_gnc_module_end(int refcount) {
|
2001-08-07 23:29:04 +00:00
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|