gupnp_root_device_new

(PECL gupnp >= 0.1.0)
Create a new root device
resource gupnp_root_device_new ( resource $context, string $location, string $description_dir )

Create a new root device, automatically downloading and parsing location.

Parameters:
context

A context identifier, returned by gupnp_context_new().

location

Location of the description file for this device, relative to the HTTP root

Returns:

A root device identifier.

Examples:
Create new UPnP context and get device info service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
 
/* Create the UPnP context */
$context = gupnp_context_new();
 
if (!$context) {
 die("Error creating the GUPnP context\n");
}
 
/* Create root device */
$location "/BinaryLight1.xml";
$dev = gupnp_root_device_new($context$location);
 
?>
See also:

gupnp_root_device_set_available() -

gupnp_root_device_start() -

gupnp_root_device_stop() -

doc_php
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.