gupnp_control_point_browse_start(3) [php man page]
GUPNP_CONTROL_POINT_BROWSE_START(3) 1 GUPNP_CONTROL_POINT_BROWSE_START(3)gupnp_control_point_browse_start - Start browsingSYNOPSIS
bool gupnp_control_point_browse_start (resource $cpoint)
DESCRIPTION
Start the search and calls user-defined callback.
PARAMETERS
o $cpoint
- A control point identifier, returned by gupnp_control_point_new(3).
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);
?>
SEE ALSO gupnp_control_point_new(3), gupnp_control_point_browse_stop(3).
PHP Documentation Group GUPNP_CONTROL_POINT_BROWSE_START(3)
Check Out this Related Man Page
GUPNP_DEVICE_INFO_GET_SERVICE(3) 1 GUPNP_DEVICE_INFO_GET_SERVICE(3)gupnp_device_info_get_service - Get the service with typeSYNOPSIS
resource gupnp_device_info_get_service (resource $root_device, string $type)
DESCRIPTION
Get the service with type or false if no such device was found.
PARAMETERS
o $root_device
- A root device identifier, returned by gupnp_root_device_new(3).
o $type
- The type of the service to be retrieved.
RETURN VALUES
A service identifier.
EXAMPLES
Example #1
Create new UPnP context and get device info service
<?php
/* Create the UPnP context */
$context = gupnp_context_new();
if (!$context) {
die("Error creating the GUPnP context
");
}
/* Create root device */
$location = "/BinaryLight1.xml";
$dev = gupnp_root_device_new($context, $location);
/* Set root device is available */
gupnp_root_device_set_available($dev, true);
/* Get the switch service from the root device */
$service_type = "urn:schemas-upnp-org:service:SwitchPower:1";
$service = gupnp_device_info_get_service($dev, $service_type);
if (!$service) {
die("Cannot get SwitchPower1 service
");
}
?>
PHP Documentation Group GUPNP_DEVICE_INFO_GET_SERVICE(3)
Hello!
Will someone out there pls help in clearifying what is really wrong with my system. I use window 98 as my operating system. I am connected to a proxy server for browsing the net. Whenever l am listening to music online l have the problem of intermitted break in which the playing will... (10 Replies)
Hello All,
I am interested in finding out information on where would I begin my quest to become a programmer. I am a 85% - 95% mac user and have somewhat of a technical background. I would like to develope programs for macs.
Any help would be appreciated.
Thanks in advance.
Tnecius (1 Reply)
Dear Administrators and Moderators,
Normally I use Windows for browsing net, but few days back my pc was affected with virus.
One of my friend suggested me to use Linux for safe browsing.
I would like to know
1. I have Mandrake 8.2(HDD) and Obuntu 9.x(CD) - which one is better (have limited... (1 Reply)
Hello,
I have been browsing through the forum, but unable to find a solution for my requirement.
I need to go through a file and search for /home/users and insert a # symbol at the start /home/users. Example output is #/home/users.
Can you please help me with the awk or sed command for... (1 Reply)