39 #ifndef _PLT_STATE_VARIABLE_H_
40 #define _PLT_STATE_VARIABLE_H_
85 NPT_Result
GetSCPDXML(NPT_XmlElementNode* node);
111 NPT_Result
SetRate(NPT_TimeInterval rate);
119 NPT_Result
SetValue(
const char* value);
138 const NPT_String&
GetName()
const {
return m_Name; }
144 const NPT_String&
GetValue()
const {
return m_Value; }
178 NPT_Result
Serialize(NPT_XmlElementNode& node);
188 NPT_String m_DataType;
189 NPT_String m_DefaultValue;
190 bool m_IsSendingEvents;
191 bool m_IsSendingEventsIndirectly;
192 NPT_TimeInterval m_Rate;
193 NPT_TimeStamp m_LastEvent;
194 NPT_Array<NPT_String*> m_AllowedValues;
197 NPT_Map<NPT_String,NPT_String> m_ExtraAttributes;
215 return state_variable->
GetName().Compare(m_Name,
true) ?
false :
true;
const NPT_AllowedValueRange * GetAllowedValueRange() const
Return the state variable allowed value range if any.
Definition: PltStateVariable.h:156
The PLT_Argument class provides a mechanism to set or verify the validity of a specific UPNP service ...
Definition: PltArgument.h:99
bool IsReadyToPublish()
Return whether the state variable value changed and subscribers need to be notified.
The PLT_LastChangeXMLIterator class is used to serialize the LastChange variable changes into xml giv...
Definition: PltService.h:508
const NPT_String & GetName() const
Return the state variable name.
Definition: PltStateVariable.h:138
UPnP Service.
Definition: PltService.h:67
The PLT_StateVariableNameFinder class returns the PLT_StateVariable instance given a state variable n...
Definition: PltStateVariable.h:207
The PLT_StateVariable class maintains the state of a UPnP Service state variable. ...
Definition: PltStateVariable.h:75
bool IsSendingEvents(bool indirectly=false)
Return whether the state variable is eventable directly or indirectly.
const NPT_String & GetDataType() const
Return the state variable data type.
Definition: PltStateVariable.h:150
static PLT_StateVariable * Find(NPT_List< PLT_StateVariable * > &vars, const char *name)
Helper function to return a state variable given a list of state variables and a state variable name...
NPT_Result ValidateValue(const char *value)
Validate the new value of the state variable.
PLT_Service * GetService()
Return the PLT_Service that this state variable is associated with.
NPT_Result SetValue(const char *value)
Set the state variable value.
The NPT_AllowedValueRange struct holds the min, max and step value allowed of a UPnP Service state va...
Definition: PltStateVariable.h:60
NPT_Result SetRate(NPT_TimeInterval rate)
Certain state variables notifications must not be sent faster than a certain rate according to the UP...
NPT_Result Serialize(NPT_XmlElementNode &node)
Serialize the state variable into xml.
const NPT_String & GetValue() const
Return the current state variable value.
Definition: PltStateVariable.h:144
NPT_Result GetSCPDXML(NPT_XmlElementNode *node)
Populate the SCPD xml document with state variable information.
void DisableIndirectEventing()
Force the state variable to send events directly.
NPT_Result SetExtraAttribute(const char *name, const char *value)
Certain state variables require extra xml attributes when serialized.