tizen 2.3.1 release
[external/gupnp.git] / libgupnp / gupnp-xml-doc.h
1 /*
2  * Copyright (C) 2006, 2007 OpenedHand Ltd.
3  * Copyright (C) 2009 Nokia Corporation, all rights reserved.
4  *
5  * Author: Jorn Baayen <jorn@openedhand.com>
6  *         Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
7  *                               <zeeshan.ali@nokia.com>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Library General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Library General Public License for more details.
18  *
19  * You should have received a copy of the GNU Library General Public
20  * License along with this library; if not, write to the
21  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22  * Boston, MA 02111-1307, USA.
23  */
24
25 #ifndef __GUPNP_XML_DOC_H__
26 #define __GUPNP_XML_DOC_H__
27
28 #include <libxml/tree.h>
29 #include <glib-object.h>
30
31 GType
32 gupnp_xml_doc_get_type (void) G_GNUC_CONST;
33
34 #define GUPNP_TYPE_XML_DOC \
35                 (gupnp_xml_doc_get_type ())
36 #define GUPNP_XML_DOC(obj) \
37                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
38                  GUPNP_TYPE_XML_DOC, \
39                  GUPnPXMLDoc))
40 #define GUPNP_XML_DOC_CLASS(obj) \
41                 (G_TYPE_CHECK_CLASS_CAST ((obj), \
42                  GUPNP_TYPE_XML_DOC, \
43                  GUPnPXMLDocClass))
44 #define GUPNP_IS_XML_DOC(obj) \
45                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
46                  GUPNP_TYPE_XML_DOC))
47 #define GUPNP_IS_XML_DOC_CLASS(obj) \
48                 (G_TYPE_CHECK_CLASS_TYPE ((obj), \
49                  GUPNP_TYPE_XML_DOC))
50 #define GUPNP_XML_DOC_GET_CLASS(obj) \
51                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
52                  GUPNP_TYPE_XML_DOC, \
53                  GUPnPXMLDocClass))
54
55 typedef struct {
56         GObject parent;
57         /*< public >*/
58         xmlDoc *doc;
59 } GUPnPXMLDoc;
60
61 typedef struct {
62         GObjectClass parent_class;
63 } GUPnPXMLDocClass;
64
65 GUPnPXMLDoc *
66 gupnp_xml_doc_new                       (xmlDoc         *xml_doc);
67
68 GUPnPXMLDoc *
69 gupnp_xml_doc_new_from_path             (const char     *path,
70                                          GError        **error);
71
72 #endif /* __GUPNP_XML_DOC_H__ */