41 #include "qofevent-p.h"
50 coll_destroy (gpointer col)
62 g_hash_table_new_full (g_str_hash, g_str_equal,
65 book->
data_tables = g_hash_table_new (g_str_hash, g_str_equal);
67 g_hash_table_new (g_str_hash, g_str_equal);
84 LEAVE (
"book=%p", book);
89 book_final (gpointer key, gpointer value, gpointer booq)
91 QofBookFinalCB cb = value;
94 gpointer user_data = g_hash_table_lookup (book->
data_tables, key);
95 (*cb) (book, key, user_data);
103 ENTER (
"book=%p", book);
110 qof_object_book_end (book);
119 LEAVE (
"book=%p", book);
127 if (book_1 == book_2)
129 if (!book_1 || !book_2)
140 return (book->
inst.dirty || qof_object_is_dirty (book));
149 book->
inst.dirty = FALSE;
150 qof_object_mark_clean (book);
174 ENTER (
"book=%p be=%p", book, be);
184 book->
inst.dirty = TRUE;
195 g_hash_table_insert (book->
data_tables, (gpointer) key, data);
200 gpointer data, QofBookFinalCB cb)
204 g_hash_table_insert (book->
data_tables, (gpointer) key, data);
216 return g_hash_table_lookup (book->
data_tables, (gpointer) key);
224 if (!book || !entity_type)
243 foreach_cb (gpointer key __attribute__ ((unused)), gpointer item, gpointer arg)
245 struct _iterate *qiter = arg;
248 qiter->fn (col, qiter->data);
252 qof_book_foreach_collection (
QofBook * book,
255 struct _iterate qiter;
257 g_return_if_fail (book);
258 g_return_if_fail (cb);
260 qiter.data = user_data;
305 qof_book_set_version (
QofBook * book, gint32 version)
307 if (!book && version < 0)
315 qof_book_set_idata (
QofBook * book, guint32 idata)
317 if (!book && idata == 0)
334 PWARN (
"No book!!!");
337 if (!counter_name || *counter_name ==
'\0')
339 PWARN (
"Invalid counter name.");
344 if (be && be->counter)
345 return ((be->counter) (be, counter_name));
350 PWARN (
"Book has no KVP_Frame");
367 value = kvp_value_new_gint64 (counter);
379 {QOF_PARAM_GUID, QOF_TYPE_GUID,
385 {NULL, NULL, NULL, NULL, NULL},