Bug #638543: Remove the counter() method from the backends.

Patch by Matthijs Kooijman:

This method is not implemented by either of the backends and removing it
makes the subsequent commits possible.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20052 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2011-01-10 21:38:43 +00:00
parent ae30067f56
commit d565bdb982
4 changed files with 1 additions and 14 deletions

View File

@ -1310,8 +1310,6 @@ init_sql_backend( GncDbiBackend* dbi_be )
be->commit = gnc_dbi_commit_edit; be->commit = gnc_dbi_commit_edit;
be->rollback = gnc_dbi_rollback_edit; be->rollback = gnc_dbi_rollback_edit;
be->counter = NULL;
/* The gda backend will not be multi-user (for now)... */ /* The gda backend will not be multi-user (for now)... */
be->events_pending = NULL; be->events_pending = NULL;
be->process_events = NULL; be->process_events = NULL;

View File

@ -1219,8 +1219,6 @@ gnc_backend_new(void)
be->free_query = NULL; be->free_query = NULL;
be->run_query = NULL; be->run_query = NULL;
be->counter = NULL;
/* The file backend will never be multi-user... */ /* The file backend will never be multi-user... */
be->events_pending = NULL; be->events_pending = NULL;
be->process_events = NULL; be->process_events = NULL;

View File

@ -156,9 +156,6 @@
* data. Database backends should implement a more intelligent * data. Database backends should implement a more intelligent
* solution. * solution.
* *
* The counter() routine increments the named counter and returns the
* post-incremented value. Returns -1 if there is a problem.
*
* The events_pending() routines should return true if there are * The events_pending() routines should return true if there are
* external events which need to be processed to bring the * external events which need to be processed to bring the
* engine up to date with the backend. * engine up to date with the backend.
@ -317,7 +314,6 @@ struct QofBackend_s
void (*load_config) (QofBackend *, KvpFrame *); void (*load_config) (QofBackend *, KvpFrame *);
/*@ observer @*/ /*@ observer @*/
KvpFrame* (*get_config) (QofBackend *); KvpFrame* (*get_config) (QofBackend *);
gint64 (*counter) (QofBackend *, const char *counter_name);
gboolean (*events_pending) (QofBackend *); gboolean (*events_pending) (QofBackend *);
gboolean (*process_events) (QofBackend *); gboolean (*process_events) (QofBackend *);

View File

@ -409,12 +409,7 @@ qof_book_get_counter (QofBook *book, const char *counter_name)
return -1; return -1;
} }
/* If we've got a backend with a counter method, call it */ /* Use the KVP in the book */
be = book->backend;
if (be && be->counter)
return ((be->counter)(be, counter_name));
/* If not, then use the KVP in the book */
kvp = qof_book_get_slots (book); kvp = qof_book_get_slots (book);
if (!kvp) if (!kvp)