mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
add clarifying comments
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8578 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
7111ca86d0
commit
8d97c8b30f
@ -25,6 +25,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "Backend.h"
|
||||
#include "BackendP.h"
|
||||
|
||||
/* static short module = MOD_ENGINE; */
|
||||
@ -111,7 +112,6 @@ xaccInitBackend(Backend *be)
|
||||
be->compile_query = NULL;
|
||||
be->free_query = NULL;
|
||||
be->run_query = NULL;
|
||||
be->price_lookup = NULL;
|
||||
|
||||
be->sync = NULL;
|
||||
|
||||
@ -123,6 +123,8 @@ xaccInitBackend(Backend *be)
|
||||
be->error_msg = NULL;
|
||||
be->percentage = NULL;
|
||||
|
||||
/* XXX remove these */
|
||||
be->price_lookup = NULL;
|
||||
be->export = NULL;
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
typedef enum {
|
||||
ERR_BACKEND_NO_ERR = 0,
|
||||
ERR_BACKEND_NO_BACKEND, /**< Backend * pointer was null the err routine
|
||||
or no backend handler (ENOSYS) */
|
||||
or no backend handler (ENOSYS) */
|
||||
ERR_BACKEND_BAD_URL, /**< Can't parse url */
|
||||
ERR_BACKEND_NO_SUCH_DB, /**< the named database doesn't exist */
|
||||
ERR_BACKEND_CANT_CONNECT, /**< bad dbname/login/passwd or network failure */
|
||||
@ -52,11 +52,11 @@ typedef enum {
|
||||
ERR_BACKEND_SERVER_ERR, /**< error in response from server */
|
||||
ERR_BACKEND_ALLOC, /**< internal memory allocation failure */
|
||||
ERR_BACKEND_PERM, /**< user login successful, but no permissions
|
||||
to access the desired object */
|
||||
to access the desired object */
|
||||
ERR_BACKEND_MODIFIED, /**< commit of object update failed because
|
||||
another user has modified the object */
|
||||
another user has modified the object */
|
||||
ERR_BACKEND_MOD_DESTROY, /**< commit of object update failed because
|
||||
another user has deleted the object */
|
||||
another user has deleted the object */
|
||||
ERR_BACKEND_MISC, /**< undetermined error */
|
||||
|
||||
/* fileio errors */
|
||||
@ -80,13 +80,13 @@ typedef enum {
|
||||
ERR_SQL_DB_BUSY, /**< database is busy, cannot upgrade version */
|
||||
|
||||
/* RPC errors */
|
||||
ERR_RPC_HOST_UNK = 4000, /**< Host unknown */
|
||||
ERR_RPC_CANT_BIND, /**< can't bind to address */
|
||||
ERR_RPC_CANT_ACCEPT, /**< can't accept connection */
|
||||
ERR_RPC_NO_CONNECTION, /**< no connection to server */
|
||||
ERR_RPC_BAD_VERSION, /**< RPC Version Mismatch */
|
||||
ERR_RPC_FAILED, /**< Operation failed */
|
||||
ERR_RPC_NOT_ADDED, /**< object not added */
|
||||
ERR_RPC_HOST_UNK = 4000, /**< Host unknown */
|
||||
ERR_RPC_CANT_BIND, /**< can't bind to address */
|
||||
ERR_RPC_CANT_ACCEPT, /**< can't accept connection */
|
||||
ERR_RPC_NO_CONNECTION, /**< no connection to server */
|
||||
ERR_RPC_BAD_VERSION, /**< RPC Version Mismatch */
|
||||
ERR_RPC_FAILED, /**< Operation failed */
|
||||
ERR_RPC_NOT_ADDED, /**< object not added */
|
||||
} GNCBackendError;
|
||||
|
||||
/** \brief Pseudo-object providing an interface between the
|
||||
|
@ -44,10 +44,9 @@
|
||||
|
||||
#include "Backend.h"
|
||||
#include "QueryNew.h"
|
||||
#include "gnc-book.h"
|
||||
#include "gnc-session.h"
|
||||
|
||||
#include "gnc-pricedb.h"
|
||||
|
||||
/*
|
||||
* The session_begin() routine gives the backend a second initialization
|
||||
* opportunity. It is suggested that the backend check that
|
||||
@ -243,7 +242,6 @@ struct backend_s
|
||||
gpointer (*compile_query) (Backend *, QueryNew *);
|
||||
void (*free_query) (Backend *, gpointer);
|
||||
void (*run_query) (Backend *, gpointer);
|
||||
void (*price_lookup) (Backend *, GNCPriceLookup *);
|
||||
|
||||
void (*sync) (Backend *, GNCBook *);
|
||||
|
||||
@ -257,7 +255,20 @@ struct backend_s
|
||||
GNCBackendError last_err;
|
||||
char * error_msg;
|
||||
|
||||
/* Export should really _NOT_ be here, but is left here for now */
|
||||
/* XXX price_lookup should be removed during the redesign
|
||||
* of the SQL backend... prices can now be queried using
|
||||
* the generic query mechanism.
|
||||
*
|
||||
* Note the correct signature for this call is
|
||||
* void (*price_lookup) (Backend *, GNCPriceLookup *);
|
||||
* we use gpointer to avoid an unwanted include file dependency.
|
||||
*/
|
||||
void (*price_lookup) (Backend *, gpointer);
|
||||
|
||||
/* XXX Export should really _NOT_ be here, but is left here for now.
|
||||
* I'm not sure where this should be going to. It should be
|
||||
* removed ASAP.
|
||||
*/
|
||||
void (*export) (Backend *, GNCBook *);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user