文字

gupnp_root_device_new

(PECL gupnp >= 0.1.0)

gupnp_root_device_newCreate 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.

参数

context

A context identifier, returned by gupnp_context_new() .

location

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

返回值

A root device identifier.

范例

Example #1 Create new UPnP context and get device info service

<?php


$context  gupnp_context_new ();

if (!
$context ) {
 die(
"Error creating the GUPnP context\n" );
}


$location  "/BinaryLight1.xml" ;
$dev  gupnp_root_device_new ( $context $location );

?>

参见

  • gupnp_root_device_set_available() - Set whether or not root_device is available
  • gupnp_root_device_start() - Start main loop
  • gupnp_root_device_stop() - Stop main loop
上一篇: 下一篇: