GUPnP.DeviceInfo¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The |
||
r/w/co |
The device type |
||
r/w/c |
The XML document related to this device |
||
w/c |
The XML element related to this device |
||
r/w/c |
The location of the device description file |
||
r/w/co |
The resource factory to use |
||
r/w/co |
The Unique Device Name |
||
r/w/c |
The URL base |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class GUPnP.DeviceInfo(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
Device information shared by local and remote devices
This class aggregates the information that is shared between remote and local devices.
- get_context()¶
- Returns:
The
GUPnP.Context
the devices is operating on.- Return type:
Get the associated
GUPnP.Context
.
- get_description_value(element)¶
- Parameters:
element (
str
) – Name of the description element to retrieve- Returns:
a newly allocated string containing the requested value or
None
if the device description doesn’t contain the given element- Return type:
This function provides generic access to the contents of arbitrary elements in the device description file.
New in version 0.14.0.
- get_device(type)¶
- Parameters:
type (
str
) – The type of the device to be retrieved.- Returns:
A new
GUPnP.DeviceInfo
.- Return type:
Get the device with type type directly contained in self as a new object implementing
GUPnP.DeviceInfo
, orNone
if no such device was found. The returned object should be unreffed when done.Note that devices are not cached internally, so that every time you call this function a new object is created. The application must cache any used devices if it wishes to keep them around and re-use them.
- get_device_type()¶
-
Get the UPnP device type of this
GUPnP.DeviceInfo
, e.g.urn:schemas-upnp-org:device:InternetGatewayDevice:1
- get_friendly_name()¶
- Returns:
A newly allocated string containing the “friendly name” of the device, or
None
if not available.GLib.free
() after use.- Return type:
Get the friendly name of the device.
- get_icon_async(requested_mime_type, requested_depth, requested_width, requested_height, prefer_bigger, cancellable, callback, *user_data)¶
- Parameters:
requested_mime_type (
str
orNone
) – The requested file format, orNone
for anyrequested_depth (
int
) – The requested color depth, or -1 for anyrequested_width (
int
) – The requested width, or -1 for anyrequested_height (
int
) – The requested height, or -1 for anyprefer_bigger (
bool
) –True
if a bigger, rather than a smaller icon should be returned if no exact match could be foundcancellable (
Gio.Cancellable
orNone
) –callback (
Gio.AsyncReadyCallback
orNone
) –
Download the device icon matching the request parameters. For details on the lookup procedure, see [method`GUPnP`.DeviceInfo.get_icon_url]
- get_icon_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – AGio.AsyncResult
- Raises:
- Returns:
A
GLib.Bytes
contaning the icon orNone
on either error or no matching icon was found.- mime:
The location where to store the the format of the returned icon, or
None
. The returned string should be freed after use- depth:
The location where to store the depth of the returned icon, or
None
- width:
The location where to store the width of the returned icon, or
None
- height:
The location where to store the height of the returned icon, or
None
- Return type:
(
GLib.Bytes
, mime:str
, depth:int
, width:int
, height:int
)
- get_icon_url(requested_mime_type, requested_depth, requested_width, requested_height, prefer_bigger)¶
- Parameters:
requested_mime_type (
str
orNone
) – The requested file format, orNone
for anyrequested_depth (
int
) – The requested color depth, or -1 for anyrequested_width (
int
) – The requested width, or -1 for anyrequested_height (
int
) – The requested height, or -1 for anyprefer_bigger (
bool
) –True
if a bigger, rather than a smaller icon should be returned if no exact match could be found
- Returns:
a string, or
None
.GLib.free
() after use.- mime_type:
The location where to store the the format of the returned icon, or
None
. The returned string should be freed after use- depth:
The location where to store the depth of the returned icon, or
None
- width:
The location where to store the width of the returned icon, or
None
- height:
The location where to store the height of the returned icon, or
None
- Return type:
(
str
orNone
, mime_type:str
, depth:int
, width:int
, height:int
)
Get an URL pointing to the icon most closely matching the given criteria, or
None
.If requested_mime_type is set, only icons with this mime type will be returned. If requested_depth is set, only icons with this or lower depth will be returned. If requested_width and/or requested_height are set, only icons that are this size or smaller are returned, unless prefer_bigger is set, in which case the next biggest icon will be returned. The returned strings should be freed.
- get_manufacturer()¶
- Returns:
A newly allocated string containing the manufacturer of the device, or
None
if not available.GLib.free
() after use.- Return type:
Get the manufacturer of the device.
- get_manufacturer_url()¶
-
Get an URL pointing to the manufacturer’s website.
- get_model_description()¶
-
Get the description of the device model.
- get_model_name()¶
-
Get the model name of the device.
- get_model_number()¶
-
Get the model number of the device.
- get_model_url()¶
-
Get an URL pointing to the device model’s website.
- get_presentation_url()¶
-
Get an URL pointing to the device’s presentation page, for web-based administration, if available.
- get_resource_factory()¶
- Returns:
- Return type:
Get the
GUPnP.ResourceFactory
used by the self.
- get_serial_number()¶
-
Get the serial number of the device.
- get_service(type)¶
- Parameters:
type (
str
) – The type of the service to be retrieved.- Returns:
- Return type:
Get the service with type type directly contained in self as a new object implementing
GUPnP.ServiceInfo
, orNone
if no such device was found.Note that services are not cached internally, so that every time you call this function a new object is created. The application must cache any used services if it wishes to keep them around and re-use them.
- get_upc()¶
-
Get the Universal Product Code of the device.
- list_device_types()¶
- Returns:
A
GLib.List
of strings. The elements should beGLib.free
()’d and the list should be g_list_free()’d.- Return type:
Get a
GLib.List
of strings representing the types of the devices directly contained in self.
- list_devices()¶
- Returns:
a
GLib.List
of newGUPnP.DeviceInfo
objects orNone
if no devices are- Return type:
[
GUPnP.DeviceInfo
] orNone
Get a
GLib.List
of new objects implementingGUPnP.DeviceInfo
representing the devices directly contained in self, excluding itself.Note that devices are not cached internally, so that every time you call this function new objects are created. The application must cache any used devices if it wishes to keep them around and re-use them.
- list_dlna_capabilities()¶
- Returns:
a
GLib.List
of newly allocated strings orNone
if the device description doesn’t contain the <dlna:X_DLNACAP> element.- Return type:
Get a
GLib.List
of strings that represent the device capabilities as announced in the device description file using the <dlna:X_DLNACAP> element.New in version 0.14.0.
- list_dlna_device_class_identifier()¶
- Returns:
a
GLib.List
of newly allocated strings orNone
if the device description doesn’t contain any<dlna:X_DLNADOC>
element.- Return type:
Get a list of strings that represent the device class and version as announced in the device description file using the
<dlna:X_DLNADOC>
element, e.g.DMS-1.51
,M-DMS-1.51
and so on.New in version 0.20.4.
- list_service_types()¶
- Returns:
A
GLib.List
of strings. The elements should beGLib.free
()’d and the list should be g_list_free()’d.- Return type:
Get a
GLib.List
of strings representing the types of the services directly contained in self, but not in its subdevices.
- list_services()¶
- Returns:
A
GLib.List
of newGUPnP.ServiceInfo
objects.- Return type:
[
GUPnP.ServiceInfo
] orNone
Get a
GLib.List
of new objects implementingGUPnP.ServiceInfo
representing the services directly contained in self. The returned list should be g_list_free()’d and the elements should beGObject.Object.unref
()’d.Note that services are not cached internally, so that every time you call function new objects are created. The application must cache any used services if it wishes to keep them around and re-use them.
Property Details¶
- GUPnP.DeviceInfo.props.context¶
- Name:
context
- Type:
- Default Value:
- Flags:
The
GUPnP.Context
to use.
- GUPnP.DeviceInfo.props.device_type¶
- Name:
device-type
- Type:
- Default Value:
- Flags:
The device type, e.g.
urn:schemas-upnp-org:device:InternetGatewayDevice:1
- GUPnP.DeviceInfo.props.document¶
- Name:
document
- Type:
- Default Value:
- Flags:
The description document
- GUPnP.DeviceInfo.props.element¶
-
Private property.
- GUPnP.DeviceInfo.props.location¶
-
The location of the device description file.
- GUPnP.DeviceInfo.props.resource_factory¶
- Name:
resource-factory
- Type:
- Default Value:
- Flags:
The resource factory to use. Set to
None
for default factory.
- GUPnP.DeviceInfo.props.udn¶
- Name:
udn
- Type:
- Default Value:
- Flags:
The UDN of this device.