mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
add state management flags
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6446 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
fcabb48530
commit
44d54c3637
@ -64,12 +64,25 @@ struct gnc_book_struct
|
||||
* that will be used to hold arbitrary pointers.
|
||||
*/
|
||||
GHashTable *data_tables;
|
||||
|
||||
|
||||
/* state flag: 'y' means 'open for editing',
|
||||
* 'n' means 'book is closed'
|
||||
*/
|
||||
char book_open;
|
||||
|
||||
/* version number, used for tracking multiuser updates */
|
||||
gint32 version;
|
||||
guint32 version_check; /* data aging timestamp */
|
||||
|
||||
/* To be technically correct, backends belong to sessions and
|
||||
* not books. So the pointer below "really shouldn't be here",
|
||||
* except that it provides a nice convenience, avoiding a lookup
|
||||
* from the session. Better solutions welcome ... */
|
||||
Backend *backend;
|
||||
|
||||
/* -------------------------------------------------------------- */
|
||||
/* Backend private expansion data */
|
||||
guint32 idata; /* used by the sql backend for kvp management */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -91,6 +91,11 @@ gnc_book_init (GNCBook *book)
|
||||
}
|
||||
|
||||
book->data_tables = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
|
||||
book->book_open = 'y';
|
||||
book->version = 0;
|
||||
book->version_check = 0;
|
||||
book->idata = 0;
|
||||
}
|
||||
|
||||
GNCBook *
|
||||
|
Loading…
Reference in New Issue
Block a user