58 #define QOF_TYPE_BOOK (qof_book_get_type ())
60 (G_TYPE_CHECK_INSTANCE_CAST ((o), QOF_TYPE_BOOK, QofBook))
61 #define QOF_BOOK_CLASS(k) \
62 (G_TYPE_CHECK_CLASS_CAST((k), QOF_TYPE_BOOK, QofBookClass))
63 #define QOF_IS_BOOK(o) \
64 (G_TYPE_CHECK_INSTANCE_TYPE ((o), QOF_TYPE_BOOK))
65 #define QOF_IS_BOOK_CLASS(k) \
66 (G_TYPE_CHECK_CLASS_TYPE ((k), QOF_TYPE_BOOK))
67 #define QOF_BOOK_GET_CLASS(o) \
68 (G_TYPE_INSTANCE_GET_CLASS ((o), QOF_TYPE_BOOK, QofBookClass))
70 typedef void (*QofBookDirtyCB) (
QofBook *, gboolean dirty, gpointer user_data);
75 typedef void (*GNCOptionLoad) (GNCOptionDB*, KvpFrame*);
90 gboolean session_dirty;
99 QofBookDirtyCB dirty_cb;
109 GHashTable * hash_of_collections;
114 GHashTable *data_tables;
117 GHashTable *data_table_finalizers;
136 gboolean shutting_down;
153 GType qof_book_get_type(
void);
164 #define QOF_BOOK_RETURN_ENTITY(book,guid,e_type,c_type) { \
165 QofInstance *val = NULL; \
166 if ((guid != NULL) && (book != NULL)) { \
167 const QofCollection *col; \
168 col = qof_book_get_collection (book, e_type); \
169 val = qof_collection_lookup_entity (col, guid); \
171 return (c_type *) val; \
179 typedef void (*QofBookFinalCB) (QofBook *, gpointer key, gpointer user_data);
329 const char *counter_name);
331 const char* qof_book_get_string_option(
const QofBook* book,
const char* opt_name);
332 void qof_book_set_string_option(QofBook* book,
const char* opt_name,
const char* opt_val);
337 void qof_book_set_feature (QofBook *book,
const gchar *key,
const gchar *descr);
339 void qof_book_begin_edit(QofBook *book);
340 void qof_book_commit_edit(QofBook *book);
343 void qof_book_load_options (QofBook *book, GNCOptionLoad load_cb,
346 qof_book_save_options (QofBook *book, GNCOptionSave save_cb,
347 GNCOptionDB* odb, gboolean clear);
351 #define qof_book_get_guid(X) qof_entity_get_guid (QOF_INSTANCE(X))
gboolean qof_book_register(void)
void qof_book_set_dirty_cb(QofBook *book, QofBookDirtyCB cb, gpointer user_data)
A key-value frame system.
time64 qof_book_get_session_dirty_time(const QofBook *book)
gchar * qof_book_increment_and_format_counter(QofBook *book, const char *counter_name)
gint qof_book_get_num_days_autoreadonly(const QofBook *book)
gboolean qof_book_use_split_action_for_num_field(const QofBook *book)
QofBook * qof_book_new(void)
const char * qof_book_get_counter_format(const QofBook *book, const char *counter_name)
void qof_book_mark_closed(QofBook *book)
Object instance holds common fields that most gnucash objects use.
void qof_book_mark_readonly(QofBook *book)
QOF entity type identification system.
GHashTable * qof_book_get_features(QofBook *book)
gint64 qof_book_get_counter(QofBook *book, const char *counter_name)
GDate * qof_book_get_autoreadonly_gdate(const QofBook *book)
void qof_book_mark_session_saved(QofBook *book)
void qof_book_set_data_fin(QofBook *book, const gchar *key, gpointer data, QofBookFinalCB)
void qof_book_set_data(QofBook *book, const gchar *key, gpointer data)
gboolean qof_book_session_not_saved(const QofBook *book)
void qof_book_mark_session_dirty(QofBook *book)
void(* QofCollectionForeachCB)(QofCollection *, gpointer user_data)
gboolean qof_book_is_readonly(const QofBook *book)
struct KvpFrameImpl KvpFrame
QofCollection * qof_book_get_collection(const QofBook *, QofIdType)
gboolean qof_book_uses_autoreadonly(const QofBook *book)
gboolean qof_book_shutting_down(const QofBook *book)
gpointer qof_book_get_data(const QofBook *book, const gchar *key)
gboolean qof_book_use_trading_accounts(const QofBook *book)
void qof_book_destroy(QofBook *book)
gchar * qof_book_validate_counter_format(const gchar *format)