r18800 - gnucash/trunk/src - Rename GNCBook into QofBook everywhere and remove separate header gnc-book.h.
Christian Stimming
cstim at code.gnucash.org
Wed Mar 3 15:47:10 EST 2010
Author: cstim
Date: 2010-03-03 15:47:10 -0500 (Wed, 03 Mar 2010)
New Revision: 18800
Trac: http://svn.gnucash.org/trac/changeset/18800
Removed:
gnucash/trunk/src/engine/gnc-book.h
Modified:
gnucash/trunk/src/app-utils/gnc-sx-instance-model.c
gnucash/trunk/src/app-utils/gnc-ui-util.c
gnucash/trunk/src/app-utils/guile-util.h
gnucash/trunk/src/backend/sql/gnc-book-sql.c
gnucash/trunk/src/business/business-gnome/business-gnome-utils.h
gnucash/trunk/src/business/business-gnome/dialog-billterms.h
gnucash/trunk/src/business/business-gnome/dialog-date-close.h
gnucash/trunk/src/business/business-gnome/dialog-payment.h
gnucash/trunk/src/business/business-ledger/gncEntryLedger.h
gnucash/trunk/src/business/business-ledger/gncEntryLedgerLoad.c
gnucash/trunk/src/business/business-ledger/gncEntryLedgerP.h
gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.h
gnucash/trunk/src/engine/CMakeLists.txt
gnucash/trunk/src/engine/Makefile.am
gnucash/trunk/src/engine/SchedXaction.c
gnucash/trunk/src/engine/engine.i
gnucash/trunk/src/engine/gnc-engine.h
gnucash/trunk/src/experimental/cgi-bin/gnc-server.c
gnucash/trunk/src/experimental/cgi-bin/hello.c
gnucash/trunk/src/experimental/cgi-bin/hello2.c
gnucash/trunk/src/experimental/cgi-bin/hello3.c
gnucash/trunk/src/gnome-search/gnc-general-search.h
gnucash/trunk/src/gnome-utils/dialog-query-list.c
gnucash/trunk/src/gnome-utils/dialog-transfer.c
gnucash/trunk/src/gnome/dialog-sx-editor.c
gnucash/trunk/src/gnome/druid-loan.c
gnucash/trunk/src/gnome/druid-stock-split.c
gnucash/trunk/src/gnome/gnc-plugin-page-register.c
gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c
gnucash/trunk/src/import-export/csv/gnc-csv-import.c
gnucash/trunk/src/import-export/csv/gnc-csv-model.c
gnucash/trunk/src/import-export/hbci/gnc-hbci-gettrans.c
gnucash/trunk/src/import-export/hbci/gnc-hbci-kvp.c
gnucash/trunk/src/import-export/hbci/gnc-hbci-kvp.h
gnucash/trunk/src/import-export/hbci/gnc-hbci-utils.h
gnucash/trunk/src/import-export/import-match-map.c
gnucash/trunk/src/import-export/import-match-map.h
gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c
gnucash/trunk/src/import-export/ofx/gnc-ofx-import.c
gnucash/trunk/src/libqof/qof/qofbook.c
gnucash/trunk/src/libqof/qof/qofbook.h
gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
Log:
Rename GNCBook into QofBook everywhere and remove separate header gnc-book.h.
The former was already #define'd on the latter, so its removal gets
rid of one level of indirection which makes function lookup easier.
Also, the macro (!) qof_book_get_slots was turned into a normal
function again because that's what functions are for (and otherwise
the additional declaration in engine.i would break).
Modified: gnucash/trunk/src/app-utils/gnc-sx-instance-model.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-sx-instance-model.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/app-utils/gnc-sx-instance-model.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -41,7 +41,6 @@
#include "Scrub.h"
#include "Split.h"
#include "Transaction.h"
-#include "gnc-book.h"
#include "gnc-commodity.h"
#include "gnc-event.h"
#include "gnc-exp-parser.h"
Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -39,7 +39,6 @@
#include <string.h>
#include "Account.h"
-#include "gnc-book.h"
#include "gnc-component-manager.h"
#include "qof.h"
#include "gnc-engine.h"
Modified: gnucash/trunk/src/app-utils/guile-util.h
===================================================================
--- gnucash/trunk/src/app-utils/guile-util.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/app-utils/guile-util.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -27,7 +27,6 @@
#include <glib.h>
#include <libguile.h>
-#include "gnc-book.h"
#include "qof.h"
#include "Account.h"
Modified: gnucash/trunk/src/backend/sql/gnc-book-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-book-sql.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/backend/sql/gnc-book-sql.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -38,7 +38,6 @@
#include "gnc-slots-sql.h"
#include "gnc-engine.h"
-#include "gnc-book.h"
#include "SX-book.h"
#include "SX-book-p.h"
@@ -146,7 +145,7 @@
pBook = be->primary_book;
if( pBook == NULL ) {
- pBook = gnc_book_new();
+ pBook = qof_book_new();
}
qof_book_begin_edit( pBook );
Modified: gnucash/trunk/src/business/business-gnome/business-gnome-utils.h
===================================================================
--- gnucash/trunk/src/business/business-gnome/business-gnome-utils.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/business/business-gnome/business-gnome-utils.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -25,7 +25,6 @@
#ifndef GNC_BUSINESS_GNOME_UTILS_H_
#define GNC_BUSINESS_GNOME_UTILS_H_
-#include "gnc-book.h"
#include "gncOwner.h"
#include "gncBillTerm.h"
#include "gncTaxTable.h"
Modified: gnucash/trunk/src/business/business-gnome/dialog-billterms.h
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-billterms.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/business/business-gnome/dialog-billterms.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -26,7 +26,7 @@
typedef struct _billterms_window BillTermsWindow;
-#include "gnc-book.h"
+#include "qof.h"
/* Create a billterms window */
BillTermsWindow * gnc_ui_billterms_window_new (QofBook *book);
Modified: gnucash/trunk/src/business/business-gnome/dialog-date-close.h
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-date-close.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/business/business-gnome/dialog-date-close.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -25,7 +25,6 @@
#define _DIALOG_DATE_CLOSE_H
#include "Account.h"
-#include "gnc-book.h"
#include "qof.h"
#include "gncBillTerm.h"
Modified: gnucash/trunk/src/business/business-gnome/dialog-payment.h
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-payment.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/business/business-gnome/dialog-payment.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -26,7 +26,6 @@
typedef struct _payment_window PaymentWindow;
-#include "gnc-book.h"
#include "gncOwner.h"
#include "gncInvoice.h"
Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedger.h
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedger.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedger.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -27,7 +27,6 @@
#include "QueryNew.h"
#include "gncEntry.h"
#include "gncOrder.h"
-#include "gnc-book.h"
#include "table-allgui.h"
typedef enum
Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerLoad.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerLoad.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerLoad.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -374,7 +374,7 @@
/* Compute the proper taxtable */
odb = gnc_option_db_new_for_type (GNC_ID_BOOK);
- gnc_option_db_load_from_kvp (odb, gnc_book_get_slots (ledger->book));
+ gnc_option_db_load_from_kvp (odb, qof_book_get_slots (ledger->book));
switch (gncOwnerGetType (owner))
{
Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerP.h
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerP.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerP.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -25,7 +25,6 @@
#define GNC_ENTRY_LEDGERP_H
#include "qof.h"
-#include "gnc-book.h"
#include "table-allgui.h"
#include "gncEntryLedger.h"
Modified: gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.h
===================================================================
--- gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/business/dialog-tax-table/dialog-tax-table.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -26,7 +26,6 @@
typedef struct _taxtable_window TaxTableWindow;
-#include "gnc-book.h"
#include "gncTaxTable.h"
/* Create a new tax-table by name */
Modified: gnucash/trunk/src/engine/CMakeLists.txt
===================================================================
--- gnucash/trunk/src/engine/CMakeLists.txt 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/engine/CMakeLists.txt 2010-03-03 20:47:10 UTC (rev 18800)
@@ -39,7 +39,6 @@
engine-helpers.h
glib-helpers.h
gnc-associate-account.h
- gnc-book.h
gnc-budget.h
gnc-commodity.h
gnc-engine.h
Modified: gnucash/trunk/src/engine/Makefile.am
===================================================================
--- gnucash/trunk/src/engine/Makefile.am 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/engine/Makefile.am 2010-03-03 20:47:10 UTC (rev 18800)
@@ -76,7 +76,6 @@
engine-helpers.h \
glib-helpers.h \
gnc-associate-account.h \
- gnc-book.h \
gnc-budget.h \
gnc-commodity.h \
gnc-engine.h \
Modified: gnucash/trunk/src/engine/SchedXaction.c
===================================================================
--- gnucash/trunk/src/engine/SchedXaction.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/engine/SchedXaction.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -30,7 +30,6 @@
#include "qof.h"
#include "Account.h"
-#include "gnc-book.h"
#include "SX-book.h"
#include "SX-ttinfo.h"
#include "SchedXaction.h"
Modified: gnucash/trunk/src/engine/engine.i
===================================================================
--- gnucash/trunk/src/engine/engine.i 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/engine/engine.i 2010-03-03 20:47:10 UTC (rev 18800)
@@ -197,13 +197,7 @@
%clear GSList *key_path;
-%inline %{
-static KvpFrame * gnc_book_get_slots(QofBook *book) {
- return qof_instance_get_slots(QOF_INSTANCE(book));
-}
-%}
-
%init {
{
char tmp[100];
Deleted: gnucash/trunk/src/engine/gnc-book.h
===================================================================
--- gnucash/trunk/src/engine/gnc-book.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/engine/gnc-book.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -1,14 +0,0 @@
-#include "qof.h"
-
-#define GNCBook QofBook
-
-#define gnc_book_new qof_book_new
-#define gnc_book_destroy qof_book_destroy
-#define gnc_book_get_guid qof_book_get_guid
-#define gnc_book_get_slots qof_book_get_slots
-#define gnc_book_not_saved qof_book_not_saved
-#define gnc_book_set_data qof_book_set_data
-#define gnc_book_get_data qof_book_get_data
-#define gnc_book_get_backend qof_book_get_backend
-#define gnc_book_get_entity_table qof_book_get_entity_table
-#define gnc_book_get_counter qof_book_get_counter
Modified: gnucash/trunk/src/engine/gnc-engine.h
===================================================================
--- gnucash/trunk/src/engine/gnc-engine.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/engine/gnc-engine.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -205,7 +205,7 @@
typedef GList TransList;
/** GList of GUIDs of a Account */
typedef GList AccountGUIDList;
-/** GList of GUIDs of a GNCBook */
+/** GList of GUIDs of a QofBook */
typedef GList BookGUIDList;
typedef void (*EngineCommitErrorCallback)( gpointer data, QofBackendError errcode );
Modified: gnucash/trunk/src/experimental/cgi-bin/gnc-server.c
===================================================================
--- gnucash/trunk/src/experimental/cgi-bin/gnc-server.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/experimental/cgi-bin/gnc-server.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -15,7 +15,6 @@
#include <string.h>
#include <unistd.h>
-#include "gnc-book.h"
#include "gnc-engine.h"
#include "io-gncxml.h"
@@ -211,7 +210,7 @@
{
int err, fake_argc =1;
char * fake_argv[] = {"hello", 0};
- GNCBook *book;
+ QofBook *book;
Account *root;
char *request_bufp, *reply_bufp;
int rc, sz;
@@ -221,7 +220,7 @@
/* contact the database, which is a flat file for this demo */
/* this should really be an SQL server */
- book = gnc_book_new ();
+ book = qof_book_new ();
rc = gnc_book_begin (book, "file:/tmp/demo.xac", FALSE);
if (!rc) goto bookerrexit;
@@ -374,7 +373,7 @@
FCGI_Finish();
/* close the book */
- gnc_book_destroy (book);
+ qof_book_destroy (book);
/* shut down the engine */
gnc_engine_shutdown ();
Modified: gnucash/trunk/src/experimental/cgi-bin/hello.c
===================================================================
--- gnucash/trunk/src/experimental/cgi-bin/hello.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/experimental/cgi-bin/hello.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -13,7 +13,6 @@
#include <stdlib.h>
#include <string.h>
-#include "gnc-book.h"
#include "gnc-commodity.h"
#include "gnc-engine.h"
#include "io-gncxml-v2.h"
@@ -24,7 +23,7 @@
{
int fake_argc =1;
char * fake_argv[] = {"hello", 0};
- GNCBook *book;
+ QofBook *book;
int rc;
/* intitialize the engine */
@@ -38,7 +37,7 @@
}
/* contact the database, which is a flat file for this demo */
- book = gnc_book_new ();
+ book = qof_book_new ();
rc = gnc_book_begin (book, "file:/tmp/demo.gml", FALSE, FALSE);
if (!rc) {
@@ -69,7 +68,7 @@
bookerrexit:
/* close the book */
- gnc_book_destroy (book);
+ qof_book_destroy (book);
/* shut down the engine */
gnc_engine_shutdown ();
Modified: gnucash/trunk/src/experimental/cgi-bin/hello2.c
===================================================================
--- gnucash/trunk/src/experimental/cgi-bin/hello2.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/experimental/cgi-bin/hello2.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -10,7 +10,6 @@
#include <stdlib.h>
#include <string.h>
-#include "gnc-book.h"
#include "gnc-engine.h"
#include "io-gncxml.h"
#include "Query.h"
@@ -20,7 +19,7 @@
{
int fake_argc =1;
char * fake_argv[] = {"hello2", 0};
- GNCBook *book;
+ QofBook *book;
Account *root;
Query *q, *qq;
GList *split_list, *sl2, *node;
@@ -33,7 +32,7 @@
gnc_engine_init (fake_argc, fake_argv);
/* contact the database, which is a flat file for this demo */
- book = gnc_book_new ();
+ book = qof_book_new ();
rc = gnc_book_begin (book, "file:/tmp/demo.xac", FALSE);
if (!rc) {
@@ -107,7 +106,7 @@
bookerrexit:
/* close the book */
- gnc_book_destroy (book);
+ qof_book_destroy (book);
/* shut down the engine */
gnc_engine_shutdown ();
Modified: gnucash/trunk/src/experimental/cgi-bin/hello3.c
===================================================================
--- gnucash/trunk/src/experimental/cgi-bin/hello3.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/experimental/cgi-bin/hello3.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -14,7 +14,6 @@
#include <string.h>
#include <unistd.h>
-#include "gnc-book.h"
#include "gnc-engine.h"
#include "io-gncxml.h"
@@ -26,7 +25,7 @@
{
int err, fake_argc =1;
char * fake_argv[] = {"hello", 0};
- GNCBook *book;
+ QofBook *book;
Account *root;
char *bufp;
int rc, sz;
@@ -35,7 +34,7 @@
gnc_engine_init (fake_argc, fake_argv);
/* contact the database, which is a flat file for this demo */
- book = gnc_book_new ();
+ book = qof_book_new ();
rc = gnc_book_begin (book, "file:/tmp/demo.xac", FALSE);
if (!rc) goto bookerrexit;
@@ -124,7 +123,7 @@
FCGI_Finish();
/* close the book */
- gnc_book_destroy (book);
+ qof_book_destroy (book);
/* shut down the engine */
gnc_engine_shutdown ();
Modified: gnucash/trunk/src/gnome/dialog-sx-editor.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-editor.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/gnome/dialog-sx-editor.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -38,14 +38,12 @@
#include <time.h>
#include "qof.h"
-#include "gnc-book.h"
#include "Account.h"
#include "SchedXaction.h"
#include "SX-book.h"
#include "dialog-preferences.h"
#include "dialog-sx-editor.h"
#include "dialog-utils.h"
-#include "gnc-book.h"
#include "gnc-component-manager.h"
#include "gnc-date.h"
#include "gnc-date-edit.h"
Modified: gnucash/trunk/src/gnome/druid-loan.c
===================================================================
--- gnucash/trunk/src/gnome/druid-loan.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/gnome/druid-loan.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -36,7 +36,6 @@
#include "SX-book.h"
#include "SX-ttinfo.h"
#include "druid-utils.h"
-#include "gnc-book.h"
#include "gnc-amount-edit.h"
#include "gnc-account-sel.h"
#include "gnc-date.h"
Modified: gnucash/trunk/src/gnome/druid-stock-split.c
===================================================================
--- gnucash/trunk/src/gnome/druid-stock-split.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/gnome/druid-stock-split.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -32,7 +32,6 @@
#include "druid-stock-split.h"
#include "druid-utils.h"
#include "gnc-amount-edit.h"
-#include "gnc-book.h"
#include "gnc-component-manager.h"
#include "gnc-currency-edit.h"
#include "gnc-date-edit.h"
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-register.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-register.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -51,7 +51,6 @@
#include "dialog-transfer.h"
#include "dialog-utils.h"
#include "druid-stock-split.h"
-#include "gnc-book.h"
#include "gnc-gconf-utils.h"
#include "gnc-component-manager.h"
#include "gnc-date.h"
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-sx-list.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -49,7 +49,6 @@
#include "Transaction.h"
#include "dialog-sx-editor.h"
#include "dialog-utils.h"
-#include "gnc-book.h"
#include "gnc-commodity.h"
#include "gnc-component-manager.h"
#include "gnc-dense-cal.h"
Modified: gnucash/trunk/src/gnome-search/gnc-general-search.h
===================================================================
--- gnucash/trunk/src/gnome-search/gnc-general-search.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/gnome-search/gnc-general-search.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -33,7 +33,6 @@
#define GNC_GENERAL_SEARCH_H
#include "dialog-search.h"
-#include "gnc-book.h"
#define GNC_TYPE_GENERAL_SEARCH \
(gnc_general_search_get_type ())
Modified: gnucash/trunk/src/gnome-utils/dialog-query-list.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-query-list.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/gnome-utils/dialog-query-list.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -26,7 +26,6 @@
#include "config.h"
#include <gtk/gtk.h>
-#include "gnc-book.h"
#include "QueryNew.h"
#include "dialog-utils.h"
@@ -72,9 +71,9 @@
for (node = gncQueryGetBooks(q); node; node = node->next)
{
- GNCBook *book = node->data;
+ QofBook *book = node->data;
GUID *guid = xaccGUIDMalloc();
- *guid = *(gnc_book_get_guid(book));
+ *guid = *(qof_book_get_guid(book));
dql->books = g_list_prepend(dql->books, guid);
}
}
Modified: gnucash/trunk/src/gnome-utils/dialog-transfer.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-transfer.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/gnome-utils/dialog-transfer.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -31,7 +31,6 @@
#include "dialog-transfer.h"
#include "dialog-utils.h"
#include "gnc-amount-edit.h"
-#include "gnc-book.h"
#include "gnc-component-manager.h"
#include "gnc-date-edit.h"
#include "gnc-engine.h"
Modified: gnucash/trunk/src/import-export/csv/gnc-csv-import.c
===================================================================
--- gnucash/trunk/src/import-export/csv/gnc-csv-import.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/import-export/csv/gnc-csv-import.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -31,7 +31,6 @@
#include "import-main-matcher.h"
#include "gnc-file.h"
-#include "gnc-book.h"
#include "gnc-ui-util.h"
#include "gnc-glib-utils.h"
#include "gnc-gui-query.h"
Modified: gnucash/trunk/src/import-export/csv/gnc-csv-model.c
===================================================================
--- gnucash/trunk/src/import-export/csv/gnc-csv-model.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/import-export/csv/gnc-csv-model.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -1,6 +1,5 @@
#include "gnc-csv-model.h"
-#include "gnc-book.h"
#include <glib/gi18n.h>
Modified: gnucash/trunk/src/import-export/hbci/gnc-hbci-gettrans.c
===================================================================
--- gnucash/trunk/src/import-export/hbci/gnc-hbci-gettrans.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/import-export/hbci/gnc-hbci-gettrans.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -253,7 +253,7 @@
/* time_t tt1, tt2; */
/*struct tm tm1, tm2;*/
Account *gnc_acc;
- GNCBook *book;
+ QofBook *book;
Transaction *gnc_trans;
const GWEN_TIME *valutaDate, *normalDate;
Split *split;
Modified: gnucash/trunk/src/import-export/hbci/gnc-hbci-kvp.c
===================================================================
--- gnucash/trunk/src/import-export/hbci/gnc-hbci-kvp.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/import-export/hbci/gnc-hbci-kvp.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -122,30 +122,30 @@
-/* GNCBook */
+/* QofBook */
#define HBCI_CONFIGFILE "config-filename"
#define HBCI_TEMPLATES "template-list"
-char *gnc_hbci_get_book_configfile (GNCBook *b)
+char *gnc_hbci_get_book_configfile (QofBook *b)
{
kvp_frame *frame = gnc_hbci_get_book_kvp (b, FALSE);
kvp_value *value = kvp_frame_get_slot (frame, HBCI_CONFIGFILE);
return kvp_value_get_string (value);
}
-void gnc_hbci_set_book_configfile (GNCBook *b, const char *filename)
+void gnc_hbci_set_book_configfile (QofBook *b, const char *filename)
{
kvp_frame *frame = gnc_hbci_get_book_kvp (b, TRUE);
kvp_value *value = kvp_value_new_string (filename);
kvp_frame_set_slot_nc (frame, HBCI_CONFIGFILE, value);
qof_book_kvp_changed (b);
}
-GList *gnc_hbci_get_book_template_list (GNCBook *b)
+GList *gnc_hbci_get_book_template_list (QofBook *b)
{
kvp_frame *frame = gnc_hbci_get_book_kvp (b, FALSE);
kvp_value *value = kvp_frame_get_slot (frame, HBCI_TEMPLATES);
return kvp_value_get_glist (value);
}
-void gnc_hbci_set_book_template_list (GNCBook *b, GList *template_list)
+void gnc_hbci_set_book_template_list (QofBook *b, GList *template_list)
{
kvp_frame *frame = gnc_hbci_get_book_kvp (b, TRUE);
kvp_value *value = kvp_value_new_glist_nc (template_list);
@@ -154,13 +154,13 @@
}
#if 0
-GList *gnc_hbci_get_book_account_list (GNCBook *b)
+GList *gnc_hbci_get_book_account_list (QofBook *b)
{
kvp_frame *frame = gnc_hbci_get_book_kvp (b, FALSE);
kvp_value *value = kvp_frame_get_slot (frame, HBCI_ACCOUNTS);
return kvp_value_get_glist (value);
}
-void gnc_hbci_set_book_account_list (GNCBook *b, GList *account_list)
+void gnc_hbci_set_book_account_list (QofBook *b, GList *account_list)
{
kvp_frame *frame = gnc_hbci_get_book_kvp (b, TRUE);
kvp_value *value = kvp_value_new_glist_nc (account_list);
@@ -172,7 +172,7 @@
/* lowlevel */
/* getters for kvp frame in book */
-kvp_frame *gnc_hbci_get_book_kvp (GNCBook *b, gboolean create)
+kvp_frame *gnc_hbci_get_book_kvp (QofBook *b, gboolean create)
{
kvp_frame *toplevel = qof_book_get_slots (b);
kvp_frame *result = kvp_frame_get_frame (toplevel, HBCI_KEY);
Modified: gnucash/trunk/src/import-export/hbci/gnc-hbci-kvp.h
===================================================================
--- gnucash/trunk/src/import-export/hbci/gnc-hbci-kvp.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/import-export/hbci/gnc-hbci-kvp.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -26,7 +26,6 @@
#include <glib.h>
#include "qof.h"
#include "Account.h"
-#include "gnc-book.h"
/* Account */
@@ -67,35 +66,35 @@
void gnc_hbci_set_account_trans_retrieval (Account *a, Timespec time);
-/* GNCBook */
+/* QofBook */
/** Returns a non-copied pointer to the configfile string in the
- * GNCBook b. The char* is still owned by the kvp_frame, so don't free
+ * QofBook b. The char* is still owned by the kvp_frame, so don't free
* it until you want to delete the whole kvp_frame. */
-char *gnc_hbci_get_book_configfile (GNCBook *b);
-/** Set the configfile string in the GNCBook b. A copy of the string
+char *gnc_hbci_get_book_configfile (QofBook *b);
+/** Set the configfile string in the QofBook b. A copy of the string
* will be stored. The Book will be marked as "dirty". */
-void gnc_hbci_set_book_configfile (GNCBook *b, const char *filename);
+void gnc_hbci_set_book_configfile (QofBook *b, const char *filename);
/** Returns a non-copied pointer to the GList of kvp_frames which
* eventually are the template transactions, stored in the given
* book. */
-GList *gnc_hbci_get_book_template_list (GNCBook *b);
-void gnc_hbci_set_book_template_list (GNCBook *b, GList *template_list);
+GList *gnc_hbci_get_book_template_list (QofBook *b);
+void gnc_hbci_set_book_template_list (QofBook *b, GList *template_list);
#if 0
/** Returns a non-copied pointer to the GList of kvp_frames which
* eventually are the available HBCI accounts, stored in the given
* book. */
-GList *gnc_hbci_get_book_account_list (GNCBook *b);
-void gnc_hbci_set_book_account_list (GNCBook *b, GList *account_list);
+GList *gnc_hbci_get_book_account_list (QofBook *b);
+void gnc_hbci_set_book_account_list (QofBook *b, GList *account_list);
#endif
/* lowlevel */
/* internal getter for kvp frame in book. The create argument says
* to create the frame if it doesn't already exist. */
-kvp_frame *gnc_hbci_get_book_kvp (GNCBook *b, gboolean create);
+kvp_frame *gnc_hbci_get_book_kvp (QofBook *b, gboolean create);
/* internal getter for kvp frame in Account. The create argument says
* to create the frame if it doesn't already exist. */
Modified: gnucash/trunk/src/import-export/hbci/gnc-hbci-utils.h
===================================================================
--- gnucash/trunk/src/import-export/hbci/gnc-hbci-utils.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/import-export/hbci/gnc-hbci-utils.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -47,7 +47,6 @@
#include "gnc-ui.h"
#include "Account.h"
#include "Transaction.h"
-#include "gnc-book.h"
#include "import-main-matcher.h"
#include "hbci-interaction.h"
Modified: gnucash/trunk/src/import-export/import-match-map.c
===================================================================
--- gnucash/trunk/src/import-export/import-match-map.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/import-export/import-match-map.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -90,7 +90,7 @@
kvp_frame * frame;
if (!book) return NULL;
- frame = gnc_book_get_slots (book);
+ frame = qof_book_get_slots (book);
g_return_val_if_fail (frame != NULL, NULL);
return gnc_imap_create_from_frame (frame, NULL, book);
Modified: gnucash/trunk/src/import-export/import-match-map.h
===================================================================
--- gnucash/trunk/src/import-export/import-match-map.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/import-export/import-match-map.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -32,7 +32,6 @@
typedef struct _GncImportMatchMap GncImportMatchMap;
#include "Account.h"
-#include "gnc-book.h"
/** @{
Obtain an ImportMatchMap object from an Account or a Book */
Modified: gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c
===================================================================
--- gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -41,7 +41,6 @@
#include "gnc-log-replay.h"
#include "gnc-file.h"
#include "qof.h"
-#include "gnc-book.h"
#include "gnc-ui-util.h"
#include "gnc-gui-query.h"
Modified: gnucash/trunk/src/import-export/ofx/gnc-ofx-import.c
===================================================================
--- gnucash/trunk/src/import-export/ofx/gnc-ofx-import.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/import-export/ofx/gnc-ofx-import.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -45,7 +45,6 @@
#include "gnc-ofx-import.h"
#include "gnc-file.h"
#include "gnc-engine.h"
-#include "gnc-book.h"
#include "gnc-ui-util.h"
#include "gnc-glib-utils.h"
Modified: gnucash/trunk/src/libqof/qof/qofbook.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofbook.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/libqof/qof/qofbook.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -269,6 +269,11 @@
/* ====================================================================== */
+KvpFrame *qof_book_get_slots(const QofBook *book)
+{
+ return qof_instance_get_slots(QOF_INSTANCE(book));
+}
+
/* Store arbitrary pointers in the QofBook for data storage extensibility */
/* XXX if data is NULL, we should remove the key from the hash table!
*/
Modified: gnucash/trunk/src/libqof/qof/qofbook.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofbook.h 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/libqof/qof/qofbook.h 2010-03-03 20:47:10 UTC (rev 18800)
@@ -192,7 +192,7 @@
* between multiple users). To store application runtime data, use
* qof_book_set_data() instead.
*/
-#define qof_book_get_slots(book) qof_instance_get_slots(QOF_INSTANCE(book))
+KvpFrame *qof_book_get_slots(const QofBook *book);
/** The qof_book_set_data() allows arbitrary pointers to structs
* to be stored in QofBook. This is the "preferred" method for
Modified: gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c 2010-03-03 20:46:41 UTC (rev 18799)
+++ gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c 2010-03-03 20:47:10 UTC (rev 18800)
@@ -32,7 +32,6 @@
#include "SX-book.h"
#include "Transaction.h"
#include "gnc-component-manager.h"
-#include "gnc-book.h"
#include "gnc-date.h"
#include "gnc-engine.h"
#include "gnc-event.h"
More information about the gnucash-changes
mailing list