GUPNP_DEVICE_ACTION_CALLBACK_SET(3) 1 GUPNP_DEVICE_ACTION_CALLBACK_SET(3)
gupnp_device_action_callback_set - Set device callback function
SYNOPSIS
bool gupnp_device_action_callback_set (resource $root_device, int $signal, string $action_name, mixed $callback, [mixed $arg])
DESCRIPTION
Set device callback function for signal and action.
PARAMETERS
o $root_device
- A root device identifier, returned by gupnp_root_device_new(3).
o $signal
- The value of signal. Signal can be one of the following values:
o GUPNP_SIGNAL_ACTION_INVOKED - Emitted whenever an action is invoked. Handler should process action and must call either
gupnp_service_action_return(3) or gupnp_service_action_return_error(3).
o GUPNP_SIGNAL_NOTIFY_FAILED - Emitted whenever notification of a client fails.
o $action_name
- The name of action.
o $callback
- The callback function for the certain signal. Typically, callback function takes on three parameters. The $service parameter's
identifier being the first, $action parameter's identifier (in case GUPNP_SIGNAL_ACTION_INVOKED signal) or $error parameter's mes-
sage (in case GUPNP_SIGNAL_NOTIFY_FAILED signal) being the second, and the $arg is third.
o $arg
- User data for $callback.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
ERRORS
/EXCEPTIONS
Issues E_WARNING either with not valid callback function or with not valid signal.
SEE ALSO
gupnp_root_device_new(3).
PHP Documentation Group GUPNP_DEVICE_ACTION_CALLBACK_SET(3)