00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00042 #ifndef QOF_BACKEND_H
00043 #define QOF_BACKEND_H
00044
00045 #include "qofinstance.h"
00046
00047 #define QOF_MOD_BACKEND "qof-backend"
00048
00054 typedef gint32 QofErrorId;
00055
00060 typedef struct QofBackendProvider_s QofBackendProvider;
00061
00069 typedef struct QofBackend_s QofBackend;
00070
00072 typedef void (*QofBePercentageFunc) (const gchar * message, double percent);
00073
00083 void qof_backend_run_begin (QofBackend * be, QofInstance * inst);
00084
00085 gboolean qof_backend_begin_exists (QofBackend * be);
00086
00087 void qof_backend_run_commit (QofBackend * be, QofInstance * inst);
00088
00089 gboolean qof_backend_commit_exists (QofBackend * be);
00114 typedef struct QofBackendOption_s
00115 {
00116 KvpValueType type;
00118 const gchar *option_name;
00119 const gchar *description;
00120 const gchar *tooltip;
00121 gpointer value;
00122 } QofBackendOption;
00123
00125 void qof_backend_prepare_frame (QofBackend * be);
00126
00128 void qof_backend_prepare_option (QofBackend * be, QofBackendOption * option);
00129
00131 KvpFrame *qof_backend_complete_frame (QofBackend * be);
00132
00134 typedef void (*QofBackendOptionCB) (QofBackendOption *, gpointer data);
00135
00137 void
00138 qof_backend_option_foreach (KvpFrame * config, QofBackendOptionCB cb,
00139 gpointer data);
00140
00149 void qof_backend_load_config (QofBackend * be, KvpFrame * config);
00150
00168 KvpFrame *qof_backend_get_config (QofBackend * be);
00181 gboolean
00182 qof_load_backend_library (const gchar * directory,
00183 const gchar * filename, const gchar * init_fcn);
00184
00186 QofBackend *qof_book_get_backend (QofBook * book);
00187
00192 void qof_book_set_backend (QofBook * book, QofBackend *);
00193
00196 #endif