#include <CGUpnpStateVariable.h>
The CGUpnpStateVariable class is a wrapper class for mUpnpStateVariable of mUPnP for C.
◆ allowedValues
| - (NSArray *) allowedValues |
|
|
|
Get an array of the allowed values for the state variable
- Returns
- The array.
◆ dataType
Get the data type declared in the service description (e.g. "string", "ui4", "uri").
- Returns
- The data type, or nil.
◆ defaultValue
| - (NSString *) defaultValue |
|
|
|
Get the default value declared in the service description.
- Returns
- The default value, or nil if none is declared.
◆ initWithCObject:
Create a wrapper for the specified native state variable.
The native object is borrowed: the wrapper does not take ownership of it and does not modify its userdata. Passing NULL (or using -init) creates an invalid wrapper: name, value, dataType, defaultValue and statusCode return nil/0, allowedValues returns an empty array, and isAllowedValue: and query return NO.
- Parameters
-
| cobj | The native state variable, or NULL |
◆ isAllowedValue:
| - (BOOL) isAllowedValue: |
|
(NSString*) | value |
|
Checks whether value is allowed for this state variable
- Parameters
-
- Returns
- YES if true
◆ metadata
| - (NSDictionary< NSString *, id > *) metadata |
|
|
|
Owned immutable description snapshot: name/dataType/defaultValue when present, allowedValues (always an immutable array), and allowedValueRange (only when the XML element exists). Range minimum/maximum/step retain exact strings, including incomplete/malformed declarations, for strict validation by the consumer. A declaration never establishes device permission/support.
◆ name
Get the name of the state variable.
- Returns
- The name.
◆ query
Send query
- Returns
- YES if successfull; otherwise NO
◆ statusCode
Get a states code of the last query.
- Returns
- The status code
◆ value
Get the current value of the state variable.
On a control point this is nil until the variable has been queried with -query or updated by an event. The value declared in the service description is available from -defaultValue.
- Returns
- The value.
◆ cObject
◆ cObjectOwner
| - (NSObject*) cObjectOwner |
|
readwriteatomicretain |
The documentation for this class was generated from the following files: