#include <iodata.h>
This is an abstraction of the IO Data specification XEP-0244.
This abstraction can be used to implement IO Data on top of Data Forms.
XEP version: 0.1
- Author
- Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
- Since
- 1.0.13
Definition at line 36 of file iodata.h.
The IO Data transaction types.
Enumerator |
---|
TypeInput |
To request the schemata of input and output.
|
TypeGetStatus |
To submit the input.
|
TypeGetOutput |
To request the status of the procedure.
|
TypeIoSchemataResult |
To request the output.
|
TypeOutput |
To return the schemata of input and output.
|
TypeError |
To submit the output.
|
TypeStatus |
To submit additional error information.
|
TypeInvalid |
To indicate the current status of the procedure. Invalid type.
|
Definition at line 42 of file iodata.h.
Constructs a new IO Data object of the given type.
- Parameters
-
type | The transaction type. |
Definition at line 37 of file iodata.cpp.
Constructs a new IO Data object by parsing the given Tag.
- Parameters
-
tag | The Tag to parse. This should be a <iodata> tag with the correct namespace and child elements. |
Definition at line 47 of file iodata.cpp.
const std::string& desc |
( |
| ) |
const |
|
inline |
Returns the schema description, if any. Usually only valid if transaction type is io-schema-result
.
- Returns
- The schema description.
Definition at line 146 of file iodata.h.
const Tag* error |
( |
| ) |
const |
|
inline |
Returns the 'error' tag, if the transaction type is either error
or io-schemata-result
.
- Returns
- The 'error' tag, including the encapsulating <error>.
- Note
- The IOData instance will still own the tag and delete it. Clone it if you need it later.
Definition at line 125 of file iodata.h.
virtual const std::string& filterString |
( |
| ) |
const |
|
inlinevirtual |
Returns an XPath expression that describes a path to child elements of a stanza that an extension handles.
- Returns
- The extension's filter string.
Implements StanzaExtension.
Definition at line 167 of file iodata.h.
Returns the 'input' tag, if the transaction type is either input
or io-schemata-result
.
- Returns
- The 'input' tag, including the encapsulating <in>.
- Note
- The IOData instance will still own the tag and delete it. Clone it if you need it later.
Definition at line 93 of file iodata.h.
Returns a new Instance of the derived type. Usually, for a derived class FooExtension, the implementation of this function looks like:
{
return new FooExtension( tag );
}
- Returns
- The derived extension's new instance.
Implements StanzaExtension.
Definition at line 170 of file iodata.h.
Returns the 'output' tag, if the transaction type is either output
or io-schemata-result
.
- Returns
- The 'output' tag, including the encapsulating <out>.
- Note
- The IOData instance will still own the tag and delete it. Clone it if you need it later.
Definition at line 109 of file iodata.h.
void setDesc |
( |
const std::string & |
desc | ) |
|
|
inline |
Sets the Schema description. Only used/valid if type is io-schemata-result
.
- Parameters
-
desc | The schema description. |
Definition at line 140 of file iodata.h.
void setError |
( |
Tag * |
error | ) |
|
Sets the 'error' tag. If an 'error' tag was previosuly set, it is deleted before the new one is set. Alternatively, if your error consists of more than one element, you can embed these into an <error> tag with no namespace.
- Parameters
-
- Note
- The
error
tag will be owned by this IOData instance. Clone it if you need it somewhere else.
Definition at line 223 of file iodata.cpp.
Sets the 'input' tag. If an 'input' tag was previosuly set, it is deleted before the new one is set. Alternatively, if your input consists of more than one element, you can embed these into an <in> tag with no namespace.
- Parameters
-
- Note
- The
in
tag will be owned by this IOData instance. Clone it if you need it somewhere else.
Definition at line 191 of file iodata.cpp.
Sets the 'output' tag. If an 'output' tag was previosuly set, it is deleted before the new one is set. Alternatively, if your output consists of more than one element, you can embed these into an <out> tag with no namespace.
- Parameters
-
- Note
- The
out
tag will be owned by this IOData instance. Clone it if you need it somewhere else.
Definition at line 207 of file iodata.cpp.
void setStatus |
( |
Status |
status | ) |
|
|
inline |
Sets the status of the procedure. Only used/valid if transaction type is status
.
- Parameters
-
status | The status of the procedure. |
Definition at line 152 of file iodata.h.
Returns the status of the procedure. Only used/valid if transaction type is status
.
- Returns
- The status of the procedure.
Definition at line 158 of file iodata.h.
Returns the IO Data object's type.
- Returns
- The IO Data object's type.
Definition at line 86 of file iodata.h.
The documentation for this class was generated from the following files: