mi::nservices::ICommand_request Class Reference
[Commands]
Description
A request to execute a web service command. see Commands for information on how commands can execute other commands.
Public Member Functions
- virtual const IData* get_argument( const char* name) const =0
- Gets the value for argument called name. More...
- template< class T>const T* get_argument( const char* name) const
- Gets the value for argument called name. More...
- virtual Sint32 get_argument( Uint32 index, const char** name, const IData** value) const =0
- Gets the argument name and value at index. More...
- virtual IMap* get_attachments() const =0
- retrieves the attachment object for this command request More...
- virtual const char* get_command_name() const =0
- the name of the command to be executed More...
- virtual Uint32 get_num_arguments() const =0
- the number of arguments to the command More...
- virtual Sint32 set_argument( const char* name, const IData* value) =0
- Sets an argument to the command. More...
- virtual void set_command_name( const char* command) =0
- Sets the name of the command to execute. More...
Member Functions
- virtual const IData* mi::nservices::ICommand_request::get_argument( const char* name) const [pure virtual]
-
Gets the value for argument called name. If returns NULL then this either indicates that the argument name does not exist or that it's value has been supplied as NULL. Currently you would need to use the iterative version of get_argument to distinguish the two conditions.
Parameters
- name
- the argument name.
Returns
the value.
-
template< class T>
const T* mi::nservices::ICommand_request::get_argument( const char* name) const [inline] -
Gets the value for argument called name. If returns NULL then this either indicates that the argument name does not exist or that it's value has been supplied as NULL. Currently you would need to use the iterative version of get_argument to distinguish the two conditions.
This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid&) on the returned pointer, since the return type already is a pointer to the type T specified as template parameter.
Parameters
- name
- the argument name
Returns
the value or NULL if the argument doesn't exists or is not of type T.
- virtual Sint32 mi::nservices::ICommand_request::get_argument( Uint32 index, const char** name, const IData** value) const [pure virtual]
-
Gets the argument name and value at index.
Parameters
- index
- the index of the argument, start at 0 and increment until returns false
- name
- receives the name of the argument
- value
- receives the value of the argument
Returns
- NRS_ERROR_NONE success, name and value contains the argument name and it's value.
- NRS_ERROR_NOT_FOUND index is greater than the number of supplied arguments.
- NRS_ERROR_FAILED general error
- virtual IMap* mi::nservices::ICommand_request::get_attachments() const [pure virtual]
-
retrieves the attachment object for this command request
Returns
An object with which to manipulate attachments
- virtual const char* mi::nservices::ICommand_request::get_command_name() const [pure virtual]
-
the name of the command to be executed
Returns
the command name
- virtual Uint32 mi::nservices::ICommand_request::get_num_arguments() const [pure virtual]
-
the number of arguments to the command
Returns
number of arguments
- virtual Sint32 mi::nservices::ICommand_request::set_argument( const char* name, const IData* value) [pure virtual]
-
Sets an argument to the command.
Parameters
- name
- the name of the argument
- value
- the argument's value, NULL is a valid value
Returns
- NRS_ERROR_NONE success.
- NRS_ERROR_INVALID_PARAMETERS name is NULL or an empty string.
- virtual void mi::nservices::ICommand_request::set_command_name( const char* command) [pure virtual]
-
Sets the name of the command to execute.
Parameters
- command
- the command name