aboutsummaryrefslogtreecommitdiff
path: root/src/upnp/upnp_xmlnode.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/upnp/upnp_xmlnode.h')
-rw-r--r--src/upnp/upnp_xmlnode.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/src/upnp/upnp_xmlnode.h b/src/upnp/upnp_xmlnode.h
new file mode 100644
index 000000000..199975e37
--- /dev/null
+++ b/src/upnp/upnp_xmlnode.h
@@ -0,0 +1,92 @@
1/**
2 * @file xmlnode.h XML DOM functions
3 * @ingroup core
4 *
5 * gaim
6 *
7 * Gaim is the legal property of its developers, whose names are too numerous
8 * to list here. Please refer to the COPYRIGHT file distributed with this
9 * source distribution.
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
25#ifndef _GGAIM_XMLNODE_H_
26#define _GGAIM_XMLNODE_H_
27
28
29#ifdef __cplusplus
30extern "C"
31{
32#endif
33
34/**
35 * An xmlnode.
36 */
37 typedef struct _xmlnode xmlnode;
38
39/**
40 * Gets a child node named name.
41 *
42 * @param parent The parent node.
43 * @param name The child's name.
44 *
45 * @return The child or NULL.
46 */
47 xmlnode *xmlnode_get_child (const xmlnode * parent, const char *name);
48
49/**
50 * Gets the next node with the same name as node.
51 *
52 * @param node The node of a twin to find.
53 *
54 * @return The twin of node or NULL.
55 */
56 xmlnode *xmlnode_get_next_twin (xmlnode * node);
57
58/**
59 * Gets data from a node.
60 *
61 * @param node The node to get data from.
62 *
63 * @return The data from the node. You must g_free
64 * this string when finished using it.
65 */
66 char *xmlnode_get_data (xmlnode * node);
67
68/**
69 * Creates a node from a string of XML. Calling this on the
70 * root node of an XML document will parse the entire document
71 * into a tree of nodes, and return the xmlnode of the root.
72 *
73 * @param str The string of xml.
74 * @param size The size of the string, or -1 if @a str is
75 * NUL-terminated.
76 *
77 * @return The new node.
78 */
79 xmlnode *xmlnode_from_str (const char *str, int size);
80
81/**
82 * Frees a node and all of it's children.
83 *
84 * @param node The node to free.
85 */
86 void xmlnode_free (xmlnode * node);
87
88#ifdef __cplusplus
89}
90#endif
91
92#endif /* _GAIM_XMLNODE_H_ */