GUPnPControlPoint

## GUPnPControlPoint GUPnPControlPoint — Class for resource discovery. |

## Synopsis

    struct              GUPnPControlPoint;
    GUPnPControlPoint * gupnp_control_point_new             (GUPnPContext *context,
                                                             const char *target);
    GUPnPControlPoint * gupnp_control_point_new_full        (GUPnPContext *context,
                                                             GUPnPResourceFactory *factory,
                                                             const char *target);
    GUPnPResourceFactory * gupnp_control_point_get_resource_factory
                                                            (GUPnPControlPoint *control_point);
    GUPnPContext *      gupnp_control_point_get_context     (GUPnPControlPoint *control_point);
    const GList *       gupnp_control_point_list_device_proxies
                                                            (GUPnPControlPoint *control_point);
    const GList *       gupnp_control_point_list_service_proxies
                                                            (GUPnPControlPoint *control_point);

## Object Hierarchy

      GObject
       +----GSSDPResourceBrowser
             +----GUPnPControlPoint

## Properties

      "resource-factory"         GUPnPResourceFactory*  : Read / Write / Construct Only

## Signals

      "device-proxy-available"                         : Run Last
      "device-proxy-unavailable"                       : Run Last
      "service-proxy-available"                        : Run Last
      "service-proxy-unavailable"                      : Run Last

## Description

GUPnPControlPoint handles device and service discovery. After creating a control point and activating it using `gssdp_resource_browser_set_active()`, the ::device-proxy-available, ::service-proxy-available, ::device-proxy-unavailable and ::service-proxy-unavailable signals will be emitted whenever the availability of a device or service matching the specified discovery target changes.

## Details

### struct GUPnPControlPoint

    struct GUPnPControlPoint;

This struct contains private data only, and should be accessed using the functions below.

### gupnp_control_point_new ()

    GUPnPControlPoint * gupnp_control_point_new             (GUPnPContext *context,
                                                             const char *target);

Create a new GUPnPControlPoint 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`.

`context` : | A GUPnPContext
`target` : | The search target
Returns : | A new GUPnPControlPoint object.

### gupnp_control_point_new_full ()

    GUPnPControlPoint * gupnp_control_point_new_full        (GUPnPContext *context,
                                                             GUPnPResourceFactory *factory,
                                                             const char *target);

Create a new GUPnPControlPoint 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`.

`context` : | A GUPnPContext
`factory` : | A GUPnPResourceFactory
`target` : | The search target
Returns : | A new GUPnPControlPoint object.

### gupnp_control_point_get_resource_factory ()

    GUPnPResourceFactory * gupnp_control_point_get_resource_factory
                                                            (GUPnPControlPoint *control_point);

Get the GUPnPResourceFactory used by the `control_point`.

`control_point` : | A GUPnPControlPoint
Returns : | A GUPnPResourceFactory. [transfer none]

### gupnp_control_point_get_context ()

    GUPnPContext *      gupnp_control_point_get_context     (GUPnPControlPoint *control_point);

Get the GUPnPControlPoint associated with `control_point`.

`control_point` : | A GUPnPControlPoint
Returns : | The GUPnPContext. [transfer none]

### gupnp_control_point_list_device_proxies ()

    const GList *       gupnp_control_point_list_device_proxies
                                                            (GUPnPControlPoint *control_point);

Get the GList of discovered GUPnPDeviceProxy objects. Do not free the list nor its elements.

`control_point` : | A GUPnPControlPoint
Returns : | a GList of GUPnPDeviceProxy objects. [element-type GUPnP.DeviceProxy][transfer none]

### gupnp_control_point_list_service_proxies ()

    const GList *       gupnp_control_point_list_service_proxies
                                                            (GUPnPControlPoint *control_point);

Get the GList of discovered GUPnPServiceProxy objects. Do not free the list nor its elements.

`control_point` : | A GUPnPControlPoint
Returns : | a GList of GUPnPServiceProxy objects. [element-type][transfer none]

## Property Details

### The `"resource-factory"` property

      "resource-factory"         GUPnPResourceFactory*  : Read / Write / Construct Only

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

## Signal Details

### The `"device-proxy-available"` signal

    void                user_function                      (GUPnPControlPoint *control_point,
                                                            GUPnPDeviceProxy  *proxy,
                                                            gpointer           user_data)          : Run Last

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

`control_point` : | The GUPnPControlPoint that received the signal
`proxy` : | The now available GUPnPDeviceProxy
`user_data` : | user data set when the signal handler was connected.

### The `"device-proxy-unavailable"` signal

    void                user_function                      (GUPnPControlPoint *control_point,
                                                            GUPnPDeviceProxy  *proxy,
                                                            gpointer           user_data)          : Run Last

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

`control_point` : | The GUPnPControlPoint that received the signal
`proxy` : | The now unavailable GUPnPDeviceProxy
`user_data` : | user data set when the signal handler was connected.

### The `"service-proxy-available"` signal

    void                user_function                      (GUPnPControlPoint *control_point,
                                                            GUPnPServiceProxy *proxy,
                                                            gpointer           user_data)          : Run Last

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

`control_point` : | The GUPnPControlPoint that received the signal
`proxy` : | The now available GUPnPServiceProxy
`user_data` : | user data set when the signal handler was connected.

### The `"service-proxy-unavailable"` signal

    void                user_function                      (GUPnPControlPoint *control_point,
                                                            GUPnPServiceProxy *proxy,
                                                            gpointer           user_data)          : Run Last

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

`control_point` : | The GUPnPControlPoint that received the signal
`proxy` : | The now unavailable GUPnPServiceProxy
`user_data` : | user data set when the signal handler was connected.