Update gupnp to 0.20.5 (fdeb6f9f)
[profile/ivi/GUPnP.git] / libgupnp / gupnp-device-info.h
1 /*
2  * Copyright (C) 2006, 2007 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_DEVICE_INFO_H__
23 #define __GUPNP_DEVICE_INFO_H__
24
25 #include <glib-object.h>
26 #include <libxml/tree.h>
27 #include <libsoup/soup-uri.h>
28
29 #include "gupnp-context.h"
30 #include "gupnp-service-info.h"
31 #include "gupnp-resource-factory.h"
32
33 G_BEGIN_DECLS
34
35 GType
36 gupnp_device_info_get_type (void) G_GNUC_CONST;
37
38 #define GUPNP_TYPE_DEVICE_INFO \
39                 (gupnp_device_info_get_type ())
40 #define GUPNP_DEVICE_INFO(obj) \
41                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
42                  GUPNP_TYPE_DEVICE_INFO, \
43                  GUPnPDeviceInfo))
44 #define GUPNP_DEVICE_INFO_CLASS(obj) \
45                 (G_TYPE_CHECK_CLASS_CAST ((obj), \
46                  GUPNP_TYPE_DEVICE_INFO, \
47                  GUPnPDeviceInfoClass))
48 #define GUPNP_IS_DEVICE_INFO(obj) \
49                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
50                  GUPNP_TYPE_DEVICE_INFO))
51 #define GUPNP_IS_DEVICE_INFO_CLASS(obj) \
52                 (G_TYPE_CHECK_CLASS_TYPE ((obj), \
53                  GUPNP_TYPE_DEVICE_INFO))
54 #define GUPNP_DEVICE_INFO_GET_CLASS(obj) \
55                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
56                  GUPNP_TYPE_DEVICE_INFO, \
57                  GUPnPDeviceInfoClass))
58
59 typedef struct _GUPnPDeviceInfoPrivate GUPnPDeviceInfoPrivate;
60 typedef struct _GUPnPDeviceInfo GUPnPDeviceInfo;
61 typedef struct _GUPnPDeviceInfoClass GUPnPDeviceInfoClass;
62
63 /**
64  * GUPnPDeviceInfo:
65  *
66  * This struct contains private data only, and should be accessed using the
67  * functions below.
68  */
69 struct _GUPnPDeviceInfo {
70         GObject parent;
71
72         GUPnPDeviceInfoPrivate *priv;
73 };
74
75 struct _GUPnPDeviceInfoClass {
76         GObjectClass parent_class;
77
78         /* vtable */
79         xmlNode          * (* get_element) (GUPnPDeviceInfo *info);
80
81         /* FIXME: Once we can break API/ABI, clean-up and rename the
82          * _get_device/_get_service functions */
83 #ifndef GOBJECT_INTROSPECTION_SKIP
84         GUPnPDeviceInfo  * (* get_device)  (GUPnPDeviceInfo *info,
85                                             xmlNode         *element);
86         GUPnPServiceInfo * (* get_service) (GUPnPDeviceInfo *info,
87                                             xmlNode         *element);
88 #endif
89         /* future padding */
90         void (* _gupnp_reserved1) (void);
91         void (* _gupnp_reserved2) (void);
92         void (* _gupnp_reserved3) (void);
93         void (* _gupnp_reserved4) (void);
94 };
95
96
97 GUPnPContext *
98 gupnp_device_info_get_context            (GUPnPDeviceInfo *info);
99
100 const char *
101 gupnp_device_info_get_location           (GUPnPDeviceInfo *info);
102
103 const SoupURI *
104 gupnp_device_info_get_url_base           (GUPnPDeviceInfo *info);
105
106 const char *
107 gupnp_device_info_get_udn                (GUPnPDeviceInfo *info);
108
109 const char *
110 gupnp_device_info_get_device_type        (GUPnPDeviceInfo *info);
111
112 char *
113 gupnp_device_info_get_friendly_name      (GUPnPDeviceInfo *info);
114
115 char *
116 gupnp_device_info_get_manufacturer       (GUPnPDeviceInfo *info);
117
118 char *
119 gupnp_device_info_get_manufacturer_url   (GUPnPDeviceInfo *info);
120
121 char *
122 gupnp_device_info_get_model_description  (GUPnPDeviceInfo *info);
123
124 char *
125 gupnp_device_info_get_model_name         (GUPnPDeviceInfo *info);
126
127 char *
128 gupnp_device_info_get_model_number       (GUPnPDeviceInfo *info);
129
130 char *
131 gupnp_device_info_get_model_url          (GUPnPDeviceInfo *info);
132
133 char *
134 gupnp_device_info_get_serial_number      (GUPnPDeviceInfo *info);
135
136 char *
137 gupnp_device_info_get_upc                (GUPnPDeviceInfo *info);
138
139 char *
140 gupnp_device_info_get_icon_url           (GUPnPDeviceInfo *info,
141                                           const char      *requested_mime_type,
142                                           int              requested_depth,
143                                           int              requested_width,
144                                           int              requested_height,
145                                           gboolean         prefer_bigger,
146                                           char           **mime_type,
147                                           int             *depth,
148                                           int             *width,
149                                           int             *height);
150
151 char *
152 gupnp_device_info_get_presentation_url   (GUPnPDeviceInfo *info);
153
154 GList *
155 gupnp_device_info_list_dlna_device_class_identifier (GUPnPDeviceInfo *info);
156
157 GList *
158 gupnp_device_info_list_dlna_capabilities (GUPnPDeviceInfo *info);
159
160 char *
161 gupnp_device_info_get_description_value  (GUPnPDeviceInfo *info,
162                                           const char      *element);
163 GList *
164 gupnp_device_info_list_devices           (GUPnPDeviceInfo *info);
165
166 GList *
167 gupnp_device_info_list_device_types      (GUPnPDeviceInfo *info);
168
169 GUPnPDeviceInfo *
170 gupnp_device_info_get_device             (GUPnPDeviceInfo *info,
171                                           const char      *type);
172
173 GList *
174 gupnp_device_info_list_services          (GUPnPDeviceInfo *info);
175
176 GList *
177 gupnp_device_info_list_service_types     (GUPnPDeviceInfo *info);
178
179 GUPnPServiceInfo *
180 gupnp_device_info_get_service            (GUPnPDeviceInfo *info,
181                                           const char      *type);
182
183 GUPnPResourceFactory *
184 gupnp_device_info_get_resource_factory   (GUPnPDeviceInfo *device_info);
185
186 G_END_DECLS
187
188 #endif /* __GUPNP_DEVICE_INFO_H__ */