QOF: qofbackend.h Source File

QOF 0.7.5

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

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 gnu@gnu.org *
19 * *
20 \********************************************************************/
42 #ifndef QOF_BACKEND_H
43 #define QOF_BACKEND_H
44
45 #include "qofinstance.h"
46
47 #define QOF_MOD_BACKEND "qof-backend"
48
54 typedef gint32 QofErrorId;
55
60 typedef struct QofBackendProvider_s QofBackendProvider;
61
69 typedef struct QofBackend_s QofBackend;
70
72 typedef void (*QofBePercentageFunc) (const gchar * message, double percent);
73
83 void qof_backend_run_begin (QofBackend * be, QofInstance * inst);
84
85 gboolean qof_backend_begin_exists (QofBackend * be);
86
87 void qof_backend_run_commit (QofBackend * be, QofInstance * inst);
88
89 gboolean qof_backend_commit_exists (QofBackend * be);
114 typedef struct QofBackendOption_s
115 {
116 KvpValueType type;
118 const gchar *option_name;
119 const gchar *description;
120 const gchar *tooltip;
121 gpointer value;
122 } QofBackendOption;
123
125 void qof_backend_prepare_frame (QofBackend * be);
126
128 void qof_backend_prepare_option (QofBackend * be, QofBackendOption * option);
129
131 KvpFrame *qof_backend_complete_frame (QofBackend * be);
132
134 typedef void (*QofBackendOptionCB) (QofBackendOption *, gpointer data);
135
137 void
138 qof_backend_option_foreach (KvpFrame * config, QofBackendOptionCB cb,
139 gpointer data);
140
149 void qof_backend_load_config (QofBackend * be, KvpFrame * config);
150
168 KvpFrame *qof_backend_get_config (QofBackend * be);
181 gboolean
182 qof_load_backend_library (const gchar * directory,
183 const gchar * filename, const gchar * init_fcn);
184
186 QofBackend *qof_book_get_backend (QofBook * book);
187
192 void qof_book_set_backend (QofBook * book, QofBackend *);
193
196 #endif /* QOF_BACKEND_H */
QofBackendOption
struct QofBackendOption_s QofBackendOption
QofInstance_s
Definition: qofinstance-p.h:35
QofBackendProvider_s
Definition: qofbackend-p.h:238
KvpValueType
KvpValueType
possible types in the union KvpValue
Definition: kvpframe.h:87
QofBackendOption_s::description
const gchar * description
Definition: qofbackend.h:119
QofErrorId
gint32 QofErrorId
The ID of this error.
Definition: qofbackend.h:54
KvpFrame
struct _KvpFrame KvpFrame
Definition: kvpframe.h:74
qof_load_backend_library
gboolean qof_load_backend_library(const gchar *directory, const gchar *filename, const gchar *init_fcn)
Load a QOF-compatible backend shared library.
Definition: qofbackend.c:431
qofinstance.h
Object instance holds common fields that most QofObjects use.
qof_backend_complete_frame
KvpFrame * qof_backend_complete_frame(QofBackend *be)
Definition: qofbackend.c:200
QofBackendOptionCB
void(* QofBackendOptionCB)(QofBackendOption *, gpointer data)
Definition: qofbackend.h:134
qof_book_set_backend
void qof_book_set_backend(QofBook *book, QofBackend *)
Set the backend used by this book.
Definition: qofbook.c:170
qof_backend_prepare_option
void qof_backend_prepare_option(QofBackend *be, QofBackendOption *option)
Definition: qofbackend.c:111
QofBePercentageFunc
void(* QofBePercentageFunc)(const gchar *message, double percent)
DOCUMENT ME!
Definition: qofbackend.h:72
qof_backend_option_foreach
void qof_backend_option_foreach(KvpFrame *config, QofBackendOptionCB cb, gpointer data)
Definition: qofbackend.c:383
QofBackendOption_s::option_name
const gchar * option_name
Definition: qofbackend.h:118
qof_backend_get_config
KvpFrame * qof_backend_get_config(QofBackend *be)
Get the available configuration options.
Definition: qofbackend.c:410
QofBackendOption_s::tooltip
const gchar * tooltip
Definition: qofbackend.h:120
qof_book_get_backend
QofBackend * qof_book_get_backend(QofBook *book)
Retrieve the backend used by this book.
Definition: qofbook.c:154
_QofBook
Definition: qofbook-p.h:48
qof_backend_load_config
void qof_backend_load_config(QofBackend *be, KvpFrame *config)
Load configuration options specific to this backend.
Definition: qofbackend.c:400
QofBackendOption_s::type
KvpValueType type
Definition: qofbackend.h:116
QofBackend_s
Definition: qofbackend-p.h:283
QofBackendOption_s
Definition: qofbackend.h:114
QofBackendOption_s::value
gpointer value
Definition: qofbackend.h:121
qof_backend_prepare_frame
void qof_backend_prepare_frame(QofBackend *be)
Definition: qofbackend.c:99