mUPnP for Objective-C
CGUpnpAction Class Reference

#include <CGUpnpAction.h>

Inheritance diagram for CGUpnpAction:

Instance Methods

(id) - initWithCObject:
 
(NSString *) - name
 
(NSDictionary *) - arguments
 
(NSArray< NSDictionary< NSString *, id > * > *) - argumentMetadata
 
(BOOL) - setArgumentValue:forName:
 
(NSString *) - argumentValueForName:
 
(BOOL) - post
 
(BOOL) - postWithArguments:
 
(NSInteger) - statusCode
 

Properties

NSObject * cObjectOwner
 
mUpnpAction * cObject
 

Detailed Description

The CGUpnpAction class is a wrapper class for mUpnpAction of mUPnP for C.

Method Documentation

◆ argumentMetadata

- (NSArray< NSDictionary< NSString *, id > * > *) argumentMetadata

Owned immutable SCPD snapshots, in declared argument order. Each dictionary retains name/direction/relatedStateVariable when present, plus a resolved stateVariable metadata dictionary when that relationship exists. Missing or malformed metadata is not replaced by a default or a capability claim. Contains no native pointers and remains readable after the service is freed.

◆ arguments

- (NSDictionary *) arguments

Get all arguments in the action as a NSDictionary object.

Returns
NSDictionary of the arguments.

◆ argumentValueForName:

- (NSString *) argumentValueForName: (NSString*) name

Get a value of the specified argument from the action by the argument's name directly.

Parameters
nameThe name of the argument to look for
Returns
The target value if successfull; otherwise NULL

◆ initWithCObject:

- (id) initWithCObject: (mUpnpAction*) cobj

◆ name

- (NSString *) name

Get the name of the action.

Returns
The name.

◆ post

- (BOOL) post

Send action

Returns
YES if successfull; otherwise NO

◆ postWithArguments:

- (BOOL) postWithArguments: (NSDictionary*) arguments

Set the specified argument values and send the action.

Every entry is validated before any argument is changed or any request is sent. The method returns NO without sending a request and without changing any argument value when arguments is not a dictionary, or when any key is not the name of an argument of this action, or when any key or value is not an NSString convertible to UTF-8. Arguments that are not in the dictionary keep their current values, as with setArgumentValue:forName:.

Parameters
argumentsArgument values keyed by argument name, or nil
Returns
YES if successful; otherwise NO

◆ setArgumentValue:forName:

- (BOOL) setArgumentValue: (NSString*) value
forName: (NSString*) name 

Set a value of the specified argument from the action by the argument's name directly.

Parameters
valueThe value to set
nameThe name of the argument to look for
Returns
YES if successfull; otherwise NO

◆ statusCode

- (NSInteger) statusCode

Get a states code of the last post.

Returns
The status code

Property Documentation

◆ cObject

- (mUpnpAction*) cObject
readatomicassign

◆ cObjectOwner

- (NSObject*) cObjectOwner
readwriteatomicretain

The documentation for this class was generated from the following files: