gnucash/libgnucash/backend/xml/gnc-xml.h

71 lines
2.9 KiB
C
Raw Normal View History

/********************************************************************\
* gnc-xml.h -- api for gnucash xml i/o *
* *
* Copyright (C) 2001 James LewisMoss <dres@debian.org> *
* *
* 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 *
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#ifndef GNC_XML_H
#define GNC_XML_H
2015-11-29 19:11:29 -06:00
extern "C"
{
#include "SchedXaction.h"
#include "gnc-engine.h"
#include "gnc-pricedb.h"
#include "gnc-budget.h"
2015-11-29 19:11:29 -06:00
}
#include "gnc-xml-helper.h"
#include "sixtp.h"
xmlNodePtr gnc_account_dom_tree_create (Account* act, gboolean exporting,
gboolean allow_incompat);
sixtp* gnc_account_sixtp_parser_create (void);
xmlNodePtr gnc_book_dom_tree_create (QofBook* book);
sixtp* gnc_book_sixtp_parser_create (void);
sixtp* gnc_book_id_sixtp_parser_create (void);
sixtp* gnc_book_slots_sixtp_parser_create (void);
xmlNodePtr gnc_commodity_dom_tree_create (const gnc_commodity* com);
sixtp* gnc_commodity_sixtp_parser_create (void);
sixtp* gnc_freqSpec_sixtp_parser_create (void);
xmlNodePtr gnc_lot_dom_tree_create (GNCLot*);
sixtp* gnc_lot_sixtp_parser_create (void);
xmlNodePtr gnc_pricedb_dom_tree_create (GNCPriceDB* db);
sixtp* gnc_pricedb_sixtp_parser_create (void);
James LewisMoss's patch. * src/gnome/window-main.c (gnc_ui_xml_v2_cb): new func. (gnc_ui_account_heirarchy_cb): new empty func. (gnc_main_create_menus): add devel menu. * src/engine/io-gncxml-v2.h (struct _load_counter_struct): add counters stuff. * src/engine/io-gncxml-v2.c: mostly complete everything. Writing only partially tested. Reading not tested at all. * src/engine/gnc-xml.h: add pricedb declarations. * src/engine/gnc-transaction-xml-v2.c (split_to_dom_tree): check for NULL return from kvp_frame_to_dom_tree and don't add if we get it. (gnc_transaction_dom_tree_create): same. * src/engine/gnc-commodity.c (gnc_commodity_table_get_size): add func. * src/engine/gnc-account-xml-v2.c (gnc_account_dom_tree_create): check for NULL return from kvp_frame_to_dom_tree and don't do anything if we get it. * src/gnome/gnc-http.c (gnc_http_start_post): cast data to char* (it's const char*) (compile warning) * src/gnome/gnc-html.c: put const on char *ptr (compile warning) * src/doc/xml/io-gncxml-version2.dtd: reorder commodity and prices. Add count data defs. * src/engine/sixtp-dom-generators.c (timespec_to_dom_tree): Only write nanoseconds if > 0. (kvp_frame_to_dom_tree): don't return an xmlNodePtr if the frame is null or contains no data. * src/engine/gnc-commodity-xml-v2.c (gnc_commodity_dom_tree_create): check to see if xcode is > 0 * src/engine/gnc-account-xml-v2.c (gnc_account_dom_tree_create): check for description and code strlen > 0 * src/engine/gnc-pricedb-xml-v1.c (pricedb_v2_end_handler): make this func work in the v2 manner with a callback in the global data. (gnc_pricedb_sixtp_parser_create): change to work in the v2 manner with an end handler that does the final link of the data into the book. (pricedb_after_child_handler): add upping the counter for prices loaded. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3772 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-03-13 00:20:03 -06:00
xmlNodePtr gnc_schedXaction_dom_tree_create (SchedXaction* sx);
sixtp* gnc_schedXaction_sixtp_parser_create (void);
xmlNodePtr gnc_budget_dom_tree_create (GncBudget* bgt);
sixtp* gnc_budget_sixtp_parser_create (void);
xmlNodePtr gnc_transaction_dom_tree_create (Transaction* txn);
sixtp* gnc_transaction_sixtp_parser_create (void);
sixtp* gnc_template_transaction_sixtp_parser_create (void);
James LewisMoss's patch. * src/gnome/window-main.c (gnc_ui_xml_v2_cb): new func. (gnc_ui_account_heirarchy_cb): new empty func. (gnc_main_create_menus): add devel menu. * src/engine/io-gncxml-v2.h (struct _load_counter_struct): add counters stuff. * src/engine/io-gncxml-v2.c: mostly complete everything. Writing only partially tested. Reading not tested at all. * src/engine/gnc-xml.h: add pricedb declarations. * src/engine/gnc-transaction-xml-v2.c (split_to_dom_tree): check for NULL return from kvp_frame_to_dom_tree and don't add if we get it. (gnc_transaction_dom_tree_create): same. * src/engine/gnc-commodity.c (gnc_commodity_table_get_size): add func. * src/engine/gnc-account-xml-v2.c (gnc_account_dom_tree_create): check for NULL return from kvp_frame_to_dom_tree and don't do anything if we get it. * src/gnome/gnc-http.c (gnc_http_start_post): cast data to char* (it's const char*) (compile warning) * src/gnome/gnc-html.c: put const on char *ptr (compile warning) * src/doc/xml/io-gncxml-version2.dtd: reorder commodity and prices. Add count data defs. * src/engine/sixtp-dom-generators.c (timespec_to_dom_tree): Only write nanoseconds if > 0. (kvp_frame_to_dom_tree): don't return an xmlNodePtr if the frame is null or contains no data. * src/engine/gnc-commodity-xml-v2.c (gnc_commodity_dom_tree_create): check to see if xcode is > 0 * src/engine/gnc-account-xml-v2.c (gnc_account_dom_tree_create): check for description and code strlen > 0 * src/engine/gnc-pricedb-xml-v1.c (pricedb_v2_end_handler): make this func work in the v2 manner with a callback in the global data. (gnc_pricedb_sixtp_parser_create): change to work in the v2 manner with an end handler that does the final link of the data into the book. (pricedb_after_child_handler): add upping the counter for prices loaded. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3772 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-03-13 00:20:03 -06:00
#endif /* GNC_XML_H */