2000-12-28 22:12:02 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
2001-01-29 00:06:02 +00:00
|
|
|
* 2000 Wim Taymans <wim.taymans@chello.be>
|
2000-12-28 22:12:02 +00:00
|
|
|
*
|
|
|
|
* gstxml.h: Header for XML save/restore operations
|
2000-01-30 09:03:00 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_XML_H__
|
|
|
|
#define __GST_XML_H__
|
|
|
|
|
2001-10-17 10:21:27 +00:00
|
|
|
#include <gst/gstconfig.h>
|
2001-01-18 11:16:53 +00:00
|
|
|
|
2001-10-17 10:21:27 +00:00
|
|
|
#ifndef GST_DISABLE_LOADSAVE
|
2001-01-18 11:16:53 +00:00
|
|
|
|
2000-12-15 01:57:34 +00:00
|
|
|
#include <gst/gstelement.h>
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2000-09-24 22:45:48 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#define GST_TYPE_XML \
|
2001-01-29 00:06:02 +00:00
|
|
|
(gst_xml_get_type())
|
2000-09-24 22:45:48 +00:00
|
|
|
#define GST_XML(obj) \
|
2001-06-25 01:20:11 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_XML,GstXML))
|
2000-09-24 22:45:48 +00:00
|
|
|
#define GST_XML_CLASS(klass) \
|
2001-06-25 01:20:11 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_XML,GstXMLClass))
|
2000-09-24 22:45:48 +00:00
|
|
|
#define GST_IS_XML(obj) \
|
2001-06-25 01:20:11 +00:00
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_XML))
|
2000-09-24 22:45:48 +00:00
|
|
|
#define GST_IS_XML_CLASS(obj) \
|
2001-06-25 01:20:11 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_XML))
|
2000-09-24 22:45:48 +00:00
|
|
|
|
|
|
|
typedef struct _GstXML GstXML;
|
|
|
|
typedef struct _GstXMLClass GstXMLClass;
|
|
|
|
|
|
|
|
struct _GstXML {
|
2001-01-29 00:06:02 +00:00
|
|
|
GstObject object;
|
2000-09-27 19:33:10 +00:00
|
|
|
|
2000-12-16 17:12:28 +00:00
|
|
|
GList *topelements;
|
2001-01-29 00:06:02 +00:00
|
|
|
|
|
|
|
xmlNsPtr ns;
|
2000-09-24 22:45:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstXMLClass {
|
2001-01-29 00:06:02 +00:00
|
|
|
GstObjectClass parent_class;
|
|
|
|
|
|
|
|
/* signal callbacks */
|
2001-01-30 23:53:04 +00:00
|
|
|
void (*object_loaded) (GstXML *xml, GstObject *object, xmlNodePtr self);
|
|
|
|
void (*object_saved) (GstXML *xml, GstObject *object, xmlNodePtr self);
|
2000-09-24 22:45:48 +00:00
|
|
|
};
|
|
|
|
|
2001-06-25 01:20:11 +00:00
|
|
|
GType gst_xml_get_type (void);
|
2000-09-24 22:45:48 +00:00
|
|
|
|
|
|
|
|
2000-01-30 09:03:00 +00:00
|
|
|
/* create an XML document out of a pipeline */
|
2001-01-21 23:20:46 +00:00
|
|
|
xmlDocPtr gst_xml_write (GstElement *element);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2001-01-29 00:06:02 +00:00
|
|
|
GstXML* gst_xml_new (void);
|
|
|
|
|
2001-01-30 23:53:04 +00:00
|
|
|
gboolean gst_xml_parse_doc (GstXML *xml, xmlDocPtr doc, const guchar *root);
|
2001-01-29 00:06:02 +00:00
|
|
|
gboolean gst_xml_parse_file (GstXML *xml, const guchar *fname, const guchar *root);
|
|
|
|
gboolean gst_xml_parse_memory (GstXML *xml, guchar *buffer, guint size, const gchar *root);
|
2001-01-21 23:20:46 +00:00
|
|
|
|
2000-09-24 22:45:48 +00:00
|
|
|
|
2000-11-04 18:54:07 +00:00
|
|
|
GstElement* gst_xml_get_element (GstXML *xml, const guchar *name);
|
2001-01-21 23:20:46 +00:00
|
|
|
GList* gst_xml_get_topelements (GstXML *xml);
|
2000-09-27 19:33:10 +00:00
|
|
|
|
2000-09-24 22:45:48 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2001-06-25 06:45:56 +00:00
|
|
|
#else // GST_DISABLE_LOADSAVE
|
|
|
|
|
|
|
|
#pragma GCC poison gst_xml_write
|
|
|
|
#pragma GCC poison gst_xml_new
|
|
|
|
#pragma GCC poison gst_xml_parse_doc
|
|
|
|
#pragma GCC poison gst_xml_parse_file
|
|
|
|
#pragma GCC poison gst_xml_parse_memory
|
|
|
|
#pragma GCC poison gst_xml_get_element
|
|
|
|
#pragma GCC poison gst_xml_get_topelements
|
|
|
|
|
|
|
|
#endif // GST_DISABLE_LOADSAVE
|
|
|
|
|
2000-01-30 09:03:00 +00:00
|
|
|
#endif /* __GST_XML_H__ */
|