mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
Isolate direct KVP operations.
Into sixtp-dom-parser, sixtp-dom-generator, and gnc-slots-sql. The XML V1 file io-gncxml-v1.c is not yet done.
This commit is contained in:
@@ -71,16 +71,12 @@ const gchar *account_version_string = "2.0.0";
|
||||
#define act_hidden_string "act:hidden"
|
||||
#define act_placeholder_string "act:placeholder"
|
||||
|
||||
/* EFFECTIVE FRIEND FUNCTION */
|
||||
extern KvpFrame *qof_instance_get_slots (const QofInstance *);
|
||||
|
||||
xmlNodePtr
|
||||
gnc_account_dom_tree_create(Account *act,
|
||||
gboolean exporting,
|
||||
gboolean allow_incompat)
|
||||
{
|
||||
const char *str;
|
||||
KvpFrame *kf;
|
||||
xmlNodePtr ret;
|
||||
GList *lots, *n;
|
||||
Account *parent;
|
||||
@@ -137,16 +133,9 @@ gnc_account_dom_tree_create(Account *act,
|
||||
xmlAddChild(ret, text_to_dom_tree(act_description_string, str));
|
||||
}
|
||||
|
||||
kf = qof_instance_get_slots (QOF_INSTANCE (act));
|
||||
if (kf)
|
||||
{
|
||||
xmlNodePtr kvpnode = kvp_frame_to_dom_tree(act_slots_string, kf);
|
||||
if (kvpnode)
|
||||
{
|
||||
xmlAddChild(ret, kvpnode);
|
||||
}
|
||||
}
|
||||
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(act_slots_string,
|
||||
QOF_INSTANCE(act)));
|
||||
parent = gnc_account_get_parent(act);
|
||||
if (parent)
|
||||
{
|
||||
@@ -371,9 +360,7 @@ static gboolean
|
||||
account_slots_handler (xmlNodePtr node, gpointer act_pdata)
|
||||
{
|
||||
struct account_pdata *pdata = act_pdata;
|
||||
|
||||
return dom_tree_to_kvp_frame_given
|
||||
(node, qof_instance_get_slots (QOF_INSTANCE (pdata->account)));
|
||||
return dom_tree_create_instance_slots (node, QOF_INSTANCE (pdata->account));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
||||
@@ -58,9 +58,6 @@ const gchar *address_version_string = "2.0.0";
|
||||
#define addr_email_string "addr:email"
|
||||
#define addr_slots_string "addr:slots"
|
||||
|
||||
/* EFFECTIVE FRIEND FUNCTION */
|
||||
extern KvpFrame *qof_instance_get_slots (const QofInstance*);
|
||||
|
||||
static void
|
||||
maybe_add_string (xmlNodePtr ptr, const char *tag, const char *str)
|
||||
{
|
||||
@@ -72,7 +69,6 @@ xmlNodePtr
|
||||
gnc_address_to_dom_tree (const char *tag, GncAddress *addr)
|
||||
{
|
||||
xmlNodePtr ret;
|
||||
KvpFrame *kf;
|
||||
|
||||
ret = xmlNewNode(NULL, BAD_CAST tag);
|
||||
xmlSetProp(ret, BAD_CAST "version", BAD_CAST address_version_string);
|
||||
@@ -88,16 +84,9 @@ gnc_address_to_dom_tree (const char *tag, GncAddress *addr)
|
||||
maybe_add_string (ret, addr_fax_string, gncAddressGetFax (addr));
|
||||
maybe_add_string (ret, addr_email_string, gncAddressGetEmail (addr));
|
||||
|
||||
kf = qof_instance_get_slots (QOF_INSTANCE(addr));
|
||||
if (kf)
|
||||
{
|
||||
xmlNodePtr kvpnode = kvp_frame_to_dom_tree(addr_slots_string, kf);
|
||||
if (kvpnode)
|
||||
{
|
||||
xmlAddChild(ret, kvpnode);
|
||||
}
|
||||
}
|
||||
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(addr_slots_string,
|
||||
QOF_INSTANCE(addr)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -190,9 +179,7 @@ static gboolean
|
||||
address_slots_handler (xmlNodePtr node, gpointer addr_pdata)
|
||||
{
|
||||
struct address_pdata *pdata = addr_pdata;
|
||||
|
||||
return dom_tree_to_kvp_frame_given
|
||||
(node, qof_instance_get_slots (QOF_INSTANCE (pdata->address)));
|
||||
return dom_tree_create_instance_slots (node, QOF_INSTANCE (pdata->address));
|
||||
}
|
||||
|
||||
static struct dom_tree_handler address_handlers_v2[] =
|
||||
|
||||
@@ -79,7 +79,7 @@ const gchar *billterm_version_string = "2.0.0";
|
||||
static xmlNodePtr
|
||||
billterm_dom_tree_create (GncBillTerm *term)
|
||||
{
|
||||
xmlNodePtr ret, data, kvpnode;
|
||||
xmlNodePtr ret, data;
|
||||
|
||||
ret = xmlNewNode(NULL, BAD_CAST gnc_billterm_string);
|
||||
xmlSetProp(ret, BAD_CAST "version", BAD_CAST billterm_version_string);
|
||||
@@ -95,10 +95,9 @@ billterm_dom_tree_create (GncBillTerm *term)
|
||||
xmlAddChild(ret, int_to_dom_tree (billterm_invisible_string,
|
||||
gncBillTermGetInvisible (term)));
|
||||
|
||||
kvpnode = kvp_frame_to_dom_tree (billterm_slots_string,
|
||||
qof_instance_get_slots (QOF_INSTANCE(term)));
|
||||
if (kvpnode) xmlAddChild (ret, kvpnode);
|
||||
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(billterm_slots_string,
|
||||
QOF_INSTANCE(term)));
|
||||
|
||||
/* We should not be our own child */
|
||||
if (gncBillTermGetChild(term) != term)
|
||||
@@ -401,8 +400,7 @@ static gboolean
|
||||
billterm_slots_handler (xmlNodePtr node, gpointer billterm_pdata)
|
||||
{
|
||||
struct billterm_pdata *pdata = billterm_pdata;
|
||||
return dom_tree_to_kvp_frame_given (node,
|
||||
qof_instance_get_slots (QOF_INSTANCE(pdata->term)));
|
||||
return dom_tree_create_instance_slots (node, QOF_INSTANCE(pdata->term));
|
||||
}
|
||||
|
||||
static struct dom_tree_handler billterm_handlers_v2[] =
|
||||
|
||||
@@ -109,13 +109,9 @@ gnc_book_dom_tree_create(QofBook *book)
|
||||
xmlAddChild(ret, guid_to_dom_tree(book_id_string,
|
||||
qof_book_get_guid(book)));
|
||||
|
||||
if (qof_instance_get_slots (QOF_INSTANCE (book)))
|
||||
{
|
||||
xmlNodePtr kvpnode = kvp_frame_to_dom_tree(book_slots_string,
|
||||
qof_instance_get_slots (QOF_INSTANCE (book)));
|
||||
if (kvpnode)
|
||||
xmlAddChild(ret, kvpnode);
|
||||
}
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(book_slots_string,
|
||||
QOF_INSTANCE(book)));
|
||||
|
||||
#ifdef IMPLEMENT_BOOK_DOM_TREES_LATER
|
||||
/* theoretically, we should be adding all the below to the book
|
||||
@@ -153,7 +149,7 @@ gnc_book_dom_tree_create(QofBook *book)
|
||||
gboolean
|
||||
write_book_parts(FILE *out, QofBook *book)
|
||||
{
|
||||
xmlNodePtr domnode;
|
||||
xmlNodePtr domnode, slotsnode;
|
||||
|
||||
domnode = guid_to_dom_tree(book_id_string, qof_book_get_guid(book));
|
||||
xmlElemDump(out, NULL, domnode);
|
||||
@@ -162,18 +158,16 @@ write_book_parts(FILE *out, QofBook *book)
|
||||
if (ferror(out) || fprintf(out, "\n") < 0)
|
||||
return FALSE;
|
||||
|
||||
if (qof_instance_get_slots (QOF_INSTANCE (book)))
|
||||
|
||||
slotsnode = qof_instance_slots_to_dom_tree(book_slots_string,
|
||||
QOF_INSTANCE(book));
|
||||
if (slotsnode)
|
||||
{
|
||||
xmlNodePtr kvpnode = kvp_frame_to_dom_tree(book_slots_string,
|
||||
qof_instance_get_slots (QOF_INSTANCE (book)));
|
||||
if (kvpnode)
|
||||
{
|
||||
xmlElemDump(out, NULL, kvpnode);
|
||||
xmlFreeNode(kvpnode);
|
||||
xmlElemDump(out, NULL, slotsnode);
|
||||
xmlFreeNode(slotsnode);
|
||||
|
||||
if (ferror(out) || fprintf(out, "\n") < 0)
|
||||
return FALSE;
|
||||
}
|
||||
if (ferror(out) || fprintf(out, "\n") < 0)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -203,7 +197,7 @@ book_slots_handler (xmlNodePtr node, gpointer book_pdata)
|
||||
|
||||
/* the below works only because the get is gaurenteed to return
|
||||
* a frame, even if its empty */
|
||||
success = dom_tree_to_kvp_frame_given (node, qof_instance_get_slots (QOF_INSTANCE (book)));
|
||||
success = dom_tree_create_instance_slots(node, QOF_INSTANCE (book));
|
||||
|
||||
g_return_val_if_fail(success, FALSE);
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ xmlNodePtr
|
||||
gnc_budget_dom_tree_create(GncBudget *bgt)
|
||||
{
|
||||
xmlNodePtr ret;
|
||||
KvpFrame *kf;
|
||||
|
||||
ENTER ("(budget=%p)", bgt);
|
||||
|
||||
@@ -79,14 +78,9 @@ gnc_budget_dom_tree_create(GncBudget *bgt)
|
||||
/* field: Recurrence* */
|
||||
xmlAddChild(ret, recurrence_to_dom_tree(bgt_recurrence_string,
|
||||
gnc_budget_get_recurrence(bgt)));
|
||||
/* slots */
|
||||
kf = qof_instance_get_slots(QOF_INSTANCE(bgt));
|
||||
if (kf)
|
||||
{
|
||||
xmlNodePtr kvpnode = kvp_frame_to_dom_tree(bgt_slots_string, kf);
|
||||
if (kvpnode)
|
||||
xmlAddChild(ret, kvpnode);
|
||||
}
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(bgt_slots_string,
|
||||
QOF_INSTANCE(bgt)));
|
||||
|
||||
LEAVE (" ");
|
||||
return ret;
|
||||
@@ -159,8 +153,7 @@ budget_recurrence_handler (xmlNodePtr node, gpointer bgt)
|
||||
static gboolean
|
||||
budget_slots_handler (xmlNodePtr node, gpointer bgt)
|
||||
{
|
||||
return dom_tree_to_kvp_frame_given(
|
||||
node, qof_instance_get_slots(QOF_INSTANCE(bgt)));
|
||||
return dom_tree_create_instance_slots(node, QOF_INSTANCE(bgt));
|
||||
}
|
||||
|
||||
static struct dom_tree_handler budget_handlers[] =
|
||||
|
||||
@@ -66,11 +66,10 @@ gnc_commodity_dom_tree_create(const gnc_commodity *com)
|
||||
const char *string;
|
||||
xmlNodePtr ret;
|
||||
gboolean currency = gnc_commodity_is_iso(com);
|
||||
xmlNodePtr kvpnode =
|
||||
kvp_frame_to_dom_tree(cmdty_slots,
|
||||
qof_instance_get_slots(QOF_INSTANCE(com)));
|
||||
xmlNodePtr slotsnode =
|
||||
qof_instance_slots_to_dom_tree(cmdty_slots, QOF_INSTANCE(com));
|
||||
|
||||
if (currency && !gnc_commodity_get_quote_flag(com) && !kvpnode)
|
||||
if (currency && !gnc_commodity_get_quote_flag(com) && !slotsnode)
|
||||
return NULL;
|
||||
|
||||
ret = xmlNewNode(NULL, BAD_CAST gnc_commodity_string);
|
||||
@@ -114,8 +113,8 @@ gnc_commodity_dom_tree_create(const gnc_commodity *com)
|
||||
xmlAddChild(ret, text_to_dom_tree(cmdty_quote_tz, string));
|
||||
}
|
||||
|
||||
if (kvpnode)
|
||||
xmlAddChild(ret, kvpnode);
|
||||
if (slotsnode)
|
||||
xmlAddChild(ret, slotsnode);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -172,8 +171,7 @@ set_commodity_value(xmlNodePtr node, gnc_commodity* com)
|
||||
else if (g_strcmp0((char*)node->name, cmdty_slots) == 0)
|
||||
{
|
||||
/* We ignore the results here */
|
||||
dom_tree_to_kvp_frame_given(node,
|
||||
qof_instance_get_slots(QOF_INSTANCE(com)));
|
||||
dom_tree_create_instance_slots(node, QOF_INSTANCE(com));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ const gchar *customer_version_string = "2.0.0";
|
||||
static xmlNodePtr
|
||||
customer_dom_tree_create (GncCustomer *cust)
|
||||
{
|
||||
xmlNodePtr ret, kvpnode;
|
||||
xmlNodePtr ret;
|
||||
gnc_numeric num;
|
||||
GncBillTerm *term;
|
||||
GncTaxTable *taxtable;
|
||||
@@ -132,9 +132,9 @@ customer_dom_tree_create (GncCustomer *cust)
|
||||
xmlAddChild (ret, guid_to_dom_tree (cust_taxtable_string,
|
||||
qof_instance_get_guid(QOF_INSTANCE(taxtable))));
|
||||
|
||||
kvpnode = kvp_frame_to_dom_tree (cust_slots_string,
|
||||
qof_instance_get_slots (QOF_INSTANCE(cust)));
|
||||
if (kvpnode) xmlAddChild (ret, kvpnode);
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(cust_slots_string,
|
||||
QOF_INSTANCE(cust)));
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -367,8 +367,7 @@ static gboolean
|
||||
customer_slots_handler (xmlNodePtr node, gpointer cust_pdata)
|
||||
{
|
||||
struct customer_pdata *pdata = cust_pdata;
|
||||
return dom_tree_to_kvp_frame_given (node,
|
||||
qof_instance_get_slots (QOF_INSTANCE(pdata->customer)));
|
||||
return dom_tree_create_instance_slots(node, QOF_INSTANCE(pdata->customer));
|
||||
}
|
||||
|
||||
static struct dom_tree_handler customer_handlers_v2[] =
|
||||
|
||||
@@ -76,7 +76,7 @@ maybe_add_string (xmlNodePtr ptr, const char *tag, const char *str)
|
||||
static xmlNodePtr
|
||||
employee_dom_tree_create (GncEmployee *employee)
|
||||
{
|
||||
xmlNodePtr ret, kvpnode;
|
||||
xmlNodePtr ret;
|
||||
gnc_numeric num;
|
||||
Account* ccard_acc;
|
||||
|
||||
@@ -118,10 +118,9 @@ employee_dom_tree_create (GncEmployee *employee)
|
||||
xmlAddChild(ret, guid_to_dom_tree(employee_ccard_string,
|
||||
qof_instance_get_guid(QOF_INSTANCE(ccard_acc))));
|
||||
|
||||
kvpnode = kvp_frame_to_dom_tree (employee_slots_string,
|
||||
qof_instance_get_slots (QOF_INSTANCE(employee)));
|
||||
if (kvpnode) xmlAddChild (ret, kvpnode);
|
||||
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(employee_slots_string,
|
||||
QOF_INSTANCE(employee)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -294,8 +293,7 @@ static gboolean
|
||||
employee_slots_handler (xmlNodePtr node, gpointer employee_pdata)
|
||||
{
|
||||
struct employee_pdata *pdata = employee_pdata;
|
||||
return dom_tree_to_kvp_frame_given (
|
||||
node, qof_instance_get_slots (QOF_INSTANCE(pdata->employee)));
|
||||
return dom_tree_create_instance_slots (node, QOF_INSTANCE(pdata->employee));
|
||||
}
|
||||
|
||||
static struct dom_tree_handler employee_handlers_v2[] =
|
||||
|
||||
@@ -92,9 +92,6 @@ const gchar *entry_version_string = "2.0.0";
|
||||
#define entry_bill_string "entry:bill"
|
||||
#define entry_slots_string "entry:slots"
|
||||
|
||||
/* EFFECTIVE FRIEND FUNCTION */
|
||||
extern KvpFrame *qof_instance_get_slots (const QofInstance*);
|
||||
|
||||
static void
|
||||
maybe_add_string (xmlNodePtr ptr, const char *tag, const char *str)
|
||||
{
|
||||
@@ -118,7 +115,6 @@ entry_dom_tree_create (GncEntry *entry)
|
||||
GncTaxTable *taxtable;
|
||||
GncOrder *order;
|
||||
GncInvoice *invoice;
|
||||
KvpFrame *kf;
|
||||
|
||||
ret = xmlNewNode(NULL, BAD_CAST gnc_entry_string);
|
||||
xmlSetProp(ret, BAD_CAST "version", BAD_CAST entry_version_string);
|
||||
@@ -215,16 +211,9 @@ entry_dom_tree_create (GncEntry *entry)
|
||||
xmlAddChild (ret, guid_to_dom_tree (entry_order_string,
|
||||
qof_instance_get_guid(QOF_INSTANCE (order))));
|
||||
|
||||
kf = qof_instance_get_slots (QOF_INSTANCE(entry));
|
||||
if (kf)
|
||||
{
|
||||
xmlNodePtr kvpnode = kvp_frame_to_dom_tree(entry_slots_string, kf);
|
||||
if (kvpnode)
|
||||
{
|
||||
xmlAddChild(ret, kvpnode);
|
||||
}
|
||||
}
|
||||
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(entry_slots_string,
|
||||
QOF_INSTANCE(entry)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -677,8 +666,7 @@ entry_slots_handler (xmlNodePtr node, gpointer entry_pdata)
|
||||
{
|
||||
struct entry_pdata *pdata = entry_pdata;
|
||||
|
||||
return dom_tree_to_kvp_frame_given
|
||||
(node, qof_instance_get_slots (QOF_INSTANCE (pdata->entry)));
|
||||
return dom_tree_create_instance_slots(node, QOF_INSTANCE (pdata->entry));
|
||||
}
|
||||
|
||||
static struct dom_tree_handler entry_handlers_v2[] =
|
||||
|
||||
@@ -72,9 +72,6 @@ const gchar *invoice_version_string = "2.0.0";
|
||||
#define invoice_tochargeamt_string "invoice:charge-amt"
|
||||
#define invoice_slots_string "invoice:slots"
|
||||
|
||||
/* EFFECTIVE FRIEND FUNCTION */
|
||||
extern KvpFrame *qof_instance_get_slots (const QofInstance *);
|
||||
|
||||
static void
|
||||
maybe_add_string (xmlNodePtr ptr, const char *tag, const char *str)
|
||||
{
|
||||
@@ -93,7 +90,6 @@ static xmlNodePtr
|
||||
invoice_dom_tree_create (GncInvoice *invoice)
|
||||
{
|
||||
xmlNodePtr ret;
|
||||
KvpFrame *kf;
|
||||
Timespec ts;
|
||||
Transaction *txn;
|
||||
GNCLot *lot;
|
||||
@@ -160,16 +156,9 @@ invoice_dom_tree_create (GncInvoice *invoice)
|
||||
if (! gnc_numeric_zero_p (amt))
|
||||
xmlAddChild (ret, gnc_numeric_to_dom_tree (invoice_tochargeamt_string, &amt));
|
||||
|
||||
kf = qof_instance_get_slots (QOF_INSTANCE(invoice));
|
||||
if (kf)
|
||||
{
|
||||
xmlNodePtr kvpnode = kvp_frame_to_dom_tree(invoice_slots_string, kf);
|
||||
if (kvpnode)
|
||||
{
|
||||
xmlAddChild(ret, kvpnode);
|
||||
}
|
||||
}
|
||||
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(invoice_slots_string,
|
||||
QOF_INSTANCE(invoice)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -411,9 +400,7 @@ static gboolean
|
||||
invoice_slots_handler (xmlNodePtr node, gpointer invoice_pdata)
|
||||
{
|
||||
struct invoice_pdata *pdata = invoice_pdata;
|
||||
|
||||
return dom_tree_to_kvp_frame_given
|
||||
(node, qof_instance_get_slots (QOF_INSTANCE (pdata->invoice)));
|
||||
return dom_tree_create_instance_slots (node, QOF_INSTANCE (pdata->invoice));
|
||||
}
|
||||
|
||||
static struct dom_tree_handler invoice_handlers_v2[] =
|
||||
|
||||
@@ -62,14 +62,10 @@ const gchar *job_version_string = "2.0.0";
|
||||
#define job_active_string "job:active"
|
||||
#define job_slots_string "job:slots"
|
||||
|
||||
/* EFFECTIVE FRIEND FUNCTION */
|
||||
extern KvpFrame *qof_instance_get_slots (const QofInstance*);
|
||||
|
||||
static xmlNodePtr
|
||||
job_dom_tree_create (GncJob *job)
|
||||
{
|
||||
xmlNodePtr ret;
|
||||
KvpFrame *kf;
|
||||
|
||||
ret = xmlNewNode(NULL, BAD_CAST gnc_job_string);
|
||||
xmlSetProp(ret, BAD_CAST "version", BAD_CAST job_version_string);
|
||||
@@ -91,15 +87,9 @@ job_dom_tree_create (GncJob *job)
|
||||
xmlAddChild(ret, int_to_dom_tree(job_active_string,
|
||||
gncJobGetActive (job)));
|
||||
|
||||
kf = qof_instance_get_slots (QOF_INSTANCE(job));
|
||||
if (kf)
|
||||
{
|
||||
xmlNodePtr kvpnode = kvp_frame_to_dom_tree(job_slots_string, kf);
|
||||
if (kvpnode)
|
||||
{
|
||||
xmlAddChild(ret, kvpnode);
|
||||
}
|
||||
}
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(job_slots_string,
|
||||
QOF_INSTANCE(job)));
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -209,8 +199,7 @@ job_slots_handler (xmlNodePtr node, gpointer job_pdata)
|
||||
{
|
||||
struct job_pdata *pdata = job_pdata;
|
||||
|
||||
return dom_tree_to_kvp_frame_given
|
||||
(node, qof_instance_get_slots (QOF_INSTANCE (pdata->job)));
|
||||
return dom_tree_create_instance_slots (node, QOF_INSTANCE (pdata->job));
|
||||
}
|
||||
|
||||
static struct dom_tree_handler job_handlers_v2[] =
|
||||
|
||||
@@ -53,30 +53,20 @@ const gchar *lot_version_string = "2.0.0";
|
||||
#define gnc_lot_string "gnc:lot"
|
||||
#define lot_id_string "lot:id"
|
||||
#define lot_slots_string "lot:slots"
|
||||
/* EFFECTIVE FRIEND FUNCTION */
|
||||
extern KvpFrame *qof_instance_get_slots (const QofInstance *);
|
||||
|
||||
xmlNodePtr
|
||||
gnc_lot_dom_tree_create(GNCLot *lot)
|
||||
{
|
||||
xmlNodePtr ret;
|
||||
KvpFrame *kf;
|
||||
|
||||
ENTER("(lot=%p)", lot);
|
||||
ret = xmlNewNode(NULL, BAD_CAST gnc_lot_string);
|
||||
xmlSetProp(ret, BAD_CAST "version", BAD_CAST lot_version_string);
|
||||
|
||||
xmlAddChild(ret, guid_to_dom_tree(lot_id_string, gnc_lot_get_guid(lot)));
|
||||
|
||||
kf = qof_instance_get_slots (QOF_INSTANCE (lot));
|
||||
if (kf)
|
||||
{
|
||||
xmlNodePtr kvpnode = kvp_frame_to_dom_tree(lot_slots_string, kf);
|
||||
if (kvpnode)
|
||||
{
|
||||
xmlAddChild(ret, kvpnode);
|
||||
}
|
||||
}
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(lot_slots_string,
|
||||
QOF_INSTANCE(lot)));
|
||||
|
||||
LEAVE("");
|
||||
return ret;
|
||||
@@ -113,8 +103,7 @@ lot_slots_handler (xmlNodePtr node, gpointer p)
|
||||
gboolean success;
|
||||
|
||||
ENTER("(lot=%p)", pdata->lot);
|
||||
success = dom_tree_to_kvp_frame_given
|
||||
(node, qof_instance_get_slots (QOF_INSTANCE (pdata->lot)));
|
||||
success = dom_tree_create_instance_slots(node, QOF_INSTANCE (pdata->lot));
|
||||
|
||||
LEAVE("");
|
||||
g_return_val_if_fail(success, FALSE);
|
||||
|
||||
@@ -64,9 +64,6 @@ const gchar *order_version_string = "2.0.0";
|
||||
#define order_active_string "order:active"
|
||||
#define order_slots_string "order:slots"
|
||||
|
||||
/* EFFECTIVE FRIEND FUNCTION */
|
||||
extern KvpFrame *qof_instance_get_slots (const QofInstance*);
|
||||
|
||||
static void
|
||||
maybe_add_string (xmlNodePtr ptr, const char *tag, const char *str)
|
||||
{
|
||||
@@ -79,7 +76,6 @@ order_dom_tree_create (GncOrder *order)
|
||||
{
|
||||
xmlNodePtr ret;
|
||||
Timespec ts;
|
||||
KvpFrame *kf;
|
||||
|
||||
ret = xmlNewNode(NULL, BAD_CAST gnc_order_string);
|
||||
xmlSetProp(ret, BAD_CAST "version", BAD_CAST order_version_string);
|
||||
@@ -106,15 +102,9 @@ order_dom_tree_create (GncOrder *order)
|
||||
xmlAddChild(ret, int_to_dom_tree(order_active_string,
|
||||
gncOrderGetActive (order)));
|
||||
|
||||
kf = qof_instance_get_slots (QOF_INSTANCE(order));
|
||||
if (kf)
|
||||
{
|
||||
xmlNodePtr kvpnode = kvp_frame_to_dom_tree(order_slots_string, kf);
|
||||
if (kvpnode)
|
||||
{
|
||||
xmlAddChild(ret, kvpnode);
|
||||
}
|
||||
}
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(order_slots_string,
|
||||
QOF_INSTANCE(order)));
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -250,8 +240,7 @@ order_slots_handler (xmlNodePtr node, gpointer order_pdata)
|
||||
{
|
||||
struct order_pdata *pdata = order_pdata;
|
||||
|
||||
return dom_tree_to_kvp_frame_given
|
||||
(node, qof_instance_get_slots (QOF_INSTANCE (pdata->order)));
|
||||
return dom_tree_create_instance_slots(node, QOF_INSTANCE (pdata->order));
|
||||
}
|
||||
|
||||
static struct dom_tree_handler order_handlers_v2[] =
|
||||
|
||||
@@ -190,17 +190,9 @@ gnc_schedXaction_dom_tree_create(SchedXaction *sx)
|
||||
}
|
||||
}
|
||||
|
||||
/* output kvp_frame */
|
||||
{
|
||||
xmlNodePtr kvpnode =
|
||||
kvp_frame_to_dom_tree( SX_SLOTS,
|
||||
xaccSchedXactionGetSlots(sx) );
|
||||
if ( kvpnode )
|
||||
{
|
||||
xmlAddChild(ret, kvpnode);
|
||||
}
|
||||
}
|
||||
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(SX_SLOTS,
|
||||
QOF_INSTANCE(sx)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -629,7 +621,7 @@ sx_slots_handler( xmlNodePtr node, gpointer sx_pdata )
|
||||
struct sx_pdata *pdata = sx_pdata;
|
||||
SchedXaction *sx = pdata->sx;
|
||||
|
||||
return dom_tree_to_kvp_frame_given( node, xaccSchedXactionGetSlots (sx) );
|
||||
return dom_tree_create_instance_slots(node, QOF_INSTANCE(sx));
|
||||
}
|
||||
|
||||
struct dom_tree_handler sx_dom_handlers[] =
|
||||
|
||||
@@ -67,9 +67,6 @@ const gchar *taxtable_version_string = "2.0.0";
|
||||
#define ttentry_type_string "tte:type"
|
||||
#define ttentry_amount_string "tte:amount"
|
||||
|
||||
/* EFFECTIVE FRIEND FUNCTION */
|
||||
extern KvpFrame *qof_instance_get_slots (const QofInstance*);
|
||||
|
||||
static void
|
||||
maybe_add_guid (xmlNodePtr ptr, const char *tag, GncTaxTable *table)
|
||||
{
|
||||
@@ -107,7 +104,6 @@ taxtable_dom_tree_create (GncTaxTable *table)
|
||||
{
|
||||
xmlNodePtr ret, entries;
|
||||
GList *list;
|
||||
KvpFrame *kf;
|
||||
|
||||
ret = xmlNewNode(NULL, BAD_CAST gnc_taxtable_string);
|
||||
xmlSetProp(ret, BAD_CAST "version", BAD_CAST taxtable_version_string);
|
||||
@@ -134,16 +130,9 @@ taxtable_dom_tree_create (GncTaxTable *table)
|
||||
xmlAddChild(entries, ttentry_dom_tree_create (entry));
|
||||
}
|
||||
|
||||
kf = qof_instance_get_slots (QOF_INSTANCE(table));
|
||||
if (kf)
|
||||
{
|
||||
xmlNodePtr kvpnode = kvp_frame_to_dom_tree(taxtable_slots_string, kf);
|
||||
if (kvpnode)
|
||||
{
|
||||
xmlAddChild(ret, kvpnode);
|
||||
}
|
||||
}
|
||||
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(taxtable_slots_string,
|
||||
QOF_INSTANCE(table)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -384,8 +373,7 @@ taxtable_slots_handler (xmlNodePtr node, gpointer taxtable_pdata)
|
||||
{
|
||||
struct taxtable_pdata *pdata = taxtable_pdata;
|
||||
|
||||
return dom_tree_to_kvp_frame_given
|
||||
(node, qof_instance_get_slots (QOF_INSTANCE (pdata->table)));
|
||||
return dom_tree_create_instance_slots(node, QOF_INSTANCE (pdata->table));
|
||||
}
|
||||
|
||||
static struct dom_tree_handler taxtable_handlers_v2[] =
|
||||
|
||||
@@ -49,9 +49,6 @@
|
||||
|
||||
const gchar *transaction_version_string = "2.0.0";
|
||||
|
||||
/* EFFECTIVE FRIEND FUNCTION */
|
||||
extern KvpFrame *qof_instance_get_slots (const QofInstance *);
|
||||
|
||||
static void
|
||||
add_gnc_num(xmlNodePtr node, const gchar *tag, gnc_numeric num)
|
||||
{
|
||||
@@ -130,15 +127,9 @@ split_to_dom_tree(const gchar *tag, Split *spl)
|
||||
gnc_lot_get_guid(lot)));
|
||||
}
|
||||
}
|
||||
{
|
||||
xmlNodePtr kvpnode = kvp_frame_to_dom_tree("split:slots",
|
||||
qof_instance_get_slots (QOF_INSTANCE (spl)));
|
||||
if (kvpnode)
|
||||
{
|
||||
xmlAddChild(ret, kvpnode);
|
||||
}
|
||||
}
|
||||
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree("split:slots",
|
||||
QOF_INSTANCE(spl)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -193,14 +184,9 @@ gnc_transaction_dom_tree_create(Transaction *trn)
|
||||
}
|
||||
g_free (str);
|
||||
|
||||
{
|
||||
xmlNodePtr kvpnode = kvp_frame_to_dom_tree("trn:slots",
|
||||
qof_instance_get_slots (QOF_INSTANCE (trn)));
|
||||
if (kvpnode)
|
||||
{
|
||||
xmlAddChild(ret, kvpnode);
|
||||
}
|
||||
}
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree("trn:slots",
|
||||
QOF_INSTANCE(trn)));
|
||||
|
||||
add_trans_splits(ret, trn);
|
||||
|
||||
@@ -370,8 +356,8 @@ spl_slots_handler(xmlNodePtr node, gpointer data)
|
||||
struct split_pdata *pdata = data;
|
||||
gboolean successful;
|
||||
|
||||
successful = dom_tree_to_kvp_frame_given(node,
|
||||
qof_instance_get_slots (QOF_INSTANCE (pdata->split)));
|
||||
successful = dom_tree_create_instance_slots(node,
|
||||
QOF_INSTANCE (pdata->split));
|
||||
g_return_val_if_fail(successful, FALSE);
|
||||
|
||||
return TRUE;
|
||||
@@ -530,7 +516,7 @@ trn_slots_handler(xmlNodePtr node, gpointer trans_pdata)
|
||||
Transaction *trn = pdata->trans;
|
||||
gboolean successful;
|
||||
|
||||
successful = dom_tree_to_kvp_frame_given(node, qof_instance_get_slots (QOF_INSTANCE (trn)));
|
||||
successful = dom_tree_create_instance_slots(node, QOF_INSTANCE (trn));
|
||||
|
||||
g_return_val_if_fail(successful, FALSE);
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ const gchar *vendor_version_string = "2.0.0";
|
||||
static xmlNodePtr
|
||||
vendor_dom_tree_create (GncVendor *vendor)
|
||||
{
|
||||
xmlNodePtr ret, kvpnode;
|
||||
xmlNodePtr ret;
|
||||
GncBillTerm *term;
|
||||
GncTaxTable *taxtable;
|
||||
|
||||
@@ -118,10 +118,9 @@ vendor_dom_tree_create (GncVendor *vendor)
|
||||
xmlAddChild (ret, guid_to_dom_tree (vendor_taxtable_string,
|
||||
qof_instance_get_guid(QOF_INSTANCE(taxtable))));
|
||||
|
||||
kvpnode = kvp_frame_to_dom_tree (vendor_slots_string,
|
||||
qof_instance_get_slots (QOF_INSTANCE(vendor)));
|
||||
if (kvpnode) xmlAddChild (ret, kvpnode);
|
||||
|
||||
/* xmlAddChild won't do anything with a NULL, so tests are superfluous. */
|
||||
xmlAddChild(ret, qof_instance_slots_to_dom_tree(vendor_slots_string,
|
||||
QOF_INSTANCE(vendor)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -313,8 +312,7 @@ static gboolean
|
||||
vendor_slots_handler (xmlNodePtr node, gpointer vendor_pdata)
|
||||
{
|
||||
struct vendor_pdata *pdata = vendor_pdata;
|
||||
return dom_tree_to_kvp_frame_given (
|
||||
node, qof_instance_get_slots (QOF_INSTANCE(pdata->vendor)));
|
||||
return dom_tree_create_instance_slots(node, QOF_INSTANCE(pdata->vendor));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -365,18 +365,18 @@ add_kvp_slot(const char * key, KvpValue* value, xmlNodePtr node)
|
||||
}
|
||||
|
||||
xmlNodePtr
|
||||
kvp_frame_to_dom_tree(const char *tag, const KvpFrame *frame)
|
||||
qof_instance_slots_to_dom_tree(const char *tag, const QofInstance* inst)
|
||||
{
|
||||
xmlNodePtr ret;
|
||||
const char ** keys;
|
||||
unsigned int i;
|
||||
|
||||
KvpFrame *frame = qof_instance_get_slots(QOF_INSTANCE (inst));
|
||||
if (!frame)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ret = xmlNewNode(NULL, BAD_CAST tag);
|
||||
ret = xmlNewNode(nullptr, BAD_CAST tag);
|
||||
|
||||
keys = kvp_frame_get_keys(frame);
|
||||
for (i = 0; keys[i]; ++i)
|
||||
|
||||
@@ -47,7 +47,8 @@ gchar * timespec_nsec_to_string(const Timespec *ts);
|
||||
gchar * timespec_sec_to_string(const Timespec *ts);
|
||||
xmlNodePtr gdate_to_dom_tree(const char *tag, const GDate *spec);
|
||||
xmlNodePtr gnc_numeric_to_dom_tree(const char *tag, const gnc_numeric *num);
|
||||
xmlNodePtr kvp_frame_to_dom_tree(const char *tag, const KvpFrame *frame);
|
||||
xmlNodePtr qof_instance_slots_to_dom_tree(const char *tag,
|
||||
const QofInstance *inst);
|
||||
xmlNodePtr guint_to_dom_tree(const char *tag, guint an_int);
|
||||
xmlNodePtr recurrence_to_dom_tree(const gchar *tag, const Recurrence *r);
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ dom_tree_to_guid(xmlNodePtr node)
|
||||
}
|
||||
}
|
||||
|
||||
KvpValue*
|
||||
static KvpValue*
|
||||
dom_tree_to_integer_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
gchar *text;
|
||||
@@ -162,7 +162,7 @@ dom_tree_to_boolean(xmlNodePtr node, gboolean* b)
|
||||
}
|
||||
}
|
||||
|
||||
KvpValue*
|
||||
static KvpValue*
|
||||
dom_tree_to_double_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
gchar *text;
|
||||
@@ -181,7 +181,7 @@ dom_tree_to_double_kvp_value(xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
KvpValue*
|
||||
static KvpValue*
|
||||
dom_tree_to_numeric_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
gnc_numeric *danum;
|
||||
@@ -199,7 +199,7 @@ dom_tree_to_numeric_kvp_value(xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
KvpValue*
|
||||
static KvpValue*
|
||||
dom_tree_to_string_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
gchar *datext;
|
||||
@@ -216,7 +216,7 @@ dom_tree_to_string_kvp_value(xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
KvpValue*
|
||||
static KvpValue*
|
||||
dom_tree_to_guid_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
GncGUID *daguid;
|
||||
@@ -233,7 +233,7 @@ dom_tree_to_guid_kvp_value(xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
KvpValue*
|
||||
static KvpValue*
|
||||
dom_tree_to_timespec_kvp_value (xmlNodePtr node)
|
||||
{
|
||||
Timespec ts;
|
||||
@@ -247,7 +247,7 @@ dom_tree_to_timespec_kvp_value (xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
KvpValue*
|
||||
static KvpValue*
|
||||
dom_tree_to_gdate_kvp_value (xmlNodePtr node)
|
||||
{
|
||||
GDate *date;
|
||||
@@ -304,7 +304,14 @@ string_to_binary(const gchar *str, void **v, guint64 *data_len)
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
KvpValue*
|
||||
static KvpValue* dom_tree_to_kvp_value(xmlNodePtr node);
|
||||
//needed for test access as well as internal use.
|
||||
extern "C"
|
||||
{
|
||||
KvpFrame* dom_tree_to_kvp_frame(xmlNodePtr node);
|
||||
}
|
||||
|
||||
static KvpValue*
|
||||
dom_tree_to_list_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
GList *list = NULL;
|
||||
@@ -330,7 +337,7 @@ dom_tree_to_list_kvp_value(xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
KvpValue*
|
||||
static KvpValue*
|
||||
dom_tree_to_frame_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
KvpFrame *frame;
|
||||
@@ -369,7 +376,7 @@ struct kvp_val_converter val_converters[] =
|
||||
{ 0, 0 },
|
||||
};
|
||||
|
||||
KvpValue*
|
||||
static KvpValue*
|
||||
dom_tree_to_kvp_value(xmlNodePtr node)
|
||||
{
|
||||
xmlChar *xml_type;
|
||||
@@ -404,7 +411,7 @@ dom_tree_to_kvp_value(xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
static gboolean
|
||||
dom_tree_to_kvp_frame_given(xmlNodePtr node, KvpFrame *frame)
|
||||
{
|
||||
xmlNodePtr mark;
|
||||
@@ -473,6 +480,12 @@ dom_tree_to_kvp_frame(xmlNodePtr node)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
dom_tree_create_instance_slots(xmlNodePtr node, QofInstance *inst)
|
||||
{
|
||||
KvpFrame *frame = qof_instance_get_slots(inst);
|
||||
return dom_tree_to_kvp_frame_given(node, frame);
|
||||
}
|
||||
|
||||
gchar *
|
||||
dom_tree_to_text(xmlNodePtr tree)
|
||||
|
||||
@@ -50,21 +50,7 @@ GDate* dom_tree_to_gdate(xmlNodePtr node);
|
||||
gnc_numeric* dom_tree_to_gnc_numeric(xmlNodePtr node);
|
||||
gchar * dom_tree_to_text(xmlNodePtr tree);
|
||||
gboolean string_to_binary(const gchar *str, void **v, guint64 *data_len);
|
||||
|
||||
gboolean dom_tree_to_kvp_frame_given(xmlNodePtr node, KvpFrame *frame);
|
||||
|
||||
KvpFrame* dom_tree_to_kvp_frame(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_integer_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_double_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_numeric_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_string_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_guid_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_timespec_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_binary_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_list_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_frame_kvp_value(xmlNodePtr node);
|
||||
KvpValue* dom_tree_to_gdate_kvp_value (xmlNodePtr node);
|
||||
gboolean dom_tree_create_instance_slots(xmlNodePtr node, QofInstance *inst);
|
||||
|
||||
gboolean dom_tree_to_integer(xmlNodePtr node, gint64 *daint);
|
||||
gboolean dom_tree_to_guint16(xmlNodePtr node, guint16 *i);
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
*/
|
||||
/***********************************************************************/
|
||||
|
||||
extern KvpFrame* dom_tree_to_kvp_frame(xmlNodePtr node);
|
||||
|
||||
static int
|
||||
files_return(int ret, const char* msg)
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#define GNC_V2_STRING "gnc-v2"
|
||||
const gchar *gnc_v2_xml_version_string = GNC_V2_STRING;
|
||||
extern KvpFrame* dom_tree_to_kvp_frame(xmlNodePtr node);
|
||||
|
||||
static void
|
||||
test_kvp_get_slot(int run,
|
||||
@@ -171,13 +172,13 @@ test_kvp_xml_stuff(void)
|
||||
int i;
|
||||
for (i = 0; i < 20; i++)
|
||||
{
|
||||
KvpFrame *test_frame1;
|
||||
QofInstance *inst = g_object_new (QOF_TYPE_INSTANCE, NULL);
|
||||
KvpFrame *test_frame2;
|
||||
xmlNodePtr test_node;
|
||||
|
||||
test_frame1 = get_random_kvp_frame();
|
||||
inst->kvp_data = get_random_kvp_frame();
|
||||
|
||||
test_node = kvp_frame_to_dom_tree("test-kvp", test_frame1);
|
||||
test_node = qof_instance_slots_to_dom_tree("test-kvp", inst);
|
||||
|
||||
if (!test_node)
|
||||
{
|
||||
@@ -188,7 +189,7 @@ test_kvp_xml_stuff(void)
|
||||
{
|
||||
test_frame2 = dom_tree_to_kvp_frame(test_node);
|
||||
|
||||
if (kvp_frame_compare(test_frame1, test_frame2) == 0)
|
||||
if (kvp_frame_compare(inst->kvp_data, test_frame2) == 0)
|
||||
{
|
||||
success("xml stuff");
|
||||
}
|
||||
@@ -196,7 +197,7 @@ test_kvp_xml_stuff(void)
|
||||
{
|
||||
gchar *tmp;
|
||||
failure("xml stuff");
|
||||
tmp = kvp_frame_to_string(test_frame1);
|
||||
tmp = kvp_frame_to_string(inst->kvp_data);
|
||||
printf(" with kvp_frame 1:\n%s\n", tmp);
|
||||
g_free(tmp);
|
||||
printf(" and xml:\n");
|
||||
@@ -209,8 +210,7 @@ test_kvp_xml_stuff(void)
|
||||
kvp_frame_delete(test_frame2);
|
||||
xmlFreeNode(test_node);
|
||||
}
|
||||
|
||||
kvp_frame_delete(test_frame1);
|
||||
g_object_unref (inst);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -319,8 +319,6 @@ gboolean SXRegister (void);
|
||||
#define xaccSchedXactionIsDirty(X) qof_instance_is_dirty (QOF_INSTANCE(X))
|
||||
/** \deprecated */
|
||||
#define xaccSchedXactionGetGUID(X) qof_entity_get_guid(QOF_INSTANCE(X))
|
||||
/** \deprecated */
|
||||
#define xaccSchedXactionGetSlots(X) qof_instance_get_slots(QOF_INSTANCE(X))
|
||||
|
||||
#endif /* XACC_SCHEDXACTION_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user