GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 [email protected] *
21  * *
22  ********************************************************************/
23 
24 #ifndef SIXTP_DOM_PARSERS_H
25 #define SIXTP_DOM_PARSERS_H
26 
27 #include <glib.h>
28 
29 #include "gnc-xml-helper.h"
30 
31 #include "gnc-commodity.h"
32 #include "qof.h"
33 #include "gnc-budget.h"
34 
35 GncGUID* dom_tree_to_guid(xmlNodePtr node);
36 
37 gnc_commodity* dom_tree_to_commodity_ref(xmlNodePtr node, QofBook *book);
38 gnc_commodity *dom_tree_to_commodity_ref_no_engine(xmlNodePtr node, QofBook *);
39 
40 GList* dom_tree_freqSpec_to_recurrences(xmlNodePtr node, QofBook *book);
41 Recurrence* dom_tree_to_recurrence(xmlNodePtr node);
42 
43 Timespec dom_tree_to_timespec(xmlNodePtr node);
44 gboolean dom_tree_valid_timespec(Timespec *ts, const xmlChar *name);
45 GDate* dom_tree_to_gdate(xmlNodePtr node);
46 gnc_numeric* dom_tree_to_gnc_numeric(xmlNodePtr node);
47 gchar * dom_tree_to_text(xmlNodePtr tree);
48 gboolean string_to_binary(const gchar *str, void **v, guint64 *data_len);
49 
50 gboolean dom_tree_to_kvp_frame_given(xmlNodePtr node, KvpFrame *frame);
51 
52 KvpFrame* dom_tree_to_kvp_frame(xmlNodePtr node);
53 KvpValue* dom_tree_to_kvp_value(xmlNodePtr node);
54 KvpValue* dom_tree_to_integer_kvp_value(xmlNodePtr node);
55 KvpValue* dom_tree_to_double_kvp_value(xmlNodePtr node);
56 KvpValue* dom_tree_to_numeric_kvp_value(xmlNodePtr node);
57 KvpValue* dom_tree_to_string_kvp_value(xmlNodePtr node);
58 KvpValue* dom_tree_to_guid_kvp_value(xmlNodePtr node);
59 KvpValue* dom_tree_to_timespec_kvp_value(xmlNodePtr node);
60 KvpValue* dom_tree_to_binary_kvp_value(xmlNodePtr node);
61 KvpValue* dom_tree_to_list_kvp_value(xmlNodePtr node);
62 KvpValue* dom_tree_to_frame_kvp_value(xmlNodePtr node);
63 KvpValue* dom_tree_to_gdate_kvp_value (xmlNodePtr node);
64 
65 gboolean dom_tree_to_integer(xmlNodePtr node, gint64 *daint);
66 gboolean dom_tree_to_guint16(xmlNodePtr node, guint16 *i);
67 gboolean dom_tree_to_guint(xmlNodePtr node, guint *i);
68 gboolean dom_tree_to_boolean(xmlNodePtr node, gboolean* b);
69 
70 /* higher level structures */
71 Account* dom_tree_to_account(xmlNodePtr node, QofBook *book);
72 QofBook* dom_tree_to_book (xmlNodePtr node, QofBook *book);
73 GNCLot* dom_tree_to_lot (xmlNodePtr node, QofBook *book);
74 Transaction* dom_tree_to_transaction(xmlNodePtr node, QofBook *book);
75 GncBudget* dom_tree_to_budget(xmlNodePtr node, QofBook *book);
76 
78 {
79  const char *tag;
80 
81  gboolean (*handler) (xmlNodePtr, gpointer data);
82 
83  int required;
84  int gotten;
85 };
86 
87 gboolean dom_tree_generic_parse(xmlNodePtr node,
88  struct dom_tree_handler *handlers,
89  gpointer data);
90 
91 
92 #endif /* _SIXTP_DOM_PARSERS_H_ */
GnuCash Budgets.
Use a 64-bit unsigned int timespec.
Definition: gnc-date.h:299
Definition: guid.h:65
struct KvpFrameImpl KvpFrame
Definition: kvp_frame.h:76
struct KvpValueImpl KvpValue
Definition: kvp_frame.h:80
Commodity handling public routines.