GUPnPRootDevice: GUPnP Reference Manual

## GUPnPRootDevice GUPnPRootDevice — Class for root device implementations. |

## Functions

GUPnPRootDevice * | gupnp_root_device_new ()
GUPnPRootDevice * | gupnp_root_device_new_full ()
void | gupnp_root_device_set_available ()
gboolean | gupnp_root_device_get_available ()
const char * | gupnp_root_device_get_description_document_name ()
const char * | gupnp_root_device_get_description_dir ()
const char * | gupnp_root_device_get_description_path ()
GSSDPResourceGroup * | gupnp_root_device_get_ssdp_resource_group ()

## Types and Values

| GUPnPRootDevice

## Description

GUPnPRootDevice allows for implementing root devices.

## Functions

### gupnp_root_device_new ()

    GUPnPRootDevice *
    gupnp_root_device_new (GUPnPContext *context,
                           const char *description_path,
                           const char *description_dir,
                           GError **error);

Create a new GUPnPRootDevice object, automatically loading and parsing device description document from `description_path` .

#### Parameters

context | The GUPnPContext |
description_path | Path to device description document. This could either be an absolute path or path relative to `description_dir` . |
description_dir | Path to directory where description documents are provided. |
error | The location for a GError to report issue with creation on or `NULL`. | [inout][optional][nullable]

#### Returns

A new `GUPnPRootDevice` object.

### gupnp_root_device_new_full ()

    GUPnPRootDevice *
    gupnp_root_device_new_full (GUPnPContext *context,
                                GUPnPResourceFactory *factory,
                                GUPnPXMLDoc *description_doc,
                                const char *description_path,
                                const char *description_dir,
                                GError **error);

Create a new GUPnPRootDevice, automatically loading and parsing device description document from `description_path` if `description_doc` is `NULL`.

#### Parameters

context | A GUPnPContext |
factory | A GUPnPResourceFactory |
description_doc | Device description document, or `NULL` |
description_path | Path to device description document. This could either be an absolute path or path relative to `description_dir` . |
description_dir | Path to directory where description documents are provided. |
error | The location for a GError to report issue with creation on or `NULL`. | [inout][optional][nullable]

#### Returns

A new GUPnPRootDevice object.

### gupnp_root_device_set_available ()

    void
    gupnp_root_device_set_available (GUPnPRootDevice *root_device,
                                     gboolean available);

Controls whether or not `root_device` is available (announcing its presence).

#### Parameters

root_device | A GUPnPRootDevice |
available | `TRUE` if `root_device` should be available |

### gupnp_root_device_get_available ()

    gboolean
    gupnp_root_device_get_available (GUPnPRootDevice *root_device);

Get whether or not `root_device` is available (announcing its presence).

#### Parameters

root_device | A GUPnPRootDevice |

#### Returns

`TRUE` if `root_device` is available, `FALSE` otherwise.

### gupnp_root_device_get_description_document_name ()

    const char *
    gupnp_root_device_get_description_document_name
                                   (GUPnPRootDevice *root_device);

Gets the name of the description document as hosted via HTTP.

#### Parameters

root_device | A GUPnPRootDevice |

#### Returns

The relative location of `root_device` .

### gupnp_root_device_get_description_dir ()

    const char *
    gupnp_root_device_get_description_dir (GUPnPRootDevice *root_device);

Get the path to the directory containing description documents related to `root_device` .

#### Parameters

root_device | A GUPnPRootDevice |

#### Returns

The path to description document directory of `root_device` .

### gupnp_root_device_get_description_path ()

    const char *
    gupnp_root_device_get_description_path
                                   (GUPnPRootDevice *root_device);

`gupnp_root_device_get_description_path` is deprecated and should not be used in newly-written code.

Get the path to the device description document of `root_device` .

#### Parameters

root_device | A GUPnPRootDevice |

#### Returns

The path to device description document of `root_device` .

### gupnp_root_device_get_ssdp_resource_group ()

    GSSDPResourceGroup *
    gupnp_root_device_get_ssdp_resource_group
                                   (GUPnPRootDevice *root_device);

Get the GSSDPResourceGroup used by `root_device` .

#### Parameters

root_device | A GUPnPRootDevice |

#### Returns

The GSSDPResourceGroup of `root_device` .

[transfer none]

Since: 0.20.0

## Types and Values

### GUPnPRootDevice

    typedef struct _GUPnPRootDevice GUPnPRootDevice;