Poco::UPnP::ServiceDesc

class StateVariable

Library: UPnP/ServiceDesc
Package: ServiceDesc
Header: Poco/UPnP/ServiceDesc/StateVariable.h

Description

This class represents a state variable in a UPnP service description.

Inheritance

Direct Base Classes: Poco::RefCountedObject

All Base Classes: Poco::RefCountedObject

Member Summary

Member Functions: cppType, defaultValue, enableEvents, name, optional, sendEvents, setCppType, setDefaultValue, setName, setOptional, setType, setValueRestriction, type, valueRestriction

Inherited Functions: duplicate, referenceCount, release

Types

Ptr

typedef Poco::AutoPtr < StateVariable > Ptr;

Constructors

StateVariable

StateVariable();

Creates the StateVariable.

Destructor

~StateVariable virtual

~StateVariable();

Destroys the StateVariable.

Member Functions

cppType inline

const std::string & cppType() const;

Returns the C++ type of this variable.

defaultValue inline

const std::string & defaultValue() const;

Returns the default value of this variable, or an empty string if no default value is defined.

name inline

const std::string & name() const;

Returns the name of this variable, UTF-8 encoded.

optional inline

bool optional() const;

Returns true if the variable is optional, or false otherwise.

sendEvents inline

bool sendEvents() const;

Returns true if eventing is enabled for this state variable.

type inline

const std::string & type() const;

Returns the UPnP type of this variable.

The following types are defined in the UPnP Device Architecture document:

valueRestriction inline

const Restriction & valueRestriction() const;

Returns the restriction for this variable.

enableEvents protected inline

void enableEvents(
    bool enable
);

Enable or disable eventing for this variable.

setCppType protected inline

void setCppType(
    const std::string & type
);

Sets the C++ type of this variable.

setDefaultValue protected inline

void setDefaultValue(
    const std::string & value
);

Sets the default value for this variable.

setName protected inline

void setName(
    const std::string & name
);

Sets the name of the variable.

setOptional protected inline

void setOptional(
    bool optional
);

Sets the optional flag of this variable.

setType protected inline

void setType(
    const std::string & type
);

Sets the data type of this variable.

setValueRestriction protected inline

void setValueRestriction(
    Restriction::Ptr pRestriction
);

Sets a restriction for this variable.