summaryrefslogtreecommitdiff
path: root/rest/rest-xml-parser.h
diff options
context:
space:
mode:
authorTomas Frydrych <tf@linux.intel.com>2011-01-31 15:15:36 +0000
committerTomas Frydrych <tf@linux.intel.com>2011-02-10 12:12:34 +0000
commitdb9aefd94e376fb5a984bd59f860adb0abae532d (patch)
treecc36de9293294812aa0ecd9f3f6a1c8af315f855 /rest/rest-xml-parser.h
parent880049882106f92ab8db7befa3d6d66ab30d4c37 (diff)
downloadlibrest-db9aefd94e376fb5a984bd59f860adb0abae532d.tar.gz
xml-node: API for manually constructing and outputting XML
Split out RestXmlNode into separate source files and added simple API for manually constructing tree of RextXmlNodes and converting such a tree to a string: * xml_node_add_child() * xml_node_add_attribute() * xml_node_set_content() * xml_node_print() Includes xml test for make check
Diffstat (limited to 'rest/rest-xml-parser.h')
-rw-r--r--rest/rest-xml-parser.h36
1 files changed, 1 insertions, 35 deletions
diff --git a/rest/rest-xml-parser.h b/rest/rest-xml-parser.h
index 967c2cf..a8f51ee 100644
--- a/rest/rest-xml-parser.h
+++ b/rest/rest-xml-parser.h
@@ -24,6 +24,7 @@
#define _REST_XML_PARSER
#include <glib-object.h>
+#include <rest/rest-xml-node.h>
G_BEGIN_DECLS
@@ -44,8 +45,6 @@ G_BEGIN_DECLS
#define REST_XML_PARSER_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), REST_TYPE_XML_PARSER, RestXmlParserClass))
-#define REST_TYPE_XML_NODE rest_xml_node_get_type ()
-
typedef struct {
GObject parent;
} RestXmlParser;
@@ -54,28 +53,6 @@ typedef struct {
GObjectClass parent_class;
} RestXmlParserClass;
-/**
- * RestXmlNode:
- * @name: the name of the element
- * @content: the textual content of the element
- * @children: a #GHashTable of string name to #RestXmlNode for the children of
- * the element.
- * @attrs: a #GHashTable of string name to string values for the attributes of
- * the element.
- * @next: the sibling #RestXmlNode with the same name
- */
-typedef struct _RestXmlNode RestXmlNode;
-struct _RestXmlNode {
- /*< private >*/
- volatile int ref_count;
- /*< public >*/
- gchar *name;
- gchar *content;
- GHashTable *children;
- GHashTable *attrs;
- RestXmlNode *next;
-};
-
GType rest_xml_parser_get_type (void);
RestXmlParser *rest_xml_parser_new (void);
@@ -83,17 +60,6 @@ RestXmlNode *rest_xml_parser_parse_from_data (RestXmlParser *parser,
const gchar *data,
goffset len);
-GType rest_xml_node_get_type (void);
-
-RestXmlNode * rest_xml_node_ref (RestXmlNode *node);
-void rest_xml_node_unref (RestXmlNode *node);
-G_GNUC_DEPRECATED void rest_xml_node_free (RestXmlNode *node);
-
-const gchar *rest_xml_node_get_attr (RestXmlNode *node,
- const gchar *attr_name);
-RestXmlNode *rest_xml_node_find (RestXmlNode *start,
- const gchar *tag);
-
G_END_DECLS
#endif /* _REST_XML_PARSER */