18 #ifndef __GNC_XML_BACKEND_HPP__ 19 #define __GNC_XML_BACKEND_HPP__ 24 #include <qof-backend.hpp> 37 void session_end()
override;
38 void load(QofBook* book, QofBackendLoadType loadType)
override;
41 void sync(QofBook* book)
override;
44 const char * get_filename() {
return m_fullpath.c_str(); }
45 QofBook* get_book() {
return m_book; }
48 bool save_may_clobber_data();
50 bool link_or_make_backup(
const std::string& orig,
const std::string& bkup);
52 bool write_to_file(
bool make_backup);
53 void remove_old_files();
54 void write_accounts(QofBook* book);
55 bool check_path(
const char* fullpath,
bool create);
57 std::string m_dirname;
58 std::string m_lockfile;
59 std::string m_linkfile;
62 QofBook* m_book =
nullptr;
64 #endif // __GNC_XML_BACKEND_HPP__
void sync(QofBook *book) override
Synchronizes the engine contents to the backend.
void export_coa(QofBook *) override
Extract the chart of accounts from the current database and create a new database with it...
void load(QofBook *book, QofBackendLoadType loadType) override
Load the minimal set of application data needed for the application to be operable at initial startup...
void safe_sync(QofBook *book) override
Perform a sync in a way that prevents data loss on a DBI backend.
void commit(QofInstance *instance) override
Commits the changes from the engine to the backend data storage.
std::string m_fullpath
Each backend resolves a fully-qualified file path.
void session_begin(QofSession *session, const char *new_uri, SessionOpenMode mode) override
Open the file or connect to the server.
SessionOpenMode
Mode for opening sessions.