Query: gupnp_control_point_callback_set
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
GUPNP_CONTROL_POINT_CALLBACK_SET(3) 1 GUPNP_CONTROL_POINT_CALLBACK_SET(3) gupnp_control_point_callback_set - Set control point callbackSYNOPSISbool gupnp_control_point_callback_set (resource $cpoint, int $signal, mixed $callback, [mixed $arg])DESCRIPTIONSet control point callback function for signal.PARAMETERSo $cpoint - A control point identifier, returned by gupnp_control_point_new(3). o $signal - The value of signal. Signal can be one of the following values: o GUPNP_SIGNAL_DEVICE_PROXY_AVAILABLE - Emitted whenever a new device has become available. o GUPNP_SIGNAL_DEVICE_PROXY_UNAVAILABLE - Emitted whenever a device is not available any more. o GUPNP_SIGNAL_SERVICE_PROXY_AVAILABLE - Emitted whenever a new service has become available. o GUPNP_SIGNAL_SERVICE_PROXY_UNAVAILABLE - Emitted whenever a service is not available any more. o $callback - The callback function for the certain signal. Typically, callback function takes on two parameters. The $proxy parameter's iden- tifier being the first, and the $arg second. o $arg - User data for $callback.RETURN VALUESReturns TRUE on success or FALSE on failure.EXAMPLESExample #1 Create new UPnP context and start browsing <?php function device_proxy_available_cb($proxy, $arg) { $info = gupnp_device_info_get($proxy); $type = $info['device_type']; $location = $info['location']; printf("Device available: "); printf("type: %s ", $type); printf("location: %s ", $location); } /* Create the UPnP context */ $context = gupnp_context_new(); if (!$context) { die("Error creating the GUPnP context "); } /* We're interested in everything */ $cp = gupnp_control_point_new($context, "ssdp:all"); gupnp_control_point_callback_set($cp, GUPNP_SIGNAL_DEVICE_PROXY_AVAILABLE, 'device_proxy_available_cb'); /* Start for browsing */ gupnp_control_point_browse_start($cp); ?>ERRORS/EXCEPTIONS Issues E_WARNING with not valid callback function.SEE ALSOgupnp_control_point_new(3), gupnp_control_point_browse_start(3). PHP Documentation Group GUPNP_CONTROL_POINT_CALLBACK_SET(3)
Related Man Pages |
---|
ddi_dma_alloc_handle(9f) - sunos |
call_user_func(3) - php |
call_user_func_array(3) - php |
eio_fstat(3) - php |
ddi_dma_alloc_handle(9f) - suse |
Similar Topics in the Unix Linux Community |
---|
GUPnP 0.3 (GUPnP Tools branch) |
GUPnP 0.1 (GUPnP A/V branch) |
UPnP-Inspector 0.1.7 (Default branch) |
UPnP-Inspector 0.2.0 (Default branch) |