Public Member Functions | Friends | Related Functions

# HActionInfo Class Reference
[Common]

This class is used to contain information of a UPnP action found in a UPnP service description document. More...

`#include <HActionInfo>`

List of all members.

## Public Member Functions
| HActionInfo ()
| HActionInfo (const QString &name, HInclusionRequirement incReq=InclusionMandatory, QString *err=0)
| HActionInfo (const QString &name, const HActionArguments &inputArguments, const HActionArguments &outputArguments, bool hasRetVal, HInclusionRequirement incReq=InclusionMandatory, QString *err=0)
| HActionInfo (const HActionInfo &other)
| ~HActionInfo ()
HActionInfo & | operator= (const HActionInfo &other)
QString | name () const
const HActionArguments & | inputArguments () const
const HActionArguments & | outputArguments () const
QString | returnArgumentName () const
HInclusionRequirement | inclusionRequirement () const
bool | isValid () const
## Friends
H_UPNP_CORE_EXPORT bool | operator== (const HActionInfo &, const HActionInfo &)
## Related Functions
(Note that these are not member functions.)
H_UPNP_CORE_EXPORT bool | operator!= (const HActionInfo &, const HActionInfo &)
H_UPNP_CORE_EXPORT quint32 | qHash (const HActionInfo &key)

## Detailed Description

UPnP service description documents specify the actions and state variables of the service. An instance of this class contain the information of an action found in a service description document:

- name() returns the name of the action.
- inputArguments() return the arguments that has to be provided to the action when it is invoked.
- outputArguments() return the arguments the action will provide after a successful action invocation.
- returnArgumentName() identifies the output argument that has been designated as the return value. Note that this may not be defined.

In addition to the information found in the service description document, the HService containing the HAction that is depicted by the HActionInfo object may have specified additional information about the action. Currently only inclusionRequirement() is available and it details whether the action is considered as mandatory or optional.

Remarks:
  this class is not thread-safe.

See also:
  HAction, HDeviceInfo, HServiceInfo and HStateVariableInfo.

## Constructor & Destructor Documentation

HActionInfo | ( |  | ) |

Creates a new, invalid instance.

See also:
  isValid()

HActionInfo | ( | const QString & | name,
|  | HInclusionRequirement | incReq = `InclusionMandatory`,
|  | QString * | err = `0` |
| ) |  |  |

Creates a new instance.

Parameters:

  | name | specifies the name of the action.
  | incReq | specifies whether the action is required by the containing service.
  | err | specifies a pointer to a `QString`, which contains an error description in case the construction failed. This parameter is optional.

See also:
  isValid()

HActionInfo | ( | const QString & | name,
|  | const HActionArguments & | inputArguments,
|  | const HActionArguments & | outputArguments,
|  | bool | hasRetVal,
|  | HInclusionRequirement | incReq = `InclusionMandatory`,
|  | QString * | err = `0` |
| ) |  |  |

Creates a new instance.

Parameters:

  | name | specifies the name of the action.
  | inputArguments | specifies the input arguments of the action. These are the arguments the user has to provide when the action is invoked.
  | outputArguments | specifies the output arguments of the action. These are the arguments the action will "return" when the action invocation is successfully completed.
  | hasRetVal | specifies whether the action has a return value. If this is true the first element of the `outputArguments` is considered as the return value. Note also that if this is true the `outputArguments` cannot be empty.
  | incReq | specifies whether the action is required or optional.
  | err | specifies a pointer to a `QString`, which contains an error description in case the construction failed. This parameter is optional.

See also:
  isValid()

HActionInfo | ( | const HActionInfo & | other | ) |

Copies the contents of the other to this.

Parameters:

  | other | specifies the object to be copied.

~HActionInfo | ( |  | ) |

Destroys the instance.

## Member Function Documentation

HActionInfo & operator= | ( | const HActionInfo & | other | ) |

Assigns the contents of the other to this.

Parameters:

  | other | specifies the object to be copied.

QString name | ( |  | ) | const

Returns the name of the action.

This is the name specified in the corresponding service description file.

Returns:
  the name of the action.

const HActionArguments & inputArguments | ( |  | ) | const

Returns the input arguments the action expects.

These are the arguments the user has to provide when invoking the action that this info object portrays.

Returns:
  the input arguments the action.

See also:
  outputArguments()

const HActionArguments & outputArguments | ( |  | ) | const

Returns the output arguments of the action.

These are the arguments each successful action invocation will "return" to user as output values.

Returns:
  the output arguments of the action.

See also:
  inputArguments()

QString returnArgumentName | ( |  | ) | const

Returns the name of the output argument that is marked as the action's return value.

Returns:
  the name of the output argument that is marked as the action's return value, or an empty string, if no output argument has been marked as the action's return value.

HInclusionRequirement inclusionRequirement | ( |  | ) | const

Indicates whether the action is required or optional.

Returns:
  value indicating whether the action is required or optional.

bool isValid | ( |  | ) | const

Indicates if the object is empty.

Returns:
  true in case the object is valid.

## Friends And Related Function Documentation

H_UPNP_CORE_EXPORT bool operator== | ( | const HActionInfo & | ,
|  | const HActionInfo & |  |
| ) |  |  | `[friend]`

Compares the two objects for equality.

Returns:
  true in case the object are logically equivalent.

H_UPNP_CORE_EXPORT bool operator!= | ( | const HActionInfo & | ,
|  | const HActionInfo & |  |
| ) |  |  | `[related]`

Compares the two objects for inequality.

Returns:
  true in case the object are not logically equivalent.

H_UPNP_CORE_EXPORT quint32 qHash | ( | const HActionInfo & | key | ) | `[related]`

Returns a value that can be used as a unique key in a hash-map identifying the object.

Parameters:

  | key | specifies the HActionInfo object from which the hash value is created.

Returns:
  a value that can be used as a unique key in a hash-map identifying the object.

Remarks:
  the hash is calculated from the name() of the HActionInfo.