GnuCash  5.6-150-g038405b370+
sixtp-dom-parsers.h
1 /********************************************************************
2  * sixtp-dom-parsers.h *
3  * Copyright (c) 2001 Gnumatic, Inc. *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License*
16  * along with this program; if not, contact: *
17  * *
18  * Free Software Foundation Voice: +1-617-542-5942 *
19  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
20  * Boston, MA 02110-1301, USA gnu@gnu.org *
21  * *
22  ********************************************************************/
23 
24 #ifndef SIXTP_DOM_PARSERS_H
25 #define SIXTP_DOM_PARSERS_H
26 #include <glib.h>
27 
28 #include "gnc-commodity.h"
29 #include "qof.h"
30 #include "gnc-budget.h"
31 
32 #include "gnc-xml-helper.h"
33 
34 GncGUID* dom_tree_to_guid (xmlNodePtr node);
35 
36 gnc_commodity* dom_tree_to_commodity_ref (xmlNodePtr node, QofBook* book);
37 gnc_commodity* dom_tree_to_commodity_ref_no_engine (xmlNodePtr node, QofBook*);
38 
39 GList* dom_tree_freqSpec_to_recurrences (xmlNodePtr node, QofBook* book);
40 Recurrence* dom_tree_to_recurrence (xmlNodePtr node);
41 
42 time64 dom_tree_to_time64 (xmlNodePtr node);
43 gboolean dom_tree_valid_time64 (time64 ts, const xmlChar* name);
44 GDate* dom_tree_to_gdate (xmlNodePtr node);
45 gnc_numeric dom_tree_to_gnc_numeric (xmlNodePtr node);
46 gchar* dom_tree_to_text (xmlNodePtr tree);
47 gboolean string_to_binary (const gchar* str, void** v, guint64* data_len);
48 gboolean dom_tree_create_instance_slots (xmlNodePtr node, QofInstance* inst);
49 
50 gboolean dom_tree_to_integer (xmlNodePtr node, gint64* daint);
51 gboolean dom_tree_to_guint16 (xmlNodePtr node, guint16* i);
52 gboolean dom_tree_to_guint (xmlNodePtr node, guint* i);
53 gboolean dom_tree_to_boolean (xmlNodePtr node, gboolean* b);
54 
55 /* higher level structures */
56 Account* dom_tree_to_account (xmlNodePtr node, QofBook* book);
57 QofBook* dom_tree_to_book (xmlNodePtr node, QofBook* book);
58 GNCLot* dom_tree_to_lot (xmlNodePtr node, QofBook* book);
59 Transaction* dom_tree_to_transaction (xmlNodePtr node, QofBook* book);
60 GncBudget* dom_tree_to_budget (xmlNodePtr node, QofBook* book);
61 
63 {
64  const char* tag;
65 
66  gboolean (*handler) (xmlNodePtr, gpointer data);
67 
68  int required;
69  int gotten;
70 };
71 
72 gboolean dom_tree_generic_parse (xmlNodePtr node,
73  struct dom_tree_handler* handlers,
74  gpointer data);
75 
76 #endif /* _SIXTP_DOM_PARSERS_H_ */
STRUCTS.
GnuCash Budgets.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition: gnc-date.h:87
The type used to store guids in C.
Definition: guid.h:75
Commodity handling public routines.