Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gupnp_control_point_callback_set(3) [php man page]

GUPNP_CONTROL_POINT_CALLBACK_SET(3)					 1				       GUPNP_CONTROL_POINT_CALLBACK_SET(3)

gupnp_control_point_callback_set - Set control point callback

SYNOPSIS
bool gupnp_control_point_callback_set (resource $cpoint, int $signal, mixed $callback, [mixed $arg]) DESCRIPTION
Set control point callback function for signal. PARAMETERS
o $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 VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #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 ALSO
gupnp_control_point_new(3), gupnp_control_point_browse_start(3). PHP Documentation Group GUPNP_CONTROL_POINT_CALLBACK_SET(3)

Check Out this Related Man Page

GEARMANCLIENT(3)							 1							  GEARMANCLIENT(3)

The GearmanClient class

INTRODUCTION
Represents a class for connecting to a Gearman job server and making requests to perform some function on provided data. The function per- formed must be one registered by a Gearman worker and the data passed is opaque to the job server. CLASS SYNOPSIS
GearmanClient GearmanClient Methods o public bool GearmanClient::addOptions (int $options) o public bool GearmanClient::addServer ([string $host = 127.0.0.1], [int $port = 4730]) o public bool GearmanClient::addServers ([string $servers = 127.0.0.1:4730]) o public GearmanTask GearmanClient::addTask (string $function_name, string $workload, [mixed &$context], [string $unique]) o public GearmanTask GearmanClient::addTaskBackground (string $function_name, string $workload, [mixed &$context], [string $unique]) o public GearmanTask GearmanClient::addTaskHigh (string $function_name, string $workload, [mixed &$context], [string $unique]) o public GearmanTask GearmanClient::addTaskHighBackground (string $function_name, string $workload, [mixed &$context], [string $unique]) o public GearmanTask GearmanClient::addTaskLow (string $function_name, string $workload, [mixed &$context], [string $unique]) o public GearmanTask GearmanClient::addTaskLowBackground (string $function_name, string $workload, [mixed &$context], [string $unique]) o public GearmanTask GearmanClient::addTaskStatus (string $job_handle, [string &$context]) o public bool GearmanClient::clearCallbacks (void ) o public GearmanClient GearmanClient::clone (void ) o public GearmanClient::__construct (void ) o public string GearmanClient::context (void ) o public string GearmanClient::data (void ) o public string GearmanClient::do (string $function_name, string $workload, [string $unique]) o public string GearmanClient::doBackground (string $function_name, string $workload, [string $unique]) o public string GearmanClient::doHigh (string $function_name, string $workload, [string $unique]) o public string GearmanClient::doHighBackground (string $function_name, string $workload, [string $unique]) o public string GearmanClient::doJobHandle (void ) o public string GearmanClient::doLow (string $function_name, string $workload, [string $unique]) o public string GearmanClient::doLowBackground (string $function_name, string $workload, [string $unique]) o public string GearmanClient::doNormal (string $function_name, string $workload, [string $unique]) o public array GearmanClient::doStatus (void ) o public bool GearmanClient::echo (string $workload) o public string GearmanClient::error (void ) o public int GearmanClient::getErrno (void ) o public array GearmanClient::jobStatus (string $job_handle) o public bool GearmanClient::ping (string $workload) o public bool GearmanClient::removeOptions (int $options) o public int GearmanClient::returnCode (void ) o public bool GearmanClient::runTasks (void ) o public void GearmanClient::setClientCallback (callable $callback) o public bool GearmanClient::setCompleteCallback (callable $callback) o public bool GearmanClient::setContext (string $context) o public bool GearmanClient::setCreatedCallback (string $callback) o public bool GearmanClient::setData (string $data) o public bool GearmanClient::setDataCallback (callable $callback) o public bool GearmanClient::setExceptionCallback (callable $callback) o public bool GearmanClient::setFailCallback (callable $callback) o public bool GearmanClient::setOptions (int $options) o public bool GearmanClient::setStatusCallback (callable $callback) o public bool GearmanClient::setTimeout (int $timeout) o public bool GearmanClient::setWarningCallback (callable $callback) o public bool GearmanClient::setWorkloadCallback (callable $callback) o public int GearmanClient::timeout (void ) PHP Documentation Group GEARMANCLIENT(3)
Man Page