Home > PHP > Function > Gupnp > gupnp_control_point_callback_set()

gupnp_control_point_callback_set()

gupnp_control_point_callback_set - Set control point callback

Syntax

bool gupnp_control_point_callback_set (resource $cpoint, int $signal, mixed $callback, mixed $arg)

Arguments

  • cpoint - A control point identifier, returned by gupnp_control_point_new().
  • signal - The value of signal. Signal can be one of the following values: GUPNP_SIGNAL_DEVICE_PROXY_AVAILABLE Emitted whenever a new device has become available. GUPNP_SIGNAL_DEVICE_PROXY_UNAVAILABLE Emitted whenever a device is not available any more. GUPNP_SIGNAL_SERVICE_PROXY_AVAILABLE Emitted whenever a new service has become available. GUPNP_SIGNAL_SERVICE_PROXY_UNAVAILABLE Emitted whenever a service is not available any more.
  • callback - The callback function for the certain signal. Typically, callback function takes on two parameters. The proxy parameter\'s identifier being the first, and the arg second.
  • arg - User data for callback.

Description

Set control point callback function for signal.

Version

PHP PECL gupnp >= 0.1.0

Return value

Returns TRUE on success or FALSE on failure.