Poco::UPnP

class UniqueServiceName

Library: UPnP
Package: Core
Header: Poco/UPnP/UniqueServiceName.h

Description

This class represents a UPnP Unique Service Name (USN), which is used to uniquely identify UPnP devices and services.

A USN consists of one or two URNs, the first one being a UUID URN, the second one a device or service name. The two URNs are separated by two colons.

Examples for valid USNs are:

  • uuid:C809DE34-C1F8-48A6-81B9-3450E560137D
  • uuid:C809DE34-C1F8-48A6-81B9-3450E560137D::upnp:rootdevice
  • uuid:C809DE34-C1F8-48A6-81B9-3450E560137D::urn:schemas-upnp-org:service:RenderingControl:2

This class is mostly intended for splitting USNs into their two parts, or creating USNs from their parts.

Member Summary

Member Functions: toString, urn, uuid

Constructors

UniqueServiceName

UniqueServiceName();

Creates an empty UniqueServiceName.

UniqueServiceName

explicit UniqueServiceName(
    const std::string & usn
);

Creates the UniqueServiceName from a string.

UniqueServiceName

explicit UniqueServiceName(
    const Poco::UUID & uuid
);

Creates an UniqueServiceName for the given UUID.

UniqueServiceName

UniqueServiceName(
    const Poco::UUID & uuid,
    const URN & urn
);

Creates the UniqueServiceName for the given UUID and URN.

UniqueServiceName

UniqueServiceName(
    const std::string & uuid,
    const URN & urn
);

Creates the UniqueServiceName for the given UUID and URN.

UniqueServiceName

UniqueServiceName(
    const URN & uuid,
    const URN & urn
);

Creates the UniqueServiceName for the given UUID and URN. The uuid URN must be of type URN_UUID.

Destructor

~UniqueServiceName

~UniqueServiceName();

Destroys the UniqueServiceName.

Member Functions

toString

std::string toString() const;

Returns the UniqueServiceName as string.

urn inline

const URN & urn() const;

Returns the urn part of the UniqueServiceName

uuid inline

const std::string & uuid() const;

Returns the UUID part of the UniqueServiceName.

Securely control IoT edge devices from anywhere   Connect a Device