|
cybergarage-upnp
|
Public Member Functions | |
| Node | getArgumentNode () |
| Service | getService () |
| Node | getActionNode () |
| Action | getAction () |
| Argument () | |
| Argument (Node servNode) | |
| Argument (Node servNode, Node argNode) | |
| Argument (String name, String value) | |
| void | setName (String value) |
| String | getName () |
| void | setDirection (String value) |
| String | getDirection () |
| boolean | isInDirection () |
| boolean | isOutDirection () |
| void | setRelatedStateVariableName (String value) |
| String | getRelatedStateVariableName () |
| StateVariable | getRelatedStateVariable () |
| void | setValue (String value) |
| void | setValue (int value) |
| String | getValue () |
| int | getIntegerValue () |
| void | setUserData (Object data) |
| Object | getUserData () |
Static Public Member Functions | |
| static boolean | isArgumentNode (Node node) |
Static Public Attributes | |
| static final String | ELEM_NAME = "argument" |
| static final String | IN = "in" |
| static final String | OUT = "out" |
Private Member Functions | |
| Node | getServiceNode () |
| ArgumentData | getArgumentData () |
Private Attributes | |
| Node | argumentNode |
| Node | serviceNode |
| Object | userData = null |
Static Private Attributes | |
| static final String | NAME = "name" |
| static final String | DIRECTION = "direction" |
| static final String | RELATED_STATE_VARIABLE = "relatedStateVariable" |
Represents an argument of a UPnP action.
Arguments are the parameters passed to and returned from UPnP actions. Each argument has:
Example usage:
// Creating an input argument
Argument volumeArg = new Argument("DesiredVolume", "50");
// Checking direction
if (argument.isInDirection()) {
String value = argument.getValue();
}
// Getting related state variable
StateVariable stateVar = argument.getRelatedStateVariable();
|
inline |
Constructs an empty argument.
|
inline |
Constructs an argument associated with a service node.
| servNode | the XML node representing the parent service |
Constructs an argument from existing service and argument XML nodes.
| servNode | the XML node representing the parent service |
| argNode | the XML node representing the argument definition |
|
inline |
Constructs an argument with the specified name and value.
| name | the argument name |
| value | the argument value |
|
inline |
Returns the action that contains this argument.
|
inline |
Returns the XML node representing the action that contains this argument.
null if not found
|
inlineprivate |
|
inline |
Returns the underlying XML node representing this argument.
|
inline |
Returns the direction of this argument.
null if not set
|
inline |
Returns the value of this argument as an integer.
If the value cannot be parsed as an integer, returns 0.
|
inline |
Returns the name of this argument.
|
inline |
Returns the related state variable object.
Looks up the state variable by name in the parent service's state table.
null if not found or if the service is not available
|
inline |
Returns the name of the related state variable.
|
inline |
Returns the service that contains this argument.
|
inlineprivate |
|
inline |
Returns the custom user data associated with this argument.
null if none has been set
|
inline |
Returns the value of this argument.
|
inlinestatic |
Checks if the given XML node represents an argument element.
| node | the XML node to check |
true if the node's name matches the argument element name, false otherwise
|
inline |
Checks if this argument is an input parameter.
true if the direction is "in", false otherwise
|
inline |
Checks if this argument is an output parameter.
true if the direction is not "in", false otherwise
|
inline |
|
inline |
Sets the name of this argument.
| value | the argument name |
|
inline |
Sets the name of the related state variable.
The related state variable defines the data type, range, and constraints for this argument's value.
| value | the name of the related state variable |
|
inline |
Sets custom user data associated with this argument.
Allows applications to attach arbitrary data to an argument instance for application-specific purposes.
| data | the user data object to associate with this argument |
|
inline |
Sets the value of this argument from an integer.
The integer is converted to a string representation.
| value | the argument value as an integer |
|
inline |
Sets the value of this argument.
| value | the argument value as a string |
|
private |
|
staticprivate |
|
static |
The XML element name for argument nodes in SCPD documents.
|
static |
Direction constant for input arguments.
|
staticprivate |
|
static |
Direction constant for output arguments.
|
staticprivate |
|
private |
|
private |