38 #include <sys/types.h> 44 #include "qoferror-p.h" 47 #include "qofsession-p.h" 50 #define _(String) dgettext (GETTEXT_PACKAGE, String) 52 static GHookList *session_closed_hooks = NULL;
54 static GSList *provider_list = NULL;
61 provider_list = g_slist_prepend (provider_list, prov);
73 if (session_closed_hooks == NULL)
75 session_closed_hooks = malloc (
sizeof (GHookList));
76 g_hook_list_init (session_closed_hooks,
sizeof (GHook));
79 hook = g_hook_alloc (session_closed_hooks);
83 hook->func = (GHookFunc) fn;
85 g_hook_append (session_closed_hooks, hook);
94 if (session_closed_hooks == NULL)
97 hook = g_hook_first_valid (session_closed_hooks, FALSE);
100 fn = (GFunc) hook->func;
101 fn (session, hook->data);
102 hook = g_hook_next_valid (session_closed_hooks, hook, FALSE);
115 session->book_id = NULL;
116 session->backend = NULL;
121 qof_session_new (
void)
124 qof_session_init (session);
135 for (node = session->books; node; node = node->next)
151 ENTER (
" sess=%p book=%p", session, addbook);
154 for (node = session->books; node; node = node->next)
167 g_list_free (session->books);
168 session->books = g_list_append (NULL, addbook);
173 session->books = g_list_append (session->books, addbook);
181 qof_session_get_backend (
QofSession * session)
185 return session->backend;
193 if (!session->backend)
203 return session->book_id;
208 typedef struct qof_entity_copy_data
213 GList *referenceList;
220 qof_book_set_partial (
QofBook * book)
238 GList *book_ref_list;
240 book = qof_session_get_book (session);
242 book_ref_list = g_list_append (book_ref_list, reference);
244 qof_book_set_partial (book);
248 qof_entity_param_cb (
QofParam * param, gpointer data)
250 QofEntityCopyData *qecd;
252 g_return_if_fail (data != NULL);
253 qecd = (QofEntityCopyData *) data;
254 g_return_if_fail (param != NULL);
256 if (0 ==
safe_strcmp (param->param_type, QOF_TYPE_KVP))
258 qecd->param_list = g_slist_prepend (qecd->param_list, param);
261 if ((param->param_getfcn != NULL) && (param->param_setfcn != NULL))
263 qecd->param_list = g_slist_prepend (qecd->param_list, param);
268 col_ref_cb (
QofEntity * ref_ent, gpointer user_data)
271 QofEntityCopyData *qecd;
277 qecd = (QofEntityCopyData *) user_data;
280 ref->
type = ent->e_type;
284 qecd->param->param_name);
287 cm_string = g_strdup (cm_sa);
296 qof_entity_foreach_copy (gpointer data, gpointer user_data)
299 QofEntityCopyData *context;
301 gboolean registered_type;
304 gchar *cm_string, *cm_char;
310 gdouble cm_double, (*double_getter) (QofEntity *,
QofParam *);
311 gboolean cm_boolean, (*boolean_getter) (QofEntity *,
QofParam *);
312 gint32 cm_i32, (*int32_getter) (QofEntity *,
QofParam *);
313 gint64 cm_i64, (*int64_getter) (QofEntity *,
QofParam *);
315 void (*string_setter) (QofEntity *,
const gchar *);
316 void (*numeric_setter) (QofEntity *,
QofNumeric);
317 void (*guid_setter) (QofEntity *,
const GUID *);
318 void (*double_setter) (QofEntity *, gdouble);
319 void (*boolean_setter) (QofEntity *, gboolean);
320 void (*i32_setter) (QofEntity *, gint32);
321 void (*i64_setter) (QofEntity *, gint64);
322 void (*char_setter) (QofEntity *, gchar *);
323 void (*kvp_frame_setter) (QofEntity *,
KvpFrame *);
325 g_return_if_fail (user_data != NULL);
326 context = (QofEntityCopyData *) user_data;
327 importEnt = context->from;
328 targetEnt = context->to;
329 registered_type = FALSE;
331 g_return_if_fail (cm_param != NULL);
332 context->param = cm_param;
333 if (
safe_strcmp (cm_param->param_type, QOF_TYPE_STRING) == 0)
335 cm_string = (gchar *) cm_param->param_getfcn (importEnt, cm_param);
339 (void (*)(QofEntity *,
340 const char *)) cm_param->param_setfcn;
341 if (string_setter != NULL)
344 string_setter (targetEnt, cm_string);
348 registered_type = TRUE;
350 if (
safe_strcmp (cm_param->param_type, QOF_TYPE_TIME) == 0)
353 void (*time_setter) (QofEntity *,
QofTime *);
355 qt = cm_param->param_getfcn (importEnt, cm_param);
357 (void (*)(QofEntity *,
QofTime*))cm_param->param_setfcn;
358 if (time_setter != NULL)
361 time_setter (targetEnt, qt);
364 registered_type = TRUE;
366 if ((
safe_strcmp (cm_param->param_type, QOF_TYPE_NUMERIC) == 0) ||
367 (
safe_strcmp (cm_param->param_type, QOF_TYPE_DEBCRED) == 0))
371 QofParam *)) cm_param->param_getfcn;
372 cm_numeric = numeric_getter (importEnt, cm_param);
374 (void (*)(QofEntity *,
QofNumeric)) cm_param->param_setfcn;
375 if (numeric_setter != NULL)
378 numeric_setter (targetEnt, cm_numeric);
381 registered_type = TRUE;
383 if (
safe_strcmp (cm_param->param_type, QOF_TYPE_GUID) == 0)
386 (
const GUID *) cm_param->param_getfcn (importEnt, cm_param);
388 (void (*)(QofEntity *,
const GUID *)) cm_param->param_setfcn;
389 if (guid_setter != NULL)
392 guid_setter (targetEnt, cm_guid);
395 registered_type = TRUE;
397 if (
safe_strcmp (cm_param->param_type, QOF_TYPE_INT32) == 0)
400 (gint32 (*)(QofEntity *,
QofParam *)) cm_param->param_getfcn;
401 cm_i32 = int32_getter (importEnt, cm_param);
403 (void (*)(QofEntity *, gint32)) cm_param->param_setfcn;
404 if (i32_setter != NULL)
407 i32_setter (targetEnt, cm_i32);
410 registered_type = TRUE;
412 if (
safe_strcmp (cm_param->param_type, QOF_TYPE_INT64) == 0)
415 (gint64 (*)(QofEntity *,
QofParam *)) cm_param->param_getfcn;
416 cm_i64 = int64_getter (importEnt, cm_param);
418 (void (*)(QofEntity *, gint64)) cm_param->param_setfcn;
419 if (i64_setter != NULL)
422 i64_setter (targetEnt, cm_i64);
425 registered_type = TRUE;
427 if (
safe_strcmp (cm_param->param_type, QOF_TYPE_DOUBLE) == 0)
430 (gdouble (*)(QofEntity *,
QofParam *)) cm_param->param_getfcn;
431 cm_double = double_getter (importEnt, cm_param);
433 (void (*)(QofEntity *, gdouble)) cm_param->param_setfcn;
434 if (double_setter != NULL)
437 double_setter (targetEnt, cm_double);
440 registered_type = TRUE;
442 if (
safe_strcmp (cm_param->param_type, QOF_TYPE_BOOLEAN) == 0)
445 (gboolean (*)(QofEntity *,
QofParam *)) cm_param->param_getfcn;
446 cm_boolean = boolean_getter (importEnt, cm_param);
448 (void (*)(QofEntity *, gboolean)) cm_param->param_setfcn;
449 if (boolean_setter != NULL)
452 boolean_setter (targetEnt, cm_boolean);
455 registered_type = TRUE;
457 if (
safe_strcmp (cm_param->param_type, QOF_TYPE_KVP) == 0)
459 cm_kvp = (
KvpFrame *) cm_param->param_getfcn (importEnt, cm_param);
461 (void (*)(QofEntity *,
KvpFrame *)) cm_param->param_setfcn;
462 if (kvp_frame_setter != NULL)
465 kvp_frame_setter (targetEnt, cm_kvp);
476 registered_type = TRUE;
478 if (
safe_strcmp (cm_param->param_type, QOF_TYPE_CHAR) == 0)
480 cm_char = (gchar *) cm_param->param_getfcn (importEnt, cm_param);
482 (void (*)(QofEntity *,
char *)) cm_param->param_setfcn;
483 if (char_setter != NULL)
486 char_setter (targetEnt, cm_char);
489 registered_type = TRUE;
494 (
QofCollection *) cm_param->param_getfcn (importEnt, cm_param);
500 registered_type = TRUE;
502 if (registered_type == FALSE)
526 g_return_val_if_fail (original != NULL, FALSE);
527 targetBook = qof_session_get_book (new_session);
528 g_return_val_if_fail (targetBook != NULL, FALSE);
530 type = g_strdup (original->e_type);
541 qof_entity_list_foreach (gpointer data, gpointer user_data)
543 QofEntityCopyData *qecd;
549 g_return_if_fail (data != NULL);
551 g_return_if_fail (user_data != NULL);
552 qecd = (QofEntityCopyData *) user_data;
553 if (qof_entity_guid_match (qecd->new_session, original))
557 qecd->from = original;
563 book = qof_session_get_book (qecd->new_session);
568 PERR (
" failed to create new entity type=%s.", original->e_type);
575 if (qecd->param_list != NULL)
577 g_slist_free (qecd->param_list);
578 qecd->param_list = NULL;
581 g_slist_foreach (qecd->param_list, qof_entity_foreach_copy, qecd);
585 qof_entity_coll_foreach (
QofEntity * original, gpointer user_data)
587 QofEntityCopyData *qecd;
593 g_return_if_fail (user_data != NULL);
595 qecd = (QofEntityCopyData *) user_data;
596 targetBook = qof_session_get_book (qecd->new_session);
607 qof_entity_coll_copy (
QofEntity * original, gpointer user_data)
609 QofEntityCopyData *qecd;
614 g_return_if_fail (user_data != NULL);
615 qecd = (QofEntityCopyData *) user_data;
616 book = qof_session_get_book (qecd->new_session);
624 qecd->from = original;
627 g_slist_foreach (qecd->param_list, qof_entity_foreach_copy, qecd);
633 QofEntityCopyData qecd;
637 if (!new_session || !original)
639 if (qof_entity_guid_match (new_session, original))
644 qecd.param_list = NULL;
645 book = qof_session_get_book (new_session);
646 qecd.new_session = new_session;
647 qof_book_set_partial (book);
651 qecd.from = original;
654 if (g_slist_length (qecd.param_list) == 0)
656 g_slist_foreach (qecd.param_list, qof_entity_foreach_copy, &qecd);
657 g_slist_free (qecd.param_list);
665 QofEntityCopyData *qecd;
667 if (!new_session || !entity_list)
669 ENTER (
" list=%d", g_list_length (entity_list));
670 qecd = g_new0 (QofEntityCopyData, 1);
672 qecd->param_list = NULL;
673 qecd->new_session = new_session;
674 qof_book_set_partial (qof_session_get_book (new_session));
675 g_list_foreach (entity_list, qof_entity_list_foreach, qecd);
678 PWARN (
" some/all entities in the list could not be copied.");
688 QofEntityCopyData qecd;
690 g_return_val_if_fail (new_session, FALSE);
696 qecd.param_list = NULL;
697 qecd.new_session = new_session;
698 qof_book_set_partial (qof_session_get_book (qecd.new_session));
701 qof_entity_param_cb, &qecd);
703 if (qecd.param_list != NULL)
705 g_slist_free (qecd.param_list);
720 recurse_collection_cb (
QofEntity * ent, gpointer user_data)
722 struct recurse_s *store;
724 if (user_data == NULL)
728 store = (
struct recurse_s *) user_data;
736 store->ent_list = g_list_append (store->ent_list, ent);
741 recurse_ent_cb (
QofEntity * ent, gpointer user_data)
743 GList *ref_list, *i, *j, *ent_list, *child_list;
747 struct recurse_s *store;
750 if (user_data == NULL)
754 store = (
struct recurse_s *) user_data;
755 session = store->session;
756 success = store->success;
759 ref_list = g_list_copy (store->ref_list);
760 if ((!session) || (!ent))
768 for (i = ref_list; i != NULL; i = i->next)
775 if (ref_param->param_name == NULL)
783 col = ref_param->param_getfcn (ent, ref_param);
790 ref_ent = (
QofEntity *) ref_param->param_getfcn (ent, ref_param);
791 if ((ref_ent) && (ref_ent->e_type))
796 ent_list = g_list_append (ent_list, ref_ent);
800 for (i = ent_list; i != NULL; i = i->next)
807 if (child_ent == NULL)
812 for (j = ref_list; j != NULL; j = j->next)
819 ref_ent = ref_param->param_getfcn (child_ent, ref_param);
825 child_list = g_list_append (child_list, ref_ent);
830 for (i = child_list; i != NULL; i = i->next)
842 for (j = ref_list; j != NULL; j = j->next)
849 child_ent = ref_param->param_getfcn (ref_ent, ref_param);
850 if (child_ent != NULL)
861 struct recurse_s store;
864 if ((!new_session) || (!coll))
868 store.session = new_session;
870 store.success = success;
871 store.ent_list = NULL;
885 struct recurse_s store;
889 if ((!new_session) || (!ent))
893 store.session = new_session;
895 store.success = success;
917 struct backend_providers
920 const gchar *filename;
921 const gchar *init_fcn;
928 struct backend_providers backend_list[] = {
929 {QOF_LIB_DIR, QSF_BACKEND_LIB, QSF_MODULE_INIT},
930 {QOF_LIB_DIR,
"libqof-backend-sqlite",
"qof_sqlite_provider_init"},
932 {QOF_LIB_DIR,
"libqof-backend-gda",
"qof_gda_provider_init"},
935 {QOF_LIB_DIR,
"libqof_backend_estron",
"dwiend_provider_init"},
941 qof_session_load_backend (
QofSession * session, gchar *access_method)
949 gboolean (*type_check) (
const gchar *);
951 ENTER (
" list=%d", g_slist_length (provider_list));
953 if (NULL == provider_list)
955 for (num = 0; backend_list[num].filename != NULL; num++)
958 backend_list[num].filename,
959 backend_list[num].init_fcn))
961 PWARN (
" failed to load %s from %s using %s",
962 backend_list[num].filename, backend_list[num].libdir,
963 backend_list[num].init_fcn);
967 p = g_slist_copy (provider_list);
978 prov_type = (type_check) (session->book_id);
993 session->backend->provider = prov;
995 for (node = session->books; node; node = node->next)
1011 qof_session_destroy_backend (
QofSession * session)
1013 g_return_if_fail (session);
1015 if (session->backend)
1018 if (session->backend->destroy_backend)
1020 session->backend->destroy_backend (session->backend);
1024 g_free (session->backend);
1028 session->backend = NULL;
1033 gboolean ignore_lock, gboolean create_if_nonexistent)
1035 gchar *p, *access_method;
1040 ENTER (
" sess=%p ignore_lock=%d, book-id=%s",
1041 session, ignore_lock, book_id ? book_id :
"(null)");
1047 if (session->book_id)
1050 (_(
"This book appears to be open already."), FALSE));
1051 LEAVE (
" push error book is already open ");
1057 LEAVE (
" using stdout");
1062 session->book_id = g_strdup (book_id);
1065 qof_session_destroy_backend (session);
1071 p = strchr (book_id,
':');
1074 access_method = g_strdup (book_id);
1075 p = strchr (access_method,
':');
1077 qof_session_load_backend (session, access_method);
1078 g_free (access_method);
1083 qof_session_load_backend (session,
"file");
1087 if (NULL == session->backend)
1091 msg = g_strdup_printf (_(
"Unable to locate a " 1092 "suitable backend for '%s' - please check " 1093 "you have specified an access method " 1094 "like file: or sqlite:"), book_id);
1097 DEBUG (
" msg=%s", msg);
1098 LEAVE (
" BAD: no backend: sess=%p book-id=%s",
1099 session, book_id ? book_id :
"(null)");
1105 if (session->backend->session_begin)
1107 (session->backend->session_begin) (session->backend, session,
1108 session->book_id, ignore_lock, create_if_nonexistent);
1109 PINFO (
" Done running session_begin on backend");
1112 g_free (session->book_id);
1113 session->book_id = NULL;
1114 LEAVE (
" backend error ");
1119 LEAVE (
" sess=%p book-id=%s", session, book_id ? book_id :
"(null)");
1133 if ((!session->book_id) ||
1137 ENTER (
" sess=%p book_id=%s", session, session->book_id
1138 ? session->book_id :
"(null)");
1143 oldbooks = session->books;
1150 session->books = g_list_append (NULL, newbook);
1151 PINFO (
" new book=%p", newbook);
1162 be = session->backend;
1171 be->percentage = percentage_func;
1175 be->load (be, newbook);
1184 g_list_free (session->books);
1185 session->books = oldbooks;
1186 g_free (session->book_id);
1187 session->book_id = NULL;
1188 LEAVE (
" error from backend ");
1192 for (node = oldbooks; node; node = node->next)
1198 g_list_free (oldbooks);
1200 LEAVE (
" sess = %p, book_id=%s", session, session->book_id
1201 ? session->book_id :
"(null)");
1211 if (!session->backend)
1225 gboolean partial, change_backend;
1230 gchar * G_GNUC_UNUSED msg, *book_id;
1234 ENTER (
" sess=%p book_id=%s",
1235 session, session->book_id ? session->book_id :
"(null)");
1237 book = qof_session_get_book (session);
1241 change_backend = FALSE;
1242 msg = g_strdup_printf (
" ");
1243 book_id = g_strdup (session->book_id);
1244 if (partial == TRUE)
1246 if (session->backend && session->backend->provider)
1248 prov = session->backend->provider;
1252 change_backend = FALSE;
1256 change_backend = TRUE;
1262 change_backend = TRUE;
1265 if (change_backend == TRUE)
1267 qof_session_destroy_backend (session);
1268 if (NULL == provider_list)
1270 for (num = 0; backend_list[num].filename != NULL; num++)
1273 backend_list[num].filename,
1274 backend_list[num].init_fcn);
1277 p = g_slist_copy (provider_list);
1291 session->backend->provider = prov;
1292 if (session->backend->session_begin)
1297 g_free (session->book_id);
1298 session->book_id = NULL;
1299 (session->backend->session_begin) (session->backend,
1300 session, book_id, TRUE, TRUE);
1302 (
" Done running session_begin on changed backend");
1305 g_free (session->book_id);
1306 session->book_id = NULL;
1307 LEAVE (
" changed backend error");
1312 for (node = session->books; node; node = node->next)
1324 if (!session->backend)
1326 msg = g_strdup_printf (
" failed to load backend");
1328 (_(
"Failed to load backend, no suitable handler."),
1342 be = session->backend;
1345 for (node = session->books; node; node = node->next)
1350 be->percentage = percentage_func;
1352 (be->sync) (be, abook);
1363 msg = g_strdup_printf (
" failed to load backend");
1365 (_(
"Failed to load backend, no suitable handler."),
1368 LEAVE (
" error -- No backend!");
1379 ENTER (
" sess=%p book_id=%s", session, session->book_id
1380 ? session->book_id :
"(null)");
1383 if (session->backend && session->backend->session_end)
1385 (session->backend->session_end) (session->backend);
1390 g_free (session->book_id);
1391 session->book_id = NULL;
1393 LEAVE (
" sess=%p book_id=%s", session, session->book_id
1394 ? session->book_id :
"(null)");
1404 ENTER (
" sess=%p book_id=%s", session, session->book_id
1405 ? session->book_id :
"(null)");
1410 qof_session_destroy_backend (session);
1412 for (node = session->books; node; node = node->next)
1419 session->books = NULL;
1423 LEAVE (
" sess=%p", session);
1431 GList *books_1, *books_2, *node;
1433 if (session_1 == session_2)
1435 if (!session_1 || !session_2)
1438 ENTER (
" sess1=%p sess2=%p", session_1, session_2);
1440 books_1 = session_1->books;
1441 books_2 = session_2->books;
1443 session_1->books = books_2;
1444 session_2->books = books_1;
1446 for (node = books_1; node; node = node->next)
1451 for (node = books_2; node; node = node->next)
1467 if (!session->backend)
1469 if (!session->backend->events_pending)
1472 return session->backend->events_pending (session->backend);
1480 if (!session->backend)
1482 if (!session->backend->process_events)
1485 return session->backend->process_events (session->backend);
void qof_session_call_close_hooks(QofSession *session)
QofErrorId qof_error_register(const gchar *err_message, gboolean use_file)
Generate and register a new error.
gboolean(* save_may_clobber_data)(QofBackend *)
#define PERR(format, args...)
gpointer qof_object_new_instance(QofIdTypeConst type_name, QofBook *book)
gboolean qof_entity_copy_coll(QofSession *new_session, QofCollection *entity_coll)
Copy a QofCollection of entities.
#define QOF_TYPE_COLLECT
secondary collections are used for one-to-many references between entities and are implemented using ...
#define PINFO(format, args...)
QofCollection * qof_book_get_collection(QofBook *book, QofIdType entity_type)
struct _QofNumeric QofNumeric
A rational-number type.
void qof_class_param_foreach(QofIdTypeConst obj_name, QofParamForeachCB cb, gpointer user_data)
void qof_backend_register_provider(QofBackendProvider *prov)
gboolean qof_entity_copy_one_r(QofSession *new_session, QofEntity *ent)
Recursively copy a single entity to a new session.
gboolean qof_session_events_pending(QofSession *session)
gboolean qof_object_compliance(QofIdTypeConst type_name, gboolean warn)
check an object can be created and supports iteration
void qof_session_add_book(QofSession *session, QofBook *addbook)
gboolean qof_session_process_events(QofSession *session)
QofErrorId qof_error_check(QofSession *session)
gboolean string_to_guid(const gchar *string, GUID *guid)
gpointer qof_book_get_data(QofBook *book, const gchar *key)
gboolean partial_book_supported
Partial QofBook handler.
KvpFrame * kvp_frame_copy(const KvpFrame *frame)
struct _KvpFrame KvpFrame
QofBook * qof_book_new(void)
gint safe_strcasecmp(const gchar *da, const gchar *db)
gboolean qof_load_backend_library(const gchar *directory, const gchar *filename, const gchar *init_fcn)
Load a QOF-compatible backend shared library.
#define LEAVE(format, args...)
#define GUID_ENCODING_LENGTH
Private QofBook interface.
void kvp_frame_delete(KvpFrame *frame)
the Core Object Registration/Lookup Private Interface
void qof_session_swap_data(QofSession *session_1, QofSession *session_2)
void(* QofPercentageFunc)(const gchar *message, gdouble percent)
struct QofCollection_s QofCollection
const QofParam * qof_class_get_parameter(QofIdTypeConst obj_name, const gchar *parameter)
gboolean qof_util_param_edit(QofInstance *inst, const QofParam *param)
Prepare to edit a parameter.
gboolean qof_entity_copy_coll_r(QofSession *new_session, QofCollection *coll)
Recursively copy a collection of entities to a session.
gboolean qof_session_save_may_clobber_data(QofSession *session)
void qof_error_set(QofSession *session, QofErrorId error)
Add an error to the stack for this session.
void qof_session_begin(QofSession *session, const gchar *book_id, gboolean ignore_lock, gboolean create_if_nonexistent)
void qof_book_set_backend(QofBook *book, QofBackend *)
Set the backend used by this book.
QofEntity * qof_collection_lookup_entity(QofCollection *col, const GUID *guid)
QofEntityReference * qof_entity_get_reference_from(QofEntity *ent, const QofParam *param)
Get a reference from this entity to another entity.
void qof_collection_foreach(QofCollection *col, QofEntityForeachCB cb_func, gpointer user_data)
#define DEBUG(format, args...)
QofBackend *(* backend_new)(void)
gboolean qof_entity_copy_list(QofSession *new_session, GList *entity_list)
Copy a GList of entities to another session.
gchar * guid_to_string_buff(const GUID *guid, gchar *buff)
const gchar * qof_session_get_file_path(QofSession *session)
gboolean qof_util_param_commit(QofInstance *inst, const QofParam *param)
Commit this parameter change, with undo support.
void qof_book_set_data(QofBook *book, const gchar *key, gpointer data)
gboolean qof_entity_copy_to_session(QofSession *new_session, QofEntity *original)
Copy a single QofEntity to another session.
GList * qof_class_get_referenceList(QofIdTypeConst type)
List of the parameters that could be references.
const gchar * access_method
QofIdType qof_collection_get_type(QofCollection *col)
void qof_session_add_close_hook(GFunc fn, gpointer data)
gboolean(* check_data_type)(const gchar *)
Distinguish two providers with same access method.
#define QOF_STDOUT
Allow session data to be printed to stdout.
private api for data storage backend
const gchar * QofIdTypeConst
#define PWARN(format, args...)
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
void qof_event_suspend(void)
Suspend all engine events.
const GUID * qof_entity_get_guid(QofEntity *ent)
External references in a partial QofBook.
void qof_event_resume(void)
void qof_session_save(QofSession *session, QofPercentageFunc percentage_func)
void qof_session_end(QofSession *session)
void qof_error_clear(QofSession *session)
clear the error stack for the session.
void qof_entity_set_guid(QofEntity *ent, const GUID *guid)
gint safe_strcmp(const gchar *da, const gchar *db)
const gchar * provider_name
void qof_session_update_reference_list(QofSession *session, QofEntityReference *reference)
Adds a new reference to the partial book data hash.
#define ENTER(format, args...)
const gchar * QofLogModule
#define PARTIAL_QOFBOOK
Flag indicating a partial QofBook.
void qof_book_destroy(QofBook *book)