blob: 060579f47bb6caf97dd1b291edd40741d0cc9a7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#ifndef _REST_XML_PARSER
#define _REST_XML_PARSER
#include <glib-object.h>
G_BEGIN_DECLS
#define REST_TYPE_XML_PARSER rest_xml_parser_get_type()
#define REST_XML_PARSER(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), REST_TYPE_XML_PARSER, RestXmlParser))
#define REST_XML_PARSER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), REST_TYPE_XML_PARSER, RestXmlParserClass))
#define REST_IS_XML_PARSER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), REST_TYPE_XML_PARSER))
#define REST_IS_XML_PARSER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), REST_TYPE_XML_PARSER))
#define REST_XML_PARSER_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), REST_TYPE_XML_PARSER, RestXmlParserClass))
typedef struct {
GObject parent;
} RestXmlParser;
typedef struct {
GObjectClass parent_class;
} RestXmlParserClass;
typedef struct _RestXmlNode RestXmlNode;
struct _RestXmlNode {
gchar *name;
gchar *content;
GHashTable *children;
GHashTable *attrs;
RestXmlNode *next;
};
GType rest_xml_parser_get_type (void);
RestXmlNode *rest_xml_node_new (void);
void rest_xml_node_free (RestXmlNode *node);
RestXmlParser *rest_xml_parser_new (void);
RestXmlNode *rest_xml_parser_parse_from_data (RestXmlParser *parser,
const gchar *data,
gssize len);
G_END_DECLS
#endif /* _REST_XML_PARSER */
|