remove vestiges of prior incomkplete gnc->qof renaming scheme changes

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9538 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas
2003-10-17 05:15:56 +00:00
parent 64583beb71
commit 6089b89c6f
21 changed files with 179 additions and 73 deletions

View File

@@ -7,10 +7,10 @@
#define GNC_OWNER_XML_V2_H
#include "gncOwner.h"
#include "gnc-book.h"
#include "qofbook.h"
gboolean gnc_dom_tree_to_owner (xmlNodePtr node, GncOwner *owner,
GNCBook *book);
QofBook *book);
xmlNodePtr gnc_owner_to_dom_tree (const char *tag, GncOwner *addr);
#endif /* GNC_OWNER_XML_V2_H */

View File

@@ -632,5 +632,5 @@ gboolean gncCustomerRegister (void)
gint64 gncCustomerNextID (QofBook *book)
{
return gnc_book_get_counter (book, _GNC_MOD_NAME);
return qof_book_get_counter (book, _GNC_MOD_NAME);
}

View File

@@ -31,6 +31,7 @@
typedef struct _gncCustomer GncCustomer;
#include "qofbook.h"
#include "qofid.h"
#include "qofinstance.h"
#include "gncAddress.h"
#include "gncBillTerm.h"

View File

@@ -32,12 +32,12 @@
#include "guid.h"
#include "messages.h"
#include "gnc-book.h"
#include "gnc-commodity.h"
#include "gnc-engine-util.h"
#include "gnc-event-p.h"
#include "gnc-be-utils.h"
#include "qofbook.h"
#include "qofclass.h"
#include "qofid.h"
#include "qofid-p.h"
@@ -415,5 +415,5 @@ gboolean gncEmployeeRegister (void)
gint64 gncEmployeeNextID (QofBook *book)
{
return gnc_book_get_counter (book, _GNC_MOD_NAME);
return qof_book_get_counter (book, _GNC_MOD_NAME);
}

View File

@@ -32,6 +32,7 @@ typedef struct _gncEmployee GncEmployee;
#include "qofbook.h"
#include "qofid.h"
#include "gncAddress.h"
#include "Account.h"

View File

@@ -1,5 +1,26 @@
/********************************************************************\
* gncEntry.c -- the Core Business Entry Interface *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
* Boston, MA 02111-1307, USA gnu@gnu.org *
* *
\********************************************************************/
/*
* gncEntry.c -- the Core Business Entry Interface
* Copyright (C) 2001,2002 Derek Atkins
* Author: Derek Atkins <warlord@MIT.EDU>
*/
@@ -239,14 +260,6 @@ static void gncEntryFree (GncEntry *entry)
/* Set Functions */
void gncEntrySetGUID (GncEntry *entry, const GUID *guid)
{
if (!entry || !guid) return;
if (guid_equal (guid, &entry->inst.entity.guid)) return;
qof_entity_set_guid (&entry->inst.entity, guid);
}
void gncEntrySetDate (GncEntry *entry, Timespec date)
{
if (!entry) return;

View File

@@ -1,5 +1,26 @@
/********************************************************************\
* gncEntry.h -- the Core Business Entry Interface *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
* Boston, MA 02111-1307, USA gnu@gnu.org *
* *
\********************************************************************/
/*
* gncEntry.h -- the Core Business Entry Interface
* Copyright (C) 2001,2002 Derek Atkins
* Author: Derek Atkins <warlord@MIT.EDU>
*/
@@ -20,12 +41,14 @@ typedef enum {
GNC_DISC_POSTTAX
} GncDiscountHow;
#include "gnc-book.h"
#include "gnc-date.h"
#include "gncTaxTable.h"
#include "gncOrder.h"
#include "gncInvoice.h"
#include "qofbook.h"
#include "qofinstance.h"
#define GNC_ENTRY_MODULE_NAME "gncEntry"
/* How to apply the discount and taxes. There are three distinct ways to

View File

@@ -1,5 +1,26 @@
/********************************************************************\
* gncEntryP.h -- the Core Busines Entry Interface *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
* Boston, MA 02111-1307, USA gnu@gnu.org *
* *
\********************************************************************/
/*
* gncEntryP.h -- the Core Busines Entry Interface
* Copyright (C) 2001 Derek Atkins
* Author: Derek Atkins <warlord@MIT.EDU>
*/
@@ -8,6 +29,7 @@
#define GNC_ENTRYP_H_
#include "gncEntry.h"
#include "qofid-p.h"
gboolean gncEntryRegister (void);
void gncEntrySetGUID (GncEntry *entry, const GUID *guid);
@@ -16,4 +38,6 @@ void gncEntrySetInvoice (GncEntry *entry, GncInvoice *invoice);
void gncEntrySetBill (GncEntry *entry, GncInvoice *bill);
void gncEntrySetDirty (GncEntry *entry, gboolean dirty);
#define gncEntrySetGUID(E,G) qof_entity_set_guid(QOF_ENTITY(E),(G))
#endif /* GNC_ENTRYP_H_ */

View File

@@ -1384,5 +1384,5 @@ gboolean gncInvoiceRegister (void)
gint64 gncInvoiceNextID (QofBook *book)
{
return gnc_book_get_counter (book, _GNC_MOD_NAME);
return qof_book_get_counter (book, _GNC_MOD_NAME);
}

View File

@@ -36,6 +36,9 @@ typedef struct _gncInvoice GncInvoice;
#include "gncOwner.h"
#include "gnc-lot.h"
#include "qofid.h"
#include "qofinstance.h"
#define GNC_INVOICE_MODULE_NAME "gncInvoice"
/* Create/Destroy Functions */

View File

@@ -413,5 +413,5 @@ gboolean gncJobRegister (void)
gint64 gncJobNextID (QofBook *book)
{
return gnc_book_get_counter (book, _GNC_MOD_NAME);
return qof_book_get_counter (book, _GNC_MOD_NAME);
}

View File

@@ -435,5 +435,5 @@ gboolean gncOrderRegister (void)
gint64 gncOrderNextID (QofBook *book)
{
return gnc_book_get_counter (book, _GNC_MOD_NAME);
return qof_book_get_counter (book, _GNC_MOD_NAME);
}

View File

@@ -30,9 +30,10 @@
typedef struct _gncOrder GncOrder;
#include "gnc-book.h"
#include "gncEntry.h"
#include "gncOwner.h"
#include "qofbook.h"
#include "qofinstance.h"
#define GNC_ORDER_MODULE_NAME "gncOrder"

View File

@@ -63,5 +63,5 @@ GncTaxTable * gncCloneTaxTable (GncTaxTable *from, QofBook *book);
* different ways.
*/
GncTaxTable * gncTaxTableObtainTwin (GncTaxTable *from, QofBook *book);
#endif /* GNC_TAXTABLEP_H_ */

View File

@@ -181,13 +181,6 @@ void gncVendorSetNotes (GncVendor *vendor, const char *notes)
gncVendorCommitEdit (vendor);
}
void gncVendorSetGUID (GncVendor *vendor, const GUID *guid)
{
if (!vendor || !guid) return;
qof_entity_set_guid(&vendor->inst.entity, guid);
}
void gncVendorSetTerms (GncVendor *vendor, GncBillTerm *terms)
{
if (!vendor) return;
@@ -492,5 +485,5 @@ gboolean gncVendorRegister (void)
gint64 gncVendorNextID (QofBook *book)
{
return gnc_book_get_counter (book, _GNC_MOD_NAME);
return qof_book_get_counter (book, _GNC_MOD_NAME);
}

View File

@@ -1,5 +1,26 @@
/********************************************************************\
* gncVendor.h -- the Core Vendor Interface *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
* Boston, MA 02111-1307, USA gnu@gnu.org *
* *
\********************************************************************/
/*
* gncVendor.h -- the Core Vendor Interface
* Copyright (C) 2001, 2002 Derek Atkins
* Author: Derek Atkins <warlord@MIT.EDU>
*/
@@ -9,11 +30,13 @@
typedef struct _gncVendor GncVendor;
#include "gnc-book.h"
#include "gncAddress.h"
#include "gncBillTerm.h"
#include "gncTaxTable.h"
#include "gncJob.h"
#include "qofbook.h"
#include "qofid.h"
#include "qofinstance.h"
#define GNC_VENDOR_MODULE_NAME "gncVendor"

View File

@@ -1,5 +1,26 @@
/********************************************************************\
* gncVendorP.h -- the Core Vendor Interface *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
* Boston, MA 02111-1307, USA gnu@gnu.org *
* *
\********************************************************************/
/*
* gncVendorP.h -- the Core Vendor Interface
* Copyright (C) 2001 Derek Atkins
* Author: Derek Atkins <warlord@MIT.EDU>
*/
@@ -8,9 +29,12 @@
#define GNC_VENDORP_H_
#include "gncVendor.h"
#include "qofid-p.h"
gboolean gncVendorRegister (void);
gint64 gncVendorNextID (QofBook *book);
void gncVendorSetGUID (GncVendor *vendor, const GUID *guid);
#define gncVendorSetGUID(V,G) qof_entity_set_guid(QOF_ENTITY(V),(G))
#endif /* GNC_VENDORP_H_ */

View File

@@ -13,10 +13,10 @@
#define TEST_MODULE_DESC "Test Business"
#if 0
static GList * get_list (GNCBook *, gboolean show_all);
static GList * get_list (QofBook *, gboolean show_all);
static const char * printable (gpointer obj);
static void test_printable (const char *name, gpointer obj);
static void test_get_list (GNCBook *, const char *);
static void test_get_list (QofBook *, const char *);
static GncBusinessObject bus_obj = {
GNC_BUSINESS_VERSION,
@@ -45,12 +45,12 @@ static void test_business (void)
"test description return");
}
test_get_list ((GNCBook*)1, TEST_MODULE_NAME);
test_get_list ((QofBook*)1, TEST_MODULE_NAME);
test_printable (TEST_MODULE_NAME, (gpointer)1);
}
static GList *
get_list (GNCBook *book, gboolean show_all)
get_list (QofBook *book, gboolean show_all)
{
do_test (book != NULL, "get_list: NULL business");
success ("called get_list callback");
@@ -66,7 +66,7 @@ printable (gpointer obj)
}
static void
test_get_list (GNCBook *book, const char *name)
test_get_list (QofBook *book, const char *name)
{
GList *res;

View File

@@ -13,23 +13,23 @@
static int count = 0;
static void
test_string_fcn (GNCBook *book, const char *message,
test_string_fcn (QofBook *book, const char *message,
void (*set) (GncCustomer *, const char *str),
const char * (*get)(GncCustomer *));
static void
test_numeric_fcn (GNCBook *book, const char *message,
test_numeric_fcn (QofBook *book, const char *message,
void (*set) (GncCustomer *, gnc_numeric),
gnc_numeric (*get)(GncCustomer *));
static void
test_bool_fcn (GNCBook *book, const char *message,
test_bool_fcn (QofBook *book, const char *message,
void (*set) (GncCustomer *, gboolean),
gboolean (*get) (GncCustomer *));
#if 0
static void
test_gint_fcn (GNCBook *book, const char *message,
test_gint_fcn (QofBook *book, const char *message,
void (*set) (GncCustomer *, gint),
gint (*get) (GncCustomer *));
#endif
@@ -37,10 +37,10 @@ test_gint_fcn (GNCBook *book, const char *message,
static void
test_customer (void)
{
GNCBook *book;
QofBook *book;
GncCustomer *customer;
book = gnc_book_new ();
book = qof_book_new ();
/* Test creation/destruction */
{
@@ -118,7 +118,7 @@ test_customer (void)
}
static void
test_string_fcn (GNCBook *book, const char *message,
test_string_fcn (QofBook *book, const char *message,
void (*set) (GncCustomer *, const char *str),
const char * (*get)(GncCustomer *))
{
@@ -137,7 +137,7 @@ test_string_fcn (GNCBook *book, const char *message,
}
static void
test_numeric_fcn (GNCBook *book, const char *message,
test_numeric_fcn (QofBook *book, const char *message,
void (*set) (GncCustomer *, gnc_numeric),
gnc_numeric (*get)(GncCustomer *))
{
@@ -156,7 +156,7 @@ test_numeric_fcn (GNCBook *book, const char *message,
}
static void
test_bool_fcn (GNCBook *book, const char *message,
test_bool_fcn (QofBook *book, const char *message,
void (*set) (GncCustomer *, gboolean),
gboolean (*get) (GncCustomer *))
{
@@ -178,7 +178,7 @@ test_bool_fcn (GNCBook *book, const char *message,
#if 0
static void
test_gint_fcn (GNCBook *book, const char *message,
test_gint_fcn (QofBook *book, const char *message,
void (*set) (GncCustomer *, gint),
gint (*get) (GncCustomer *))
{

View File

@@ -4,7 +4,7 @@
#include "guid.h"
#include "gnc-module.h"
#include "gnc-engine-util.h"
#include "gncObject.h"
#include "qofobject.h"
#include "gncJob.h"
#include "gncJobP.h"
@@ -13,25 +13,25 @@
static int count = 0;
static void
test_string_fcn (GNCBook *book, const char *message,
test_string_fcn (QofBook *book, const char *message,
void (*set) (GncJob *, const char *str),
const char * (*get)(GncJob *));
#if 0
static void
test_numeric_fcn (GNCBook *book, const char *message,
test_numeric_fcn (QofBook *book, const char *message,
void (*set) (GncJob *, gnc_numeric),
gnc_numeric (*get)(GncJob *));
#endif
static void
test_bool_fcn (GNCBook *book, const char *message,
test_bool_fcn (QofBook *book, const char *message,
void (*set) (GncJob *, gboolean),
gboolean (*get) (GncJob *));
#if 0
static void
test_gint_fcn (GNCBook *book, const char *message,
test_gint_fcn (QofBook *book, const char *message,
void (*set) (GncJob *, gint),
gint (*get) (GncJob *));
#endif
@@ -39,10 +39,10 @@ test_gint_fcn (GNCBook *book, const char *message,
static void
test_job (void)
{
GNCBook *book;
QofBook *book;
GncJob *job;
book = gnc_book_new ();
book = qof_book_new ();
/* Test creation/destruction */
{
@@ -92,7 +92,7 @@ test_job (void)
const char *res;
gncJobSetName (job, str);
res = gncObjectPrintable (GNC_JOB_MODULE_NAME, job);
res = qof_object_printable (GNC_JOB_MODULE_NAME, job);
do_test (res != NULL, "Printable NULL?");
do_test (safe_strcmp (str, res) == 0, "Printable equals");
}
@@ -122,7 +122,7 @@ test_job (void)
}
static void
test_string_fcn (GNCBook *book, const char *message,
test_string_fcn (QofBook *book, const char *message,
void (*set) (GncJob *, const char *str),
const char * (*get)(GncJob *))
{
@@ -141,7 +141,7 @@ test_string_fcn (GNCBook *book, const char *message,
#if 0
static void
test_numeric_fcn (GNCBook *book, const char *message,
test_numeric_fcn (QofBook *book, const char *message,
void (*set) (GncJob *, gnc_numeric),
gnc_numeric (*get)(GncJob *))
{
@@ -160,7 +160,7 @@ test_numeric_fcn (GNCBook *book, const char *message,
#endif
static void
test_bool_fcn (GNCBook *book, const char *message,
test_bool_fcn (QofBook *book, const char *message,
void (*set) (GncJob *, gboolean),
gboolean (*get) (GncJob *))
{
@@ -181,7 +181,7 @@ test_bool_fcn (GNCBook *book, const char *message,
#if 0
static void
test_gint_fcn (GNCBook *book, const char *message,
test_gint_fcn (QofBook *book, const char *message,
void (*set) (GncJob *, gint),
gint (*get) (GncJob *))
{

View File

@@ -4,7 +4,7 @@
#include "guid.h"
#include "gnc-module.h"
#include "gnc-engine-util.h"
#include "gncObject.h"
#include "qofobject.h"
#include "gncVendor.h"
#include "gncVendorP.h"
@@ -13,25 +13,25 @@
static int count = 0;
static void
test_string_fcn (GNCBook *book, const char *message,
test_string_fcn (QofBook *book, const char *message,
void (*set) (GncVendor *, const char *str),
const char * (*get)(GncVendor *));
#if 0
static void
test_numeric_fcn (GNCBook *book, const char *message,
test_numeric_fcn (QofBook *book, const char *message,
void (*set) (GncVendor *, gnc_numeric),
gnc_numeric (*get)(GncVendor *));
#endif
static void
test_bool_fcn (GNCBook *book, const char *message,
test_bool_fcn (QofBook *book, const char *message,
void (*set) (GncVendor *, gboolean),
gboolean (*get) (GncVendor *));
#if 0
static void
test_gint_fcn (GNCBook *book, const char *message,
test_gint_fcn (QofBook *book, const char *message,
void (*set) (GncVendor *, gint),
gint (*get) (GncVendor *));
#endif
@@ -39,10 +39,10 @@ test_gint_fcn (GNCBook *book, const char *message,
static void
test_vendor (void)
{
GNCBook *book;
QofBook *book;
GncVendor *vendor;
book = gnc_book_new ();
book = qof_book_new ();
/* Test creation/destruction */
{
@@ -97,14 +97,14 @@ test_vendor (void)
const char *res;
gncVendorSetName (vendor, str);
res = gncObjectPrintable (GNC_VENDOR_MODULE_NAME, vendor);
res = qof_object_printable (GNC_VENDOR_MODULE_NAME, vendor);
do_test (res != NULL, "Printable NULL?");
do_test (safe_strcmp (str, res) == 0, "Printable equals");
}
}
static void
test_string_fcn (GNCBook *book, const char *message,
test_string_fcn (QofBook *book, const char *message,
void (*set) (GncVendor *, const char *str),
const char * (*get)(GncVendor *))
{
@@ -123,7 +123,7 @@ test_string_fcn (GNCBook *book, const char *message,
#if 0
static void
test_numeric_fcn (GNCBook *book, const char *message,
test_numeric_fcn (QofBook *book, const char *message,
void (*set) (GncVendor *, gnc_numeric),
gnc_numeric (*get)(GncVendor *))
{
@@ -142,7 +142,7 @@ test_numeric_fcn (GNCBook *book, const char *message,
#endif
static void
test_bool_fcn (GNCBook *book, const char *message,
test_bool_fcn (QofBook *book, const char *message,
void (*set) (GncVendor *, gboolean),
gboolean (*get) (GncVendor *))
{
@@ -163,7 +163,7 @@ test_bool_fcn (GNCBook *book, const char *message,
#if 0
static void
test_gint_fcn (GNCBook *book, const char *message,
test_gint_fcn (QofBook *book, const char *message,
void (*set) (GncVendor *, gint),
gint (*get) (GncVendor *))
{