gupnp_root_device_new

Create a new root device

&reftitle.description; `resource` `gupnp_root_device_new` `resource` `context` `string` `location` `string` `description_dir`

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

&reftitle.parameters;

`context`

- A context identifier, returned by `gupnp_context_new`.

`location`

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

&reftitle.returnvalues;

A root device identifier.

&reftitle.examples;

### 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\n");
    }

    /* Create root device */
    $location = "/BinaryLight1.xml";
    $dev = gupnp_root_device_new($context, $location);

    ?>

&reftitle.seealso;

- `gupnp_root_device_set_available`
- `gupnp_root_device_start`
- `gupnp_root_device_stop`