gupnp_context_unhost_path
gupnp_control_point_browse_stop
Gupnp Funkcje
PHP Manual

# gupnp_control_point_browse_start

(PECL gupnp >= Unknown)

gupnp_control_point_browse_start — Start browsing

### Opis

bool gupnp_control_point_browse_start ( resource `$cpoint` )

Start the search and calls user-defined callback.

### Parametry

`cpoint`

  A control point identifier, returned by gupnp_control_point_new().

### Zwracane wartości

Zwraca `TRUE` w przypadku powodzenia, `FALSE` w przypadku błędu.

### Przykłady

Przykład #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:\n");
printf("type: %s\n", $type);
printf("location: %s\n", $location);
}
/* Create the UPnP context */
$context = gupnp_context_new();
if (!$context) {
die("Error creating the GUPnP context\n");
}
/* 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);
?>`

### Zobacz też:

- gupnp_control_point_new() - Create a new control point
- gupnp_control_point_browse_stop() - Stop browsing

gupnp_context_unhost_path
gupnp_control_point_browse_stop
Gupnp Funkcje
PHP Manual