Class
GUPnPService
Description [src]
class GUPnP.Service : GUPnP.ServiceInfo {
parent_instance: GUPnPServiceInfo
}
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.
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.
Available since: 1.2.2
gupnp_service_info_introspect_finish
Finish an asynchronous call initiated with gupnp_service_info_introspect_async().
Available since: 1.2.2
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.Object::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
);
}
Class members
parent_class |
|
No description available. | |
action_invoked |
|
No description available. | |
query_variable |
|
No description available. | |
notify_failed |
|
No description available. | |
_gupnp_reserved1 |
|
No description available. | |
_gupnp_reserved2 |
|
No description available. | |
_gupnp_reserved3 |
|
No description available. | |
_gupnp_reserved4 |
|
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.