GSSDP.ResourceBrowser¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
|
||
r/w/co |
The associated client. |
||
r/w |
The maximum number of seconds in which to request other parties to respond. |
||
r/w |
The discovery target. |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class GSSDP.ResourceBrowser(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Class handling resource discovery.
After creating a browser and activating it, the [signalGSSDP.ResourceBrowser::resource-available] and [signalGSSDP.ResourceBrowser::resource-unavailable] signals will be emitted whenever the availability of a resource matching the specified discovery target changes. A discovery request is sent out automatically when activating the browser.
If the associated [classGSSDP.Client] was configured to support UDA 1.1, it will also emit the [signalGSSDP.ResourceBrowser::resource-update] if any of the UDA 1.1 devices on the nework annouced its upcoming BOOTID change.
- classmethod new(client, target)¶
- Parameters:
client (
GSSDP.Client
) – TheGSSDP.Client
to associate withtarget (
str
) – A SSDP search target
- Returns:
A new
GSSDP.ResourceBrowser
object.- Return type:
Create a new resource browser for target.
target is a generic string the resource browser listens for on the SSDP bus. There are several possible targets such as
ssdp:all
for everything that is announced using SSDPupnp:rootdevice
for UPnP device entry points, not caring about a special device typeThe UUID of a specific device
Device types, such as
urn:schemas-upnp-org:device:MediaServer:1
Service types, such as
urn:schemas-upnp-org:service:ContentDirectory:1
- get_active()¶
-
Get whether the browser is currently active.
- get_client()¶
- Returns:
The
GSSDP.Client
self is associated with.- Return type:
Get the
GSSDP.Client
this resource browser is using for SSDP.
- rescan()¶
-
Begins discovery if self is active and no discovery is performed. Otherwise does nothing.
- set_target(target)¶
- Parameters:
target (
str
) – The browser target
Sets the browser target of self to target.
- Parameters:
usn (
str
) –
Signal Details¶
- GSSDP.ResourceBrowser.signals.resource_available(resource_browser, usn, locations)¶
- Signal Name:
resource-available
- Flags:
- Parameters:
resource_browser (
GSSDP.ResourceBrowser
) – The object which received the signalusn (
str
) – The USN of the discovered resourcelocations ([
str
]) – A [struct`GLib`.List] of strings describing the locations of the discovered resource.
The
::resource-available
signal is emitted whenever a new resource has become available.
- Signal Name:
resource-unavailable
- Flags:
- Parameters:
resource_browser (
GSSDP.ResourceBrowser
) – The object which received the signalusn (
str
) – The USN of the resource
The
::resource-unavailable
signal is emitted whenever a resource is not available any more.
- GSSDP.ResourceBrowser.signals.resource_update(resource_browser, usn, boot_id, next_boot_id)¶
- Signal Name:
resource-update
- Flags:
- Parameters:
resource_browser (
GSSDP.ResourceBrowser
) – The object which received the signalusn (
str
) – The USN of the resourceboot_id (
int
) – The current boot-idnext_boot_id (
int
) – The next boot-id
The
::resource-update
signal is emitted whenever an UPnP 1.1 device is about to change it’s BOOTID.New in version 1.2.0.
Property Details¶
- GSSDP.ResourceBrowser.props.active¶
-
Whether this browser is active or not.
- GSSDP.ResourceBrowser.props.client¶
- Name:
client
- Type:
- Default Value:
- Flags:
The [classGSSDP.Client] to use for listening to SSDP messages
- GSSDP.ResourceBrowser.props.mx¶
-
The maximum number of seconds in which to request other parties to respond.