GnuCash  5.6-150-g038405b370+
sixtp-utils.h
1 /********************************************************************
2  * sixtp-utils.h *
3  * Copyright 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_UTILS_H
25 #define SIXTP_UTILS_H
26 #include "qof.h"
27 #include "sixtp.h"
28 
29 typedef struct
30 {
31  time64 time;
32  guint s_block_count;
34 
35 gboolean isspace_str (const gchar* str, int nomorethan);
36 
37 gboolean allow_and_ignore_only_whitespace (GSList* sibling_data,
38  gpointer parent_data,
39  gpointer global_data,
40  gpointer* result,
41  const char* text,
42  int length);
43 
44 gboolean generic_accumulate_chars (GSList* sibling_data,
45  gpointer parent_data,
46  gpointer global_data,
47  gpointer* result,
48  const char* text,
49  int length);
50 
51 
52 void generic_free_data_for_children (gpointer data_for_children,
53  GSList* data_from_children,
54  GSList* sibling_data,
55  gpointer parent_data,
56  gpointer global_data,
57  gpointer* result,
58  const gchar* tag);
59 
60 gchar* concatenate_child_result_chars (GSList* data_from_children);
61 
62 gboolean string_to_double (const char* str, double* result);
63 
64 gboolean string_to_gint64 (const gchar* str, gint64* v);
65 
66 gboolean string_to_guint16 (const gchar* str, guint16* v);
67 
68 gboolean string_to_guint (const gchar* str, guint* v);
69 
70 gboolean hex_string_to_binary (const gchar* str, void** v, guint64* data_len);
71 
72 gboolean generic_return_chars_end_handler (gpointer data_for_children,
73  GSList* data_from_children,
74  GSList* sibling_data,
75  gpointer parent_data,
76  gpointer global_data,
77  gpointer* result,
78  const gchar* tag);
79 
80 sixtp* simple_chars_only_parser_new (sixtp_end_handler end_handler);
81 
82 gboolean generic_timespec_start_handler (GSList* sibling_data,
83  gpointer parent_data,
84  gpointer global_data,
85  gpointer* data_for_children,
86  gpointer* result,
87  const gchar* tag, gchar** attrs);
88 
89 gboolean timespec_parse_ok (Time64ParseInfo* info);
90 
91 gboolean generic_timespec_secs_end_handler (
92  gpointer data_for_children,
93  GSList* data_from_children, GSList* sibling_data,
94  gpointer parent_data, gpointer global_data,
95  gpointer* result, const gchar* tag);
96 
97 gboolean generic_timespec_nsecs_end_handler (
98  gpointer data_for_children,
99  GSList* data_from_children, GSList* sibling_data,
100  gpointer parent_data, gpointer global_data,
101  gpointer* result, const gchar* tag);
102 
103 
104 sixtp* generic_timespec_parser_new (sixtp_end_handler end_handler);
105 
106 gboolean generic_guid_end_handler (
107  gpointer data_for_children,
108  GSList* data_from_children, GSList* sibling_data,
109  gpointer parent_data, gpointer global_data,
110  gpointer* result, const gchar* tag);
111 
112 sixtp* generic_guid_parser_new (void);
113 
114 gboolean generic_gnc_numeric_end_handler (
115  gpointer data_for_children,
116  GSList* data_from_children, GSList* sibling_data,
117  gpointer parent_data, gpointer global_data,
118  gpointer* result, const gchar* tag);
119 
120 sixtp* generic_gnc_numeric_parser_new (void);
121 
122 sixtp* restore_char_generator (sixtp_end_handler ender);
123 
124 
125 
126 #endif /* _SIXTP_UTILS_H_ */
Definition: sixtp.h:129
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition: gnc-date.h:87