GUPnP.ControlPoint

g GObject.Object GObject.Object GSSDP.ResourceBrowser GSSDP.ResourceBrowser GObject.Object->GSSDP.ResourceBrowser GUPnP.ControlPoint GUPnP.ControlPoint GSSDP.ResourceBrowser->GUPnP.ControlPoint

Subclasses:

None

Methods

Inherited:

GSSDP.ResourceBrowser (9), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (context, target)

class

new_full (context, factory, target)

get_context ()

get_resource_factory ()

list_device_proxies ()

list_service_proxies ()

Virtual Methods

Inherited:

GSSDP.ResourceBrowser (2), GObject.Object (7)

do_device_proxy_available (proxy)

do_device_proxy_unavailable (proxy)

do_service_proxy_available (proxy)

do_service_proxy_unavailable (proxy)

Properties

Inherited:

GSSDP.ResourceBrowser (4)

Name

Type

Flags

Short Description

resource-factory

GUPnP.ResourceFactory

r/w/co

The resource factory to use

Signals

Inherited:

GSSDP.ResourceBrowser (3), GObject.Object (1)

Name

Short Description

device-proxy-available

The ::device-proxy-available signal is emitted whenever a new device has become available.

device-proxy-unavailable

The ::device-proxy-unavailable signal is emitted whenever a device is not available any more.

service-proxy-available

The ::service-proxy-available signal is emitted whenever a new service has become available.

service-proxy-unavailable

The ::service-proxy-unavailable signal is emitted whenever a service is not available any more.

Fields

Inherited:

GSSDP.ResourceBrowser (3), GObject.Object (1)

Name

Type

Access

Description

parent_instance

GSSDP.ResourceBrowser

r

Class Details

class GUPnP.ControlPoint(**kwargs)
Bases:

GSSDP.ResourceBrowser

Abstract:

No

Structure:

GUPnP.ControlPointClass

Network resource discovery.

GUPnP.ControlPoint handles 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:
Returns:

A new GUPnP.ControlPoint object.

Return type:

GUPnP.ControlPoint

Create a new GUPnP.ControlPoint with the specified context and target.

target should be a service or device name, such as urn:schemas-upnp-org:service:WANIPConnection:1 or urn:schemas-upnp-org:device:MediaRenderer:1.

classmethod new_full(context, factory, target)
Parameters:
Returns:

A new GUPnP.ControlPoint object.

Return type:

GUPnP.ControlPoint

Create a new GUPnP.ControlPoint with the specified context, factory and target.

target should be a service or device name, such as urn:schemas-upnp-org:service:WANIPConnection:1 or urn:schemas-upnp-org:device:MediaRenderer:1.

By passing a custom GUPnPResourceFactory, the proxies handed out in ::device-available and ::service-available can 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:

GUPnP.Context

Get the GUPnP.ControlPoint associated with self.

Deprecated since version 1.4.0: Use [methodGSSDP.ResourceBrowser.get_client] instead.

get_resource_factory()
Returns:

The GUPnP.ResourceFactory used by this control point

Return type:

GUPnP.ResourceFactory

Get the GUPnP.ResourceFactory used 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:

[GUPnP.DeviceProxy]

Get the list of GUPnP.DeviceProxy objects 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:

[GUPnP.ServiceProxy]

Get the list of discovered GUPnP.ServiceProxy objects 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) –

do_device_proxy_unavailable(proxy) virtual
Parameters:

proxy (GUPnP.DeviceProxy) –

do_service_proxy_available(proxy) virtual
Parameters:

proxy (GUPnP.ServiceProxy) –

do_service_proxy_unavailable(proxy) virtual
Parameters:

proxy (GUPnP.ServiceProxy) –

Signal Details

GUPnP.ControlPoint.signals.device_proxy_available(control_point, proxy)
Signal Name:

device-proxy-available

Flags:

RUN_LAST

Parameters:

The ::device-proxy-available signal is emitted whenever a new device has become available.

GUPnP.ControlPoint.signals.device_proxy_unavailable(control_point, proxy)
Signal Name:

device-proxy-unavailable

Flags:

RUN_LAST

Parameters:

The ::device-proxy-unavailable signal 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:

RUN_LAST

Parameters:

The ::service-proxy-available signal is emitted whenever a new service has become available.

GUPnP.ControlPoint.signals.service_proxy_unavailable(control_point, proxy)
Signal Name:

service-proxy-unavailable

Flags:

RUN_LAST

Parameters:

The ::service-proxy-unavailable signal is emitted whenever a service is not available any more.

Property Details

GUPnP.ControlPoint.props.resource_factory
Name:

resource-factory

Type:

GUPnP.ResourceFactory

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The resource factory to use. Set to None for default factory.