GnuCash  4.901
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 *
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 *
19  * *
20 \********************************************************************/
44 #ifndef QOF_BACKEND_H
45 #define QOF_BACKEND_H
47 #include "qofinstance.h"
48 #ifdef __cplusplus
49 extern "C"
50 {
51 #endif
53 #define QOF_MOD_BACKEND "qof.backend"
57 typedef enum
58 {
88  /* fileio errors */
106  /* network errors */
111  /* database errors */
119  /* RPC errors */
129 typedef struct QofBackend QofBackend;
131  /* The following functions are used in C files. */
137 /* Temporary wrapper so that we don't have to expose qof-backend.hpp to Transaction.c */
138  gboolean qof_backend_can_rollback (QofBackend*);
139  void qof_backend_rollback_instance (QofBackend*, QofInstance*);
150  gboolean
151  qof_load_backend_library(const gchar *directory, const gchar* module_name);
157  QofBackend* qof_book_get_backend (const QofBook *book);
159  void qof_book_set_backend (QofBook *book, QofBackend *);
163 typedef void (*QofBePercentageFunc) (/*@ null @*/ const char *message, double percent);
165 #ifdef __cplusplus
166 }
167 #endif
168 #endif /* QOF_BACKEND_H */
commit of object update failed because another user has deleted the object
Definition: qofbackend.h:77
No read access permission for the given file.
Definition: qofbackend.h:100
Lost connection to server.
Definition: qofbackend.h:65
can't accept connection
Definition: qofbackend.h:122
database is busy, cannot upgrade version
Definition: qofbackend.h:115
couldn't parse the data in the file
Definition: qofbackend.h:95
whatever it is, we can't parse it.
Definition: qofbackend.h:109
not found / no such file
Definition: qofbackend.h:92
The errors that can be reported to the GUI & other front-end users.
Definition: qofbackend.h:57
wrong kind of server, wrong data served
Definition: qofbackend.h:108
void qof_backend_set_error(QofBackend *, QofBackendError)
Set the error on the specified QofBackend.
commit of object update failed because another user has modified the object
Definition: qofbackend.h:75
RPC Version Mismatch.
Definition: qofbackend.h:124
database is old and needs upgrading
Definition: qofbackend.h:113
Object instance holds common fields that most gnucash objects use.
Operation failed.
Definition: qofbackend.h:125
Can't parse url.
Definition: qofbackend.h:62
in use by another user (ETXTBSY)
Definition: qofbackend.h:66
couldn't write to the file
Definition: qofbackend.h:97
file will be upgraded and not be able to be read by prior versions - warn users
Definition: qofbackend.h:103
QofBackendError qof_backend_get_error(QofBackend *)
Get the last backend error.
error in response from server
Definition: qofbackend.h:71
didn't recognize the file type
Definition: qofbackend.h:94
user login successful, but no permissions to access the desired object
Definition: qofbackend.h:73
file does not specify encoding
Definition: qofbackend.h:99
not enough bytes received
Definition: qofbackend.h:107
database is newer, we can't write to it
Definition: qofbackend.h:114
database doesn't contain expected data
Definition: qofbackend.h:112
EOVERFLOW - generated by strtol or strtoll.
Definition: qofbackend.h:81
User attempt to write to a directory reserved for internal use by GnuCash.
Definition: qofbackend.h:101
undetermined error
Definition: qofbackend.h:79
Host unknown.
Definition: qofbackend.h:120
file exists, is readable, but is empty
Definition: qofbackend.h:90
void qof_finalize_backend_libraries(void)
Finalize all loaded backend shareable libraries.
file/db version newer than what we can read
Definition: qofbackend.h:69
no backend handler found for this access method (ENOSYS)
Definition: qofbackend.h:60
read failed or file prematurely truncated
Definition: qofbackend.h:89
data in db is corrupt
Definition: qofbackend.h:70
LibDBI has numeric errors.
Definition: qofbackend.h:116
no connection to server
Definition: qofbackend.h:123
can't bind to address
Definition: qofbackend.h:121
the named database doesn't exist
Definition: qofbackend.h:63
gboolean qof_load_backend_library(const gchar *directory, const gchar *module_name)
Load a QOF-compatible backend shared library.
couldn't make a backup of the file
Definition: qofbackend.h:96
File exists, data would be destroyed.
Definition: qofbackend.h:67
mangled locks (unspecified error)
Definition: qofbackend.h:91
Backend * pointer was unexpectedly null.
Definition: qofbackend.h:61
cannot write to file/directory
Definition: qofbackend.h:68
bad dbname/login/passwd or network failure
Definition: qofbackend.h:64
void(* QofBePercentageFunc)(const char *message, double percent)
Definition: qofbackend.h:163
could not complete test for LibDBI bug
Definition: qofbackend.h:117
internal memory allocation failure
Definition: qofbackend.h:72
QofBackend * qof_book_get_backend(const QofBook *book)
Retrieve the backend used by this book.
Definition: qofbook.cpp:447
object not added
Definition: qofbackend.h:126
file version so old we can't read it
Definition: qofbackend.h:93
Could not open the file for reading.
Definition: qofbackend.h:98