Test API to operate the DLNA UPnP Device information

Overview

Definition of Test API for DLNA UPnP Device features. More…

// typedefs

typedef struct tapi_upnp_device_info tapi_upnp_device_info;
typedef struct tapi_upnp_devices tapi_upnp_devices;

// structs

struct tapi_upnp_device_info;

// global functions

SLIST_HEAD(tapi_upnp_devices, tapi_upnp_device_info);
const char* tapi_upnp_get_device_property(const tapi_upnp_device_info* device, te_upnp_device_property_idx property_idx);
static const char* tapi_upnp_get_device_udn(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_type(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_location(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_friendly_name(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_manufacturer(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_manufacturer_url(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_model_description(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_model_name(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_model_number(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_model_url(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_serial_number(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_upc(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_icon_url(const tapi_upnp_device_info* device);
static const char* tapi_upnp_get_device_presentation_url(const tapi_upnp_device_info* device);
te_errno tapi_upnp_get_device_info(rcf_rpc_server* rpcs, const char* name, tapi_upnp_devices* devices);
void tapi_upnp_free_device_info(tapi_upnp_devices* devices);
void tapi_upnp_print_device_info(const tapi_upnp_devices* devices);

Detailed Documentation

Definition of Test API for DLNA UPnP Device features.

Copyright (C) 2004-2022 OKTET Labs Ltd. All rights reserved.

Typedefs

typedef struct tapi_upnp_device_info tapi_upnp_device_info

A UPnP device parameters.

Global Functions

SLIST_HEAD(tapi_upnp_devices, tapi_upnp_device_info)

Head of the UPnP devices list.

const char* tapi_upnp_get_device_property(const tapi_upnp_device_info* device, te_upnp_device_property_idx property_idx)

Get a device property string value.

Parameters:

device

Device.

property_idx

Index of certain property in properties array.

Returns:

The string property value or NULL if the property is not found.

static const char* tapi_upnp_get_device_udn(const tapi_upnp_device_info* device)

Get Unique Device Name from the UPnP device properties.

Parameters:

device

Device.

Returns:

The Unique Device Name or NULL in case of missing property.

static const char* tapi_upnp_get_device_type(const tapi_upnp_device_info* device)

Get Device Type from the UPnP device properties.

Parameters:

device

Device.

Returns:

The Device Type or NULL in case of missing property.

static const char* tapi_upnp_get_device_location(const tapi_upnp_device_info* device)

Get Device Location from the UPnP device properties.

Parameters:

device

Device.

Returns:

The Device Location or NULL in case of missing property.

static const char* tapi_upnp_get_device_friendly_name(const tapi_upnp_device_info* device)

Get Device Friendly Name from the UPnP device properties.

Parameters:

device

Device.

Returns:

The friendly name of the device or NULL in case of missing property.

static const char* tapi_upnp_get_device_manufacturer(const tapi_upnp_device_info* device)

Get Device Manufacturer from the UPnP device properties.

Parameters:

device

Device.

Returns:

The manufacturer of the or NULL in case of missing property.

static const char* tapi_upnp_get_device_manufacturer_url(const tapi_upnp_device_info* device)

Get Device Manufacturer URL from the UPnP device properties.

Parameters:

device

Device.

Returns:

The manufacturer URL of the device or NULL in case of missing property.

static const char* tapi_upnp_get_device_model_description(const tapi_upnp_device_info* device)

Get Device Model Description from the UPnP device properties.

Parameters:

device

Device.

Returns:

The model description of the device or NULL in case of missing property.

static const char* tapi_upnp_get_device_model_name(const tapi_upnp_device_info* device)

Get Device Model Name from the UPnP device properties.

Parameters:

device

Device.

Returns:

The model name of the device or NULL in case of missing property.

static const char* tapi_upnp_get_device_model_number(const tapi_upnp_device_info* device)

Get Device Model Number from the UPnP device properties.

Parameters:

device

Device.

Returns:

The model number of the device or NULL in case of missing property.

static const char* tapi_upnp_get_device_model_url(const tapi_upnp_device_info* device)

Get Device Model URL from the UPnP device properties.

Parameters:

device

Device.

Returns:

The model URL of the device or NULL in case of missing property.

static const char* tapi_upnp_get_device_serial_number(const tapi_upnp_device_info* device)

Get Device Serial Number from the UPnP device properties.

Parameters:

device

Device.

Returns:

The serial number of the device or NULL in case of missing property.

static const char* tapi_upnp_get_device_upc(const tapi_upnp_device_info* device)

Get Device Universal Product Code from the UPnP device properties.

Parameters:

device

Device.

Returns:

The Universal Product Code of the device or NULL in case of missing property.

static const char* tapi_upnp_get_device_icon_url(const tapi_upnp_device_info* device)

Get Device Icon URL from the UPnP device properties.

Parameters:

device

Device.

Returns:

The icon URL of the device or NULL in case of missing property.

static const char* tapi_upnp_get_device_presentation_url(const tapi_upnp_device_info* device)

Get Device Presentation URL from the UPnP device properties.

Parameters:

device

Device.

Returns:

The presentation URL of the device or NULL in case of missing property.

te_errno tapi_upnp_get_device_info(rcf_rpc_server* rpcs, const char* name, tapi_upnp_devices* devices)

Retrieve an information about the UPnP device. Note, devices should be freed with tapi_upnp_free_device_info when it is no longer needed.

Parameters:

rpcs

RPC server handle.

name

Device name. Can be NULL or zero-length string to get the all found devices.

devices

Devices context list.

Returns:

Status code. On success, 0.

See also:

tapi_upnp_free_device_info

void tapi_upnp_free_device_info(tapi_upnp_devices* devices)

Empty the list of UPnP devices (free allocated memory) which was obtained with tapi_upnp_get_device_info.

Parameters:

devices

List of devices.

See also:

tapi_upnp_get_device_info

void tapi_upnp_print_device_info(const tapi_upnp_devices* devices)

Print UPnP devices context using RING function. This function should be used for debugging purpose.

Parameters:

devices

Devices context list.