GUPnP.ControlPoint¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
The resource factory to use |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
The |
|
The |
|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class GUPnP.ControlPoint(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Network resource discovery.
GUPnP.ControlPointhandles device and service discovery. After creating a control point and activating it using [methodGSSDP.ResourceBrowser.set_active], the [signal`GUPnP`.ControlPoint::device-proxy-available], [signal`GUPnP`.ControlPoint::service-proxy-available], [signal`GUPnP`.ControlPoint::device-proxy-unavailable] and [signal`GUPnP`.ControlPoint::service-proxy-unavailable] signals will be emitted whenever the availability of a device or service matching the specified discovery target changes.- classmethod new(context, target)¶
- Parameters:
context (
GUPnP.Context) – AGUPnP.Contexttarget (
str) – The search target
- Returns:
A new
GUPnP.ControlPointobject.- Return type:
Create a new
GUPnP.ControlPointwith the specified context and target.target should be a service or device name, such as
urn:schemas-upnp-org:service:WANIPConnection:1orurn:schemas-upnp-org:device:MediaRenderer:1.
- classmethod new_full(context, factory, target)¶
- Parameters:
context (
GUPnP.Context) – AGUPnP.Contextfactory (
GUPnP.ResourceFactory) – AGUPnP.ResourceFactorytarget (
str) – The search target
- Returns:
A new
GUPnP.ControlPointobject.- Return type:
Create a new
GUPnP.ControlPointwith the specified context, factory and target.target should be a service or device name, such as
urn:schemas-upnp-org:service:WANIPConnection:1orurn:schemas-upnp-org:device:MediaRenderer:1.By passing a custom
GUPnPResourceFactory, the proxies handed out in::device-availableand::service-availablecan be overridden to hand out custom classes instead of the generic [class`GUPnP`.ServiceProxy] and [class`GUPnP`.DeviceProxy].
- get_context()¶
- Returns:
The
GUPnP.Context.- Return type:
Get the
GUPnP.ControlPointassociated with self.Deprecated since version 1.4.0: Use [methodGSSDP.ResourceBrowser.get_client] instead.
- get_resource_factory()¶
- Returns:
The
GUPnP.ResourceFactoryused by this control point- Return type:
Get the
GUPnP.ResourceFactoryused by the self. If none was set during construction by calling [ctor`GUPnP`.ControlPoint.new_full], equivalent to calling [func`GUPnP`.ResourceFactory.get_default]
- list_device_proxies()¶
- Returns:
Device proxies currently assumed to be active.
- Return type:
Get the list of
GUPnP.DeviceProxyobjects the control point currently assumes to be active.Since a device might have gone offline without signalizing it, but the automatic resource timeout has not happened yet, it is possible that some of the devices listed are not available anymore on the network.
Do not free the list nor its elements.
- list_service_proxies()¶
- Returns:
Service proxies currently assumed to be active.
- Return type:
Get the list of discovered
GUPnP.ServiceProxyobjects the control point currently assumes to be active.Since a device might have gone offline without signalizing it, but the automatic resource timeout has not happened yet, it is possible that some of the services listed are not available anymore on the network.
Do not free the list nor its elements.
- do_device_proxy_available(proxy) virtual¶
- Parameters:
proxy (
GUPnP.DeviceProxy) –
- Parameters:
proxy (
GUPnP.DeviceProxy) –
- do_service_proxy_available(proxy) virtual¶
- Parameters:
proxy (
GUPnP.ServiceProxy) –
- Parameters:
proxy (
GUPnP.ServiceProxy) –
Signal Details¶
- GUPnP.ControlPoint.signals.device_proxy_available(control_point, proxy)¶
- Signal Name:
device-proxy-available- Flags:
- Parameters:
control_point (
GUPnP.ControlPoint) – The object which received the signalproxy (
GUPnP.DeviceProxy) – The now availableGUPnP.DeviceProxy
The
::device-proxy-availablesignal is emitted whenever a new device has become available.
- Signal Name:
device-proxy-unavailable- Flags:
- Parameters:
control_point (
GUPnP.ControlPoint) – The object which received the signalproxy (
GUPnP.DeviceProxy) – The now unavailableGUPnP.DeviceProxy
The
::device-proxy-unavailablesignal is emitted whenever a device is not available any more.
- GUPnP.ControlPoint.signals.service_proxy_available(control_point, proxy)¶
- Signal Name:
service-proxy-available- Flags:
- Parameters:
control_point (
GUPnP.ControlPoint) – The object which received the signalproxy (
GUPnP.ServiceProxy) – The now availableGUPnP.ServiceProxy
The
::service-proxy-availablesignal is emitted whenever a new service has become available.
- Signal Name:
service-proxy-unavailable- Flags:
- Parameters:
control_point (
GUPnP.ControlPoint) – The object which received the signalproxy (
GUPnP.ServiceProxy) – The now unavailableGUPnP.ServiceProxy
The
::service-proxy-unavailablesignal is emitted whenever a service is not available any more.