QOF  0.7.5
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 
321 
322 #ifndef QOF_DISABLE_DEPRECATED
323 
326  gchar *error_msg;
327 #endif
328  /* stack of previous errors.
329  Similar errors can repeat within the stack. */
330  GList * error_stack;
331 
332 
333  KvpFrame *backend_configuration;
334  gint config_count;
338  gchar *fullpath;
339 
341  void (*price_lookup) (QofBackend *, gpointer);
342 
344  void (*export) (QofBackend *, QofBook *);
345 
346 };
347 
355 void
357 
358 void qof_backend_init (QofBackend * be);
359 
364 gchar qof_book_get_open_marker (QofBook * book);
365 
373 gint32 qof_book_get_version (QofBook * book);
374 
379 guint32 qof_book_get_idata (QofBook * book);
380 
381 void qof_book_set_version (QofBook * book, gint32 version);
382 
383 void qof_book_set_idata (QofBook * book, guint32 idata);
384 
388 #endif /* QOF_BACKEND_P_H */