Update gupnp to 0.20.5 (fdeb6f9f)
[profile/ivi/GUPnP.git] / libgupnp / gupnp-xml-doc.h
1 /*
2  * Copyright (C) 2006, 2007 OpenedHand Ltd.
3  * Copyright (C) 2009 Nokia Corporation.
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., 51 Franklin Street, Fifth Floor,
22  * Boston, MA 02110-1301, 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 G_BEGIN_DECLS
32
33 GType
34 gupnp_xml_doc_get_type (void) G_GNUC_CONST;
35
36 #define GUPNP_TYPE_XML_DOC \
37                 (gupnp_xml_doc_get_type ())
38 #define GUPNP_XML_DOC(obj) \
39                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
40                  GUPNP_TYPE_XML_DOC, \
41                  GUPnPXMLDoc))
42 #define GUPNP_XML_DOC_CLASS(obj) \
43                 (G_TYPE_CHECK_CLASS_CAST ((obj), \
44                  GUPNP_TYPE_XML_DOC, \
45                  GUPnPXMLDocClass))
46 #define GUPNP_IS_XML_DOC(obj) \
47                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
48                  GUPNP_TYPE_XML_DOC))
49 #define GUPNP_IS_XML_DOC_CLASS(obj) \
50                 (G_TYPE_CHECK_CLASS_TYPE ((obj), \
51                  GUPNP_TYPE_XML_DOC))
52 #define GUPNP_XML_DOC_GET_CLASS(obj) \
53                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
54                  GUPNP_TYPE_XML_DOC, \
55                  GUPnPXMLDocClass))
56
57 typedef struct _GUPnPXMLDoc GUPnPXMLDoc;
58 typedef struct _GUPnPXMLDocClass GUPnPXMLDocClass;
59
60 /**
61  * GUPnPXMLDoc:
62  * @doc: Pointer to the document.
63  *
64  * Reference-counting wrapper for libxml's #xmlDoc
65  */
66 struct _GUPnPXMLDoc {
67         GObject parent;
68         /*< public >*/
69         xmlDoc *doc;
70 };
71
72 struct _GUPnPXMLDocClass {
73         GObjectClass parent_class;
74 };
75
76 GUPnPXMLDoc *
77 gupnp_xml_doc_new                       (xmlDoc         *xml_doc);
78
79 GUPnPXMLDoc *
80 gupnp_xml_doc_new_from_path             (const char     *path,
81                                          GError        **error);
82
83 G_END_DECLS
84
85 #endif /* __GUPNP_XML_DOC_H__ */