annotate libaudacious/xml_document.h @ 752:3de4499e65a3 trunk

[svn] blah
author nenolod
date Mon, 27 Feb 2006 20:52:38 -0800
parents b65fe3b68300
children f12d7e208b43
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1 /* BMP - Cross-platform multimedia player
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2 * Copyright (C) 2003-2004 BMP development team.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or modify
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 * (at your option) any later version.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 * GNU General Public License for more details.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 * along with this program; if not, write to the Free Software
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19 #ifndef XML_DOCUMENT_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20 #define XML_DOCUMENT_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22 #include <glib.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24 typedef enum {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
25 BMP_XML_NODE_DOC = 0,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26 BMP_XML_NODE_ELEMENT,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27 BMP_XML_NODE_ATTRIB,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
28 BMP_XML_NODE_TEXT
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
29 } BmpXmlNodeType;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
30
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
31 #define BMP_XML_DOCUMENT(x) ((BmpXmlDocument *)(x))
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33 GNode *tree;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34 GNode *current_node;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35 guint current_depth;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
36 GMarkupParseContext *parse_context;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
37 } BmpXmlDocument;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
38
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
39 #define BMP_XML_NODE_DATA(x) ((BmpXmlNodeData *)(x))
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
40 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
41 BmpXmlNodeType type;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 } BmpXmlNodeData;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44 #define BMP_XML_DOC_NODE_DATA(x) ((BmpXmlDocNodeData *)(x))
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46 BmpXmlNodeType type;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
47 } BmpXmlDocNodeData;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
48
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49 #define BMP_XML_ELEMENT_NODE_DATA(x) ((BmpXmlElementNodeData *)(x))
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
51 BmpXmlNodeType type;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
52 gchar *name;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
53 } BmpXmlElementNodeData;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55 #define BMP_XML_ATTRIB_NODE_DATA(x) ((BmpXmlAttribNodeData *)(x))
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57 BmpXmlNodeType type;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58 gchar *name;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 gchar *value;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
60 } BmpXmlAttribNodeData;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
61
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
62 #define BMP_XML_TEXT_NODE_DATA(x) ((BmpXmlTextNodeData *)(x))
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
63 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
64 BmpXmlNodeType type;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
65 gchar *text;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
66 gsize length;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
67 } BmpXmlTextNodeData;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
68
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
69
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
70 GNode *bmp_xml_doc_node_new(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
71 void bmp_xml_doc_node_data_free(BmpXmlDocNodeData * data);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
72
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
73 GNode *bmp_xml_element_node_new(const gchar * name);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
74 void bmp_xml_element_node_data_free(BmpXmlElementNodeData * data);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
75
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
76 GNode *bmp_xml_attrib_node_new(const gchar * name, const gchar * value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
77 void bmp_xml_attrib_node_data_free(BmpXmlAttribNodeData * data);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
78
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
79 void bmp_xml_text_node_data_free(BmpXmlTextNodeData * data);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
80 GNode *bmp_xml_text_node_new(const gchar * text, gsize length);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
81
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
82
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
83 gboolean bmp_xml_document_load(BmpXmlDocument ** document,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
84 const gchar * filename, GError ** error);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
85
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
86 void bmp_xml_document_free(BmpXmlDocument * document);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
87
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
88 GNode *bmp_xml_document_get_tree(BmpXmlDocument * document);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
89
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
90 #endif