39 #ifndef _PLT_ACTION_H_
40 #define _PLT_ACTION_H_
77 return m_ArgumentDescs;
84 const NPT_String&
GetName()
const {
return m_Name;}
97 NPT_Result
GetSCPDXML(NPT_XmlElementNode* node);
108 NPT_Array<PLT_ArgumentDesc*> m_ArgumentDescs;
219 NPT_Result
SetError(
unsigned int code,
const char* description);
226 const char*
GetError(
unsigned int* code = NULL);
254 NPT_OutputStream& stream);
264 PLT_Arguments m_Arguments;
265 unsigned int m_ErrorCode;
266 NPT_String m_ErrorDescription;
270 PLT_DeviceDataReference m_RootDevice;
273 typedef NPT_Reference<PLT_Action> PLT_ActionReference;
289 NPT_Result operator()(T*
const & data)
const {
290 return data->GetSCPDXML(m_Node);
294 NPT_XmlElementNode* m_Node;
312 bool operator()(
const PLT_ActionDesc*
const & action_desc)
const {
313 return action_desc->
GetName().Compare(m_Name,
true) ?
false :
true;
NPT_Result FormatSoapResponse(NPT_OutputStream &stream)
Called by a device when serializing a response to an action.
NPT_Result SetArgumentOutFromStateVariable(const char *name)
Set the output argument value from the associated current state variable value.
The PLT_Argument class provides a mechanism to set or verify the validity of a specific UPNP service ...
Definition: PltArgument.h:99
PLT_ActionDesc & GetActionDesc()
Return the action description.
Definition: PltAction.h:148
The PLT_ActionDesc class provides information about a UPnP Service given action.
Definition: PltAction.h:61
UPnP Service Action Argument.
NPT_Result SetError(unsigned int code, const char *description)
Set the error code and description in case of failure.
static NPT_Result FormatSoapError(unsigned int code, NPT_String desc, NPT_OutputStream &stream)
Helper method for a device to serialize an action invocation error.
const char * GetError(unsigned int *code=NULL)
Return the error description and code for the failed action.
PLT_Action(PLT_ActionDesc &action_desc)
Constructor.
The PLT_ArgumentDesc class provides information about a given argument of a UPnP Service given action...
Definition: PltArgument.h:64
UPnP Service.
Definition: PltService.h:67
PLT_ActionDesc(const char *name, PLT_Service *service)
Constructor.
unsigned int GetErrorCode()
Return the error code for the failed action.
NPT_Result VerifyArguments(bool input)
Verify that all required arguments are set.
PLT_ArgumentDesc * GetArgumentDesc(const char *name)
Look for an argument given a name.
NPT_Result VerifyArgumentValue(const char *name, const char *value)
Verify a value is valid for a given argument.
NPT_Result GetArgumentValue(const char *name, NPT_String &value)
Retrieve the string value of an argument given an argument name.
The PLT_GetSCPDXMLIterator class provides a recursive way to serialize an SCPD into an xml tree...
Definition: PltAction.h:283
NPT_Array< PLT_ArgumentDesc * > & GetArgumentDescs()
Return an array of arguments.
Definition: PltAction.h:76
The PLT_ActionDescNameFinder class provides a mechanism to find a PLT_ActionDesc given an action name...
Definition: PltAction.h:304
NPT_Result FormatSoapRequest(NPT_OutputStream &stream)
Called by a control point when serializing an action.
The PLT_Action class provides a mechanism to call or verify the validity of a specific UPNP service a...
Definition: PltAction.h:121
NPT_Result SetArgumentsOutFromStateVariable()
Set all the output argument values associated with state variables.
NPT_Result SetArgumentValue(const char *name, const char *value)
Set an argument value.
const NPT_String & GetName() const
Return the action name.
Definition: PltAction.h:84
NPT_Result GetSCPDXML(NPT_XmlElementNode *node)
Serialize action information to xml into an existing xml tree.
PLT_Service * GetService()
Return the service the action is associated with.