GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
qofbackend.h
Go to the documentation of this file.
1 /********************************************************************\
2  * qofbackend.h: api for data storage backend *
3  * This program is free software; you can redistribute it and/or *
4  * modify it under the terms of the GNU General Public License as *
5  * published by the Free Software Foundation; either version 2 of *
6  * the License, or (at your option) any later version. *
7  * *
8  * This program is distributed in the hope that it will be useful, *
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
11  * GNU General Public License for more details. *
12  * *
13  * You should have received a copy of the GNU General Public License*
14  * along with this program; if not, contact: *
15  * *
16  * Free Software Foundation Voice: +1-617-542-5942 *
17  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
18  * Boston, MA 02110-1301, USA [email protected] *
19  * *
20 \********************************************************************/
44 #ifndef QOF_BACKEND_H
45 #define QOF_BACKEND_H
46 
47 #include "qofinstance.h"
48 #ifdef __cplusplus
49 extern "C"
50 {
51 #endif
52 
53 #define QOF_MOD_BACKEND "qof.backend"
54 
59 typedef enum
60 {
61  ERR_BACKEND_NO_ERR = 0,
90  /* fileio errors */
108  /* network errors */
113  /* database errors */
121  /* RPC errors */
130 
138 
147 typedef struct QofBackend_s QofBackend;
148 
150 typedef void (*QofBePercentageFunc) (/*@ null @*/ const char *message, double percent);
151 
154 
155 void qof_backend_run_begin(QofBackend *be, QofInstance *inst);
156 
157 gboolean qof_backend_begin_exists(const QofBackend *be);
158 
159 void qof_backend_run_commit(QofBackend *be, QofInstance *inst);
160 
161 gboolean qof_backend_commit_exists(const QofBackend *be);
163 
168 
172 
173 
183 gboolean
184 qof_load_backend_library(const gchar *directory, const gchar* module_name);
185 
188 
191 
192 void qof_book_set_backend (QofBook *book, QofBackend *);
193 
194 #ifdef __cplusplus
195 }
196 #endif
197 
198 #endif /* QOF_BACKEND_H */
199 
void qof_backend_set_error(QofBackend *be, QofBackendError err)
QofBackendError
The errors that can be reported to the GUI & other front-end users.
Definition: qofbackend.h:59
Object instance holds common fields that most gnucash objects use.
void(* QofBePercentageFunc)(const char *message, double percent)
DOCUMENT ME!
Definition: qofbackend.h:150
void qof_finalize_backend_libraries(void)
Finalize all loaded backend sharable libraries.
QofBackendError qof_backend_get_error(QofBackend *be)
gboolean qof_load_backend_library(const gchar *directory, const gchar *module_name)
Load a QOF-compatible backend shared library.
QofBackend * qof_book_get_backend(const QofBook *book)
Retrieve the backend used by this book.