QOF  0.8.7
qofbackend-p.h
Go to the documentation of this file.
1 /********************************************************************\
2  * qofbackend-p.h -- private api for data storage backend *
3  * *
4  * This program is free software; you can redistribute it and/or *
5  * modify it under the terms of the GNU General Public License as *
6  * published by the Free Software Foundation; either version 2 of *
7  * the License, or (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License*
15  * along with this program; if not, contact: *
16  * *
17  * Free Software Foundation Voice: +1-617-542-5942 *
18  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
19  * Boston, MA 02110-1301, USA gnu@gnu.org *
20  * *
21 \********************************************************************/
40 #ifndef QOF_BACKEND_P_H
41 #define QOF_BACKEND_P_H
42 
43 #include "qofinstance-p.h"
44 #include "qofquery.h"
45 #include "qofsession.h"
46 
239 {
241  const gchar *provider_name;
242 
247  const gchar *access_method;
248 
255 
260  QofBackend *(*backend_new) (void);
261 
277  gboolean (*check_data_type) (const gchar *);
278 
281 };
282 
284 {
285  void (*session_begin) (QofBackend * be,
286  QofSession * session,
287  const gchar * book_id,
288  gboolean ignore_lock,
289  gboolean create_if_nonexistent);
290  void (*session_end) (QofBackend *);
291  void (*destroy_backend) (QofBackend *);
292  void (*load) (QofBackend *, QofBook *);
293  void (*begin) (QofBackend *, QofInstance *);
294  void (*commit) (QofBackend *, QofInstance *);
295  void (*rollback) (QofBackend *, QofInstance *);
296  gpointer (*compile_query) (QofBackend *, QofQuery *);
297  void (*free_query) (QofBackend *, gpointer);
298  void (*run_query) (QofBackend *, gpointer);
299  void (*sync) (QofBackend *, QofBook *);
300  void (*load_config) (QofBackend *, KvpFrame *);
301  KvpFrame *(*get_config) (QofBackend *);
302  gint64 (*counter) (QofBackend *, const gchar * counter_name);
303  gboolean (*events_pending) (QofBackend *);
304  gboolean (*process_events) (QofBackend *);
305  QofBePercentageFunc percentage;
306  QofBackendProvider *provider;
307 
320  gboolean (*save_may_clobber_data) (QofBackend *);
321 
322  /* stack of previous errors.
323  Similar errors can repeat within the stack. */
324  GList * error_stack;
325 
326 
327  KvpFrame *backend_configuration;
328  gint config_count;
332  gchar *fullpath;
333 
334 };
335 
343 void
345 
346 void qof_backend_init (QofBackend * be);
347 
352 gchar qof_book_get_open_marker (QofBook * book);
353 
361 gint32 qof_book_get_version (QofBook * book);
362 
367 guint32 qof_book_get_idata (QofBook * book);
368 
369 void qof_book_set_version (QofBook * book, gint32 version);
370 
371 void qof_book_set_idata (QofBook * book, guint32 idata);
372 
376 #endif /* QOF_BACKEND_P_H */
gchar * fullpath
Definition: qofbackend-p.h:332
Encapsulates a connection to a backend (persistent store)
gint32 qof_book_get_version(QofBook *book)
Definition: qofbook.c:285
void qof_backend_register_provider(QofBackendProvider *)
Definition: qofsession.c:59
gboolean partial_book_supported
Partial QofBook handler.
Definition: qofbackend-p.h:254
struct _KvpFrame KvpFrame
Definition: kvpframe.h:74
struct _QofQuery QofQuery
Definition: qofquery.h:85
find objects that match a certain expression.
guint32 qof_book_get_idata(QofBook *book)
Definition: qofbook.c:295
void(* QofBePercentageFunc)(const gchar *message, double percent)
DOCUMENT ME!
Definition: qofbackend.h:72
void(* provider_free)(QofBackendProvider *)
Definition: qofbackend-p.h:280
gchar qof_book_get_open_marker(QofBook *book)
Definition: qofbook.c:275
const gchar * access_method
Definition: qofbackend-p.h:247
gboolean(* check_data_type)(const gchar *)
Distinguish two providers with same access method.
Definition: qofbackend-p.h:277
const gchar * provider_name
Definition: qofbackend-p.h:241