Docs updates
[platform/upstream/gstreamer.git] / gst / gstxml.h
1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *                    2000 Wim Taymans <wtay@chello.be>
4  *
5  * gstxml.h: Header for XML save/restore operations
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 #ifndef __GST_XML_H__
24 #define __GST_XML_H__
25
26 //#include <gnome-xml/parser.h>
27 #include <parser.h>
28
29 // Include compatability defines: if libxml hasn't already defined these,
30 // we have an old version 1.x
31 #ifndef xmlChildrenNode
32 #define xmlChildrenNode childs
33 #define xmlRootNode root
34 #endif
35
36
37 #include <gst/gstelement.h>
38
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif /* __cplusplus */
43
44 #define GST_TYPE_XML \
45   (gst_object_get_type())
46 #define GST_XML(obj) \
47   (GTK_CHECK_CAST((obj),GST_TYPE_XML,GstXML))
48 #define GST_XML_CLASS(klass) \
49   (GTK_CHECK_CLASS_CAST((klass),GST_TYPE_XML,GstXMLClass))
50 #define GST_IS_XML(obj) \
51   (GTK_CHECK_TYPE((obj),GST_TYPE_XML))
52 #define GST_IS_XML_CLASS(obj) \
53   (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_XML))
54
55 typedef struct _GstXML GstXML;
56 typedef struct _GstXMLClass GstXMLClass;
57
58 struct _GstXML {
59   GtkObject object;
60
61   GHashTable *elements;
62   GList      *topelements;
63 };
64
65 struct _GstXMLClass {
66   GtkObjectClass parent_class;
67 };
68
69 GtkType         gst_xml_get_type        (void);
70
71
72 /* create an XML document out of a pipeline */
73 xmlDocPtr       gst_xml_write           (GstElement *element);
74
75 GstXML*         gst_xml_new             (const guchar *fname, const guchar *root);
76 GstXML*         gst_xml_new_from_memory (guchar *buffer, guint size, const gchar *root);
77
78
79 GstElement*     gst_xml_get_element     (GstXML *xml, const guchar *name);
80 GList*          gst_xml_get_topelements (GstXML *xml);
81
82 #ifdef __cplusplus
83 }
84 #endif /* __cplusplus */
85
86 #endif /* __GST_XML_H__ */