29 #include "cashobjects.h"    31 #include "SX-book-p.h"    33 #include "TransactionP.hpp"    35 #include "gnc-pricedb-p.h"    38 #define GNC_LIB_NAME "gncmod-backend-xml"    43 static GList * engine_init_hooks = 
nullptr;
    44 static int engine_is_initialized = 0;
    46 EngineCommitErrorCallback g_error_cb;
    47 gpointer g_error_cb_data;
    57 gnc_engine_init_part1()
    63     cashobjects_register();
    67 gnc_engine_init_part2()
    76 #if defined( HAVE_DBI_DBI_H )    77         { 
"", 
"gncmod-backend-dbi", TRUE },
    79         { 
"", 
"gncmod-backend-xml", TRUE },
    80         { 
nullptr, 
nullptr, FALSE }
    83     for (lib = libs; lib->lib ; lib++)
    87             engine_is_initialized = 1;
    91             g_warning(
"failed to load %s from relative path %s\n", lib->lib, lib->subdir);
    95                 g_critical(
"required library %s not found.\n", lib->lib);
   102 gnc_engine_init_part3(
int argc, 
char ** argv)
   106     for (cur = engine_init_hooks; cur; cur = cur->next)
   118     if (1 == engine_is_initialized) 
return;
   120     gnc_engine_init_part1();
   121     gnc_engine_init_part2();
   122     gnc_engine_init_part3(argc, argv);
   128     if (1 == engine_is_initialized) 
return;
   130     gnc_engine_init_part1();
   131     gnc_engine_init_part3(argc, argv);
   145     engine_is_initialized = 0;
   156     engine_init_hooks = g_list_append(engine_init_hooks, (gpointer)h);
   162     return (engine_is_initialized == 1) ? TRUE : FALSE;
   169     g_error_cb_data = data;
   175     if ( g_error_cb != 
nullptr )
   177         (*g_error_cb)( g_error_cb_data, errcode );
 This is the private header for the account structure. 
 
QofBackendError
The errors that can be reported to the GUI & other front-end users. 
 
void gnc_engine_shutdown(void)
Called to shutdown the engine. 
 
gboolean gnc_engine_is_initialized(void)
check the engine is fully initialized 
 
void gnc_engine_add_commit_error_callback(EngineCommitErrorCallback cb, gpointer data)
Set a callback function to be called in case an engine commit fails. 
 
void qof_log_shutdown(void)
Be nice, close the logfile if possible. 
 
void(* gnc_engine_init_hook_t)(int, char **)
Function type for init hooks in the engine. 
 
void gnc_engine_init_static(int argc, char **argv)
This is the statically linked-in version of gnc_engine_init. 
 
void gnc_engine_init(int argc, char **argv)
PROTOTYPES. 
 
void gnc_engine_add_init_hook(gnc_engine_init_hook_t h)
Pass a function pointer to gnc_engine_add_init_hook and it will be called during the evaluation of gn...
 
All type declarations for the whole Gnucash engine. 
 
gboolean qof_load_backend_library(const gchar *directory, const gchar *module_name)
Load a QOF-compatible backend shared library. 
 
void qof_close(void)
Safely close down the Query Object Framework. 
 
void qof_init(void)
Initialise the Query Object Framework. 
 
Commodity handling public routines.