## GUPnPDeviceInfo GUPnPDeviceInfo — Base abstract class for querying device information. |

## Functions

GUPnPResourceFactory * | gupnp_device_info_get_resource_factory ()
GUPnPContext * | gupnp_device_info_get_context ()
const char * | gupnp_device_info_get_location ()
const SoupURI * | gupnp_device_info_get_url_base ()
const char * | gupnp_device_info_get_udn ()
const char * | gupnp_device_info_get_device_type ()
char * | gupnp_device_info_get_friendly_name ()
char * | gupnp_device_info_get_manufacturer ()
char * | gupnp_device_info_get_manufacturer_url ()
char * | gupnp_device_info_get_model_description ()
char * | gupnp_device_info_get_model_name ()
char * | gupnp_device_info_get_model_number ()
char * | gupnp_device_info_get_model_url ()
char * | gupnp_device_info_get_serial_number ()
char * | gupnp_device_info_get_presentation_url ()
char * | gupnp_device_info_get_upc ()
char * | gupnp_device_info_get_icon_url ()
GList * | gupnp_device_info_list_dlna_capabilities ()
GList * | gupnp_device_info_list_dlna_device_class_identifier ()
char * | gupnp_device_info_get_description_value ()
GList * | gupnp_device_info_list_devices ()
GList * | gupnp_device_info_list_device_types ()
GUPnPDeviceInfo * | gupnp_device_info_get_device ()
GList * | gupnp_device_info_list_services ()
GList * | gupnp_device_info_list_service_types ()
GUPnPServiceInfo * | gupnp_device_info_get_service ()

## Types and Values

| GUPnPDeviceInfo

## Description

The GUPnPDeviceInfo base abstract class provides methods for querying device information.

## Functions

### gupnp_device_info_get_resource_factory ()

    GUPnPResourceFactory *
    gupnp_device_info_get_resource_factory
                                   (GUPnPDeviceInfo *device_info);

Get the GUPnPResourceFactory used by the `device_info` .

#### Parameters

device_info | A GUPnPDeviceInfo |

#### Returns

A GUPnPResourceFactory.

[transfer none]

### gupnp_device_info_get_context ()

    GUPnPContext *
    gupnp_device_info_get_context (GUPnPDeviceInfo *info);

Get the associated GUPnPContext.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A GUPnPContext.

[transfer none]

### gupnp_device_info_get_location ()

    const char *
    gupnp_device_info_get_location (GUPnPDeviceInfo *info);

Get the location of the device description file.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A constant string.

### gupnp_device_info_get_url_base ()

    const SoupURI *
    gupnp_device_info_get_url_base (GUPnPDeviceInfo *info);

Get the URL base of this device.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A SoupURI.

### gupnp_device_info_get_udn ()

    const char *
    gupnp_device_info_get_udn (GUPnPDeviceInfo *info);

Get the Unique Device Name of the device.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A constant string.

### gupnp_device_info_get_device_type ()

    const char *
    gupnp_device_info_get_device_type (GUPnPDeviceInfo *info);

Get the UPnP device type.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A constant string, or `NULL`.

### gupnp_device_info_get_friendly_name ()

    char *
    gupnp_device_info_get_friendly_name (GUPnPDeviceInfo *info);

Get the friendly name of the device.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A string, or `NULL`. `g_free()` after use.

### gupnp_device_info_get_manufacturer ()

    char *
    gupnp_device_info_get_manufacturer (GUPnPDeviceInfo *info);

Get the manufacturer of the device.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A string, or `NULL`. `g_free()` after use.

[nullable][transfer full]

### gupnp_device_info_get_manufacturer_url ()

    char *
    gupnp_device_info_get_manufacturer_url
                                   (GUPnPDeviceInfo *info);

Get an URL pointing to the manufacturer's website.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A string, or `NULL`. `g_free()` after use.

[nullable][transfer full]

### gupnp_device_info_get_model_description ()

    char *
    gupnp_device_info_get_model_description
                                   (GUPnPDeviceInfo *info);

Get the description of the device model.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A string, or `NULL`. `g_free()` after use.

[nullable][transfer full]

### gupnp_device_info_get_model_name ()

    char *
    gupnp_device_info_get_model_name (GUPnPDeviceInfo *info);

Get the model name of the device.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A string, or `NULL`. `g_free()` after use.

[nullable][transfer full]

### gupnp_device_info_get_model_number ()

    char *
    gupnp_device_info_get_model_number (GUPnPDeviceInfo *info);

Get the model number of the device.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A string, or `NULL`. `g_free()` after use.

[nullable][transfer full]

### gupnp_device_info_get_model_url ()

    char *
    gupnp_device_info_get_model_url (GUPnPDeviceInfo *info);

Get an URL pointing to the device model's website.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A string, or `NULL`. `g_free()` after use.

[nullable][transfer full]

### gupnp_device_info_get_serial_number ()

    char *
    gupnp_device_info_get_serial_number (GUPnPDeviceInfo *info);

Get the serial number of the device.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A string, or `NULL`. `g_free()` after use.

[nullable][transfer full]

### gupnp_device_info_get_presentation_url ()

    char *
    gupnp_device_info_get_presentation_url
                                   (GUPnPDeviceInfo *info);

Get an URL pointing to the device's presentation page, for web-based administration.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A string, or `NULL`. `g_free()` after use.

[nullable][transfer full]

### gupnp_device_info_get_upc ()

    char *
    gupnp_device_info_get_upc (GUPnPDeviceInfo *info);

Get the Universal Product Code of the device.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A string, or `NULL`. `g_free()` after use.

[nullable][transfer full]

### gupnp_device_info_get_icon_url ()

    char *
    gupnp_device_info_get_icon_url (GUPnPDeviceInfo *info,
                                    const char *requested_mime_type,
                                    int requested_depth,
                                    int requested_width,
                                    int requested_height,
                                    gboolean prefer_bigger,
                                    char **mime_type,
                                    int *depth,
                                    int *width,
                                    int *height);

Get an URL pointing to the icon most closely matching the given criteria, or `NULL`. If `requested_mime_type` is set, only icons with this mime type will be returned. If `requested_depth` is set, only icons with this or lower depth will be returned. If `requested_width` and/or `requested_height` are set, only icons that are this size or smaller are returned, unless `prefer_bigger` is set, in which case the next biggest icon will be returned. The returned strings should be freed.

#### Parameters

info | A GUPnPDeviceInfo |
requested_mime_type | The requested file format, or `NULL` for any. | [nullable][transfer none]
requested_depth | The requested color depth, or -1 for any |
requested_width | The requested width, or -1 for any |
requested_height | The requested height, or -1 for any |
prefer_bigger | `TRUE` if a bigger, rather than a smaller icon should be returned if no exact match could be found |
mime_type | The location where to store the the format of the returned icon, or `NULL`. The returned string should be freed after use. | [out][optional]
depth | The location where to store the depth of the returned icon, or `NULL`. | [out][optional]
width | The location where to store the width of the returned icon, or `NULL`. | [out][optional]
height | The location where to store the height of the returned icon, or `NULL`. | [out][optional]

#### Returns

a string, or `NULL`. `g_free()` after use.

[nullable][transfer full]

### gupnp_device_info_list_dlna_capabilities ()

    GList *
    gupnp_device_info_list_dlna_capabilities
                                   (GUPnPDeviceInfo *info);

Get a GList of strings that represent the device capabilities as announced in the device description file using the <dlna:X_DLNACAP> element.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

a GList of newly allocated strings or `NULL` if the device description doesn't contain the <dlna:X_DLNACAP> element.

[nullable][transfer full][element-type utf8]

Since: 0.14.0

### gupnp_device_info_list_dlna_device_class_identifier ()

    GList *
    gupnp_device_info_list_dlna_device_class_identifier
                                   (GUPnPDeviceInfo *info);

Get a GList of strings that represent the device class and version as announced in the device description file using the <dlna:X_DLNADOC> element.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

a GList of newly allocated strings or `NULL` if the device description doesn't contain the <dlna:X_DLNADOC> element.

[nullable][transfer full][element-type utf8]

Since: 0.20.4

### gupnp_device_info_get_description_value ()

    char *
    gupnp_device_info_get_description_value
                                   (GUPnPDeviceInfo *info,
                                    const char *element);

This function provides generic access to the contents of arbitrary elements in the device description file.

#### Parameters

info | A GUPnPDeviceInfo |
element | Name of the description element to retrieve |

#### Returns

a newly allocated string or `NULL` if the device description doesn't contain the given `element` .

[nullable][transfer full]

Since: 0.14.0

### gupnp_device_info_list_devices ()

    GList *
    gupnp_device_info_list_devices (GUPnPDeviceInfo *info);

Get a GList of new objects implementing GUPnPDeviceInfo representing the devices directly contained in `info` . The returned list should be `g_list_free()`'d and the elements should be `g_object_unref()`'d.

Note that devices are not cached internally, so that every time you call this function new objects are created. The application must cache any used devices if it wishes to keep them around and re-use them.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

a GList of new GUPnPDeviceInfo objects.

[nullable][element-type GUPnP.DeviceInfo][transfer full]

### gupnp_device_info_list_device_types ()

    GList *
    gupnp_device_info_list_device_types (GUPnPDeviceInfo *info);

Get a GList of strings representing the types of the devices directly contained in `info` .

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A GList of strings. The elements should be `g_free()`'d and the list should be `g_list_free()`'d.

[nullable][element-type utf8][transfer full]

### gupnp_device_info_get_device ()

    GUPnPDeviceInfo *
    gupnp_device_info_get_device (GUPnPDeviceInfo *info,
                                  const char *type);

Get the service with type `type` directly contained in `info` as a new object implementing GUPnPDeviceInfo, or `NULL` if no such device was found. The returned object should be unreffed when done.

Note that devices are not cached internally, so that every time you call this function a new object is created. The application must cache any used devices if it wishes to keep them around and re-use them.

#### Parameters

info | A GUPnPDeviceInfo |
type | The type of the device to be retrieved. |

#### Returns

A new GUPnPDeviceInfo.

[transfer full][nullable]

### gupnp_device_info_list_services ()

    GList *
    gupnp_device_info_list_services (GUPnPDeviceInfo *info);

Get a GList of new objects implementing GUPnPServiceInfo representing the services directly contained in `info` . The returned list should be `g_list_free()`'d and the elements should be `g_object_unref()`'d.

Note that services are not cached internally, so that every time you call function new objects are created. The application must cache any used services if it wishes to keep them around and re-use them.

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

(nullable)(element-type GUPnP.ServiceInfo) (transfer full) : A GList of new GUPnPServiceInfo objects.

### gupnp_device_info_list_service_types ()

    GList *
    gupnp_device_info_list_service_types (GUPnPDeviceInfo *info);

Get a GList of strings representing the types of the services directly contained in `info` .

#### Parameters

info | A GUPnPDeviceInfo |

#### Returns

A GList of strings. The elements should be `g_free()`'d and the list should be `g_list_free()`'d.

[nullable][element-type utf8][transfer full]

### gupnp_device_info_get_service ()

    GUPnPServiceInfo *
    gupnp_device_info_get_service (GUPnPDeviceInfo *info,
                                   const char *type);

Get the service with type `type` directly contained in `info` as a new object implementing GUPnPServiceInfo, or `NULL` if no such device was found. The returned object should be unreffed when done.

Note that services are not cached internally, so that every time you call this function a new object is created. The application must cache any used services if it wishes to keep them around and re-use them.

#### Parameters

info | A GUPnPDeviceInfo |
type | The type of the service to be retrieved. |

#### Returns

A GUPnPServiceInfo.

[nullable][transfer full]

## Types and Values

### GUPnPDeviceInfo

    typedef struct _GUPnPDeviceInfo GUPnPDeviceInfo;