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:
Linas Vepstas 2001-12-31 18:17:26 +00:00
parent fcabb48530
commit 44d54c3637
2 changed files with 19 additions and 1 deletions

View File

@ -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 */
};
/*

View File

@ -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 *