### Class

# GUPnP Service

#### Description [src]

    class GUPnP.Service : GUPnP.ServiceInfo
    {
      /* No available fields */
    }

Implementation of an UPnP service

`GUPnPService` allows for handling incoming actions and state variable notification. It implements the `GUPnPServiceInfo` interface.

To implement a service, you can either connect to the `GUPnPService::action-invoked` and `GUPnPService::query-variable` or derive from the `GUPnPService` class and override the virtual functions `GUPnP.ServiceClass.action_invoked` and `GUPnP.ServiceClass.query_variable`.

For more details, see the “Implementing UPnP devices” document.

#### Ancestors

- GUPnPServiceInfo
- GObject

#### Instance methods

###### gupnp_service_action_invoked

Default handler for `GUPnPService::action-invoked`. See its documentation for details.

###### gupnp_service_freeze_notify

Stops sending out notifications to remote clients.

###### gupnp_service_notify

Notifies remote clients that the properties have changed to the specified values.

###### gupnp_service_notify_failed

Default handler for `GUPnPService::notify-failed`. See its documentation for details.

###### gupnp_service_notify_value

Notifies remote clients that `variable` has changed to `value`.

###### gupnp_service_query_variable

Default handler for `GUPnPService::query-variable`. See its documentation for details.

###### gupnp_service_signals_autoconnect

Connects call-back functions to the corresponding signals for variables and actions.

###### gupnp_service_thaw_notify

Sends out any pending notifications, and stops queuing of new ones.

##### Methods inherited from GUPnPServiceInfo (11)

###### gupnp_service_info_get_context

Get the `GUPnPContext` associated with `info`.

###### gupnp_service_info_get_control_url

Get the control URL for this service, or `NULL`..

###### gupnp_service_info_get_event_subscription_url

Get the event subscription URL for this service, or `NULL`.

###### gupnp_service_info_get_id

Get the serviceID of this service, or `NULL` if there is no ID.

###### gupnp_service_info_get_location

Get the location of the device description file.

###### gupnp_service_info_get_scpd_url

Get the SCPD URL for this service, or `NULL` if there is no SCPD.

###### gupnp_service_info_get_service_type

Get the UPnP service type, or `NULL`.

###### gupnp_service_info_get_udn

Get the Unique Device Name of the containing device.

###### gupnp_service_info_get_url_base

Get the URL base of this service.

###### gupnp_service_info_introspect_async

Note that introspection object is created from the information in service description document (SCPD) provided by the service so it can not be created if the service does not provide a SCPD.

since: 1.2.2

###### gupnp_service_info_introspect_finish

Finish an asynchronous call initiated with gupnp_service_info_introspect_async().

since: 1.2.2

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### GUPnP.Service:root-device

The containing `GUPnPRootDevice`.

##### Properties inherited from GUPnPServiceInfo (7)

###### GUPnP.ServiceInfo:context

The `GUPnPContext` to use.

###### GUPnP.ServiceInfo:document

Private property.

###### GUPnP.ServiceInfo:element

Private property.

###### GUPnP.ServiceInfo:location

The location of the device description file.

###### GUPnP.ServiceInfo:service-type

The service type.

###### GUPnP.ServiceInfo:udn

The UDN of the containing device.

###### GUPnP.ServiceInfo:url-base

The URL base (`SoupURI`).

#### Signals

###### GUPnP.Service::action-invoked

Emitted whenever an action is invoked. Handler should process `action` and must call either `gupnp_service_action_return_success()` or `gupnp_service_action_return_error()`.

###### GUPnP.Service::notify-failed

Emitted whenever notification of a client fails.

###### GUPnP.Service::query-variable

Emitted whenever `service` needs to know the value of `variable`. Handler should fill `value` with the value of `variable`.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GUPnPServiceClass {
      GUPnPServiceInfoClass parent_class;
      void (* action_invoked) (
        GUPnPService* service,
        GUPnPServiceAction* action
      );
      void (* query_variable) (
        GUPnPService* service,
        const char* variable,
        GValue* value
      );
      void (* notify_failed) (
        GUPnPService* service,
        const GList* callback_urls,
        const GError* reason
      );
      void (* _gupnp_reserved1) (
    void
      );
      void (* _gupnp_reserved2) (
    void
      );
      void (* _gupnp_reserved3) (
    void
      );
      void (* _gupnp_reserved4) (
    void
      );

    }

No description available.

###### Class members

`parent_class: GUPnPServiceInfoClass`

  No description available.

`action_invoked: void (* action_invoked) ( GUPnPService* service, GUPnPServiceAction* action )`

  No description available.

`query_variable: void (* query_variable) ( GUPnPService* service, const char* variable, GValue* value )`

  No description available.

`notify_failed: void (* notify_failed) ( GUPnPService* service, const GList* callback_urls, const GError* reason )`

  No description available.

`_gupnp_reserved1: void (* _gupnp_reserved1) ( void )`

  No description available.

`_gupnp_reserved2: void (* _gupnp_reserved2) ( void )`

  No description available.

`_gupnp_reserved3: void (* _gupnp_reserved3) ( void )`

  No description available.

`_gupnp_reserved4: void (* _gupnp_reserved4) ( void )`

  No description available.

#### Virtual methods

###### GUPnP.ServiceClass.action_invoked

Default handler for `GUPnPService::action-invoked`. See its documentation for details.

###### GUPnP.ServiceClass.notify_failed

Default handler for `GUPnPService::notify-failed`. See its documentation for details.

###### GUPnP.ServiceClass.query_variable

Default handler for `GUPnPService::query-variable`. See its documentation for details.