Add gobject introspection
[profile/ivi/GUPnP.git] / libgupnp / gupnp-root-device.h
1 /*
2  * Copyright (C) 2007, 2008 OpenedHand Ltd.
3  *
4  * Author: Jorn Baayen <jorn@openedhand.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21
22 #ifndef __GUPNP_ROOT_DEVICE_H__
23 #define __GUPNP_ROOT_DEVICE_H__
24
25 #include <libxml/tree.h>
26
27 #include <libgssdp/gssdp-resource-group.h>
28
29 #include "gupnp-context.h"
30 #include "gupnp-device.h"
31 #include "gupnp-resource-factory.h"
32 #include "gupnp-xml-doc.h"
33
34 G_BEGIN_DECLS
35
36 GType
37 gupnp_root_device_get_type (void) G_GNUC_CONST;
38
39 #define GUPNP_TYPE_ROOT_DEVICE \
40                 (gupnp_root_device_get_type ())
41 #define GUPNP_ROOT_DEVICE(obj) \
42                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
43                  GUPNP_TYPE_ROOT_DEVICE, \
44                  GUPnPRootDevice))
45 #define GUPNP_ROOT_DEVICE_CLASS(obj) \
46                 (G_TYPE_CHECK_CLASS_CAST ((obj), \
47                  GUPNP_TYPE_ROOT_DEVICE, \
48                  GUPnPRootDeviceClass))
49 #define GUPNP_IS_ROOT_DEVICE(obj) \
50                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
51                  GUPNP_TYPE_ROOT_DEVICE))
52 #define GUPNP_IS_ROOT_DEVICE_CLASS(obj) \
53                 (G_TYPE_CHECK_CLASS_TYPE ((obj), \
54                  GUPNP_TYPE_ROOT_DEVICE))
55 #define GUPNP_ROOT_DEVICE_GET_CLASS(obj) \
56                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
57                  GUPNP_TYPE_ROOT_DEVICE, \
58                  GUPnPRootDeviceClass))
59
60 typedef struct _GUPnPRootDevicePrivate GUPnPRootDevicePrivate;
61 typedef struct _GUPnPRootDevice GUPnPRootDevice;
62 typedef struct _GUPnPRootDeviceClass GUPnPRootDeviceClass;
63
64 /**
65  * GUPnPRootDevice:
66  *
67  * This struct contains private data only, and should be accessed using the
68  * functions below.
69  */
70 struct _GUPnPRootDevice {
71         GUPnPDevice parent;
72
73         GUPnPRootDevicePrivate *priv;
74 };
75
76 struct _GUPnPRootDeviceClass {
77         GUPnPDeviceClass parent_class;
78
79         /* future padding */
80         void (* _gupnp_reserved1) (void);
81         void (* _gupnp_reserved2) (void);
82         void (* _gupnp_reserved3) (void);
83         void (* _gupnp_reserved4) (void);
84 };
85
86 GUPnPRootDevice *
87 gupnp_root_device_new             (GUPnPContext         *context,
88                                    const char           *description_path,
89                                    const char           *description_dir);
90
91 GUPnPRootDevice *
92 gupnp_root_device_new_full        (GUPnPContext         *context,
93                                    GUPnPResourceFactory *factory,
94                                    GUPnPXMLDoc          *description_doc,
95                                    const char           *description_path,
96                                    const char           *description_dir);
97
98 void
99 gupnp_root_device_set_available   (GUPnPRootDevice      *root_device,
100                                    gboolean              available);
101
102 gboolean
103 gupnp_root_device_get_available   (GUPnPRootDevice      *root_device);
104
105 const char *
106 gupnp_root_device_get_relative_location
107                                   (GUPnPRootDevice      *root_device);
108
109 const char *
110 gupnp_root_device_get_description_path
111                                   (GUPnPRootDevice      *root_device);
112
113 const char *
114 gupnp_root_device_get_description_dir
115                                   (GUPnPRootDevice      *root_device);
116
117 GSSDPResourceGroup *
118 gupnp_root_device_get_ssdp_resource_group
119                                   (GUPnPRootDevice      *root_device);
120
121 G_END_DECLS
122
123 #endif /* __GUPNP_ROOT_DEVICE_H__ */