2 * Copyright (C) 2006, 2007 OpenedHand Ltd.
4 * Author: Jorn Baayen <jorn@openedhand.com>
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.
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.
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.
22 #ifndef __GUPNP_DEVICE_INFO_H__
23 #define __GUPNP_DEVICE_INFO_H__
25 #include <glib-object.h>
26 #include <libxml/tree.h>
27 #include <libsoup/soup-uri.h>
29 #include "gupnp-context.h"
30 #include "gupnp-service-info.h"
31 #include "gupnp-resource-factory.h"
36 gupnp_device_info_get_type (void) G_GNUC_CONST;
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, \
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))
59 typedef struct _GUPnPDeviceInfoPrivate GUPnPDeviceInfoPrivate;
60 typedef struct _GUPnPDeviceInfo GUPnPDeviceInfo;
61 typedef struct _GUPnPDeviceInfoClass GUPnPDeviceInfoClass;
66 * This struct contains private data only, and should be accessed using the
69 struct _GUPnPDeviceInfo {
72 GUPnPDeviceInfoPrivate *priv;
75 struct _GUPnPDeviceInfoClass {
76 GObjectClass parent_class;
79 xmlNode * (* get_element) (GUPnPDeviceInfo *info);
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,
86 GUPnPServiceInfo * (* get_service) (GUPnPDeviceInfo *info,
90 void (* _gupnp_reserved1) (void);
91 void (* _gupnp_reserved2) (void);
92 void (* _gupnp_reserved3) (void);
93 void (* _gupnp_reserved4) (void);
98 gupnp_device_info_get_context (GUPnPDeviceInfo *info);
101 gupnp_device_info_get_location (GUPnPDeviceInfo *info);
104 gupnp_device_info_get_url_base (GUPnPDeviceInfo *info);
107 gupnp_device_info_get_udn (GUPnPDeviceInfo *info);
110 gupnp_device_info_get_device_type (GUPnPDeviceInfo *info);
113 gupnp_device_info_get_friendly_name (GUPnPDeviceInfo *info);
116 gupnp_device_info_get_manufacturer (GUPnPDeviceInfo *info);
119 gupnp_device_info_get_manufacturer_url (GUPnPDeviceInfo *info);
122 gupnp_device_info_get_model_description (GUPnPDeviceInfo *info);
125 gupnp_device_info_get_model_name (GUPnPDeviceInfo *info);
128 gupnp_device_info_get_model_number (GUPnPDeviceInfo *info);
131 gupnp_device_info_get_model_url (GUPnPDeviceInfo *info);
134 gupnp_device_info_get_serial_number (GUPnPDeviceInfo *info);
137 gupnp_device_info_get_upc (GUPnPDeviceInfo *info);
140 gupnp_device_info_get_icon_url (GUPnPDeviceInfo *info,
141 const char *requested_mime_type,
144 int requested_height,
145 gboolean prefer_bigger,
152 gupnp_device_info_get_presentation_url (GUPnPDeviceInfo *info);
155 gupnp_device_info_list_dlna_device_class_identifier (GUPnPDeviceInfo *info);
158 gupnp_device_info_list_dlna_capabilities (GUPnPDeviceInfo *info);
161 gupnp_device_info_get_description_value (GUPnPDeviceInfo *info,
162 const char *element);
164 gupnp_device_info_list_devices (GUPnPDeviceInfo *info);
167 gupnp_device_info_list_device_types (GUPnPDeviceInfo *info);
170 gupnp_device_info_get_device (GUPnPDeviceInfo *info,
174 gupnp_device_info_list_services (GUPnPDeviceInfo *info);
177 gupnp_device_info_list_service_types (GUPnPDeviceInfo *info);
180 gupnp_device_info_get_service (GUPnPDeviceInfo *info,
183 GUPnPResourceFactory *
184 gupnp_device_info_get_resource_factory (GUPnPDeviceInfo *device_info);
188 #endif /* __GUPNP_DEVICE_INFO_H__ */