mUPnP for C
CGUpnpService Class Reference

#include <CGUpnpService.h>

Inheritance diagram for CGUpnpService:

Instance Methods

(id) - initWithCObject:
 
(BOOL) - parseXMLDescription:
 
(NSString *) - serviceId
 
(NSString *) - serviceType
 
(NSArray *) - actions
 
(NSArray *) - stateVariables
 
(CGUpnpAction *) - getActionForName:
 
(CGUpnpStateVariable *) - getStateVariableForName:
 
(BOOL) - isStateVariableImpemented:
 

Properties

NSObject * cObjectOwner
 
mUpnpService * cObject
 

Detailed Description

The CGUpnpService class is a wrapper class for mUpnpService of mUPnP for C.

Method Documentation

◆ actions

- (NSArray *) actions

Get all actions in the service as a NSArray object. The array has the actions as instances of CGUpnpAction.

Returns
NSArray of CGUpnpAction.

◆ getActionForName:

- (CGUpnpAction *) getActionForName: (NSString*) name

Get a action in the service by the specified name.

Parameters
nameA name string of the action.
Returns
The CGUpnpAction if the specified action is found; otherwise nil.

◆ getStateVariableForName:

- (CGUpnpStateVariable *) getStateVariableForName: (NSString*) name

Get a state variables in the service by the specified name.

Parameters
nameA name string of the state variable.
Returns
The CGUpnpStateVariable if the specified state variable is found; otherwise nil.

◆ initWithCObject:

- (id) initWithCObject: (mUpnpService*) cobj

Create a new UPnP service with the C instance.

Returns
New instance if successfull; otherwise nil.

◆ isStateVariableImpemented:

- (BOOL) isStateVariableImpemented: (NSString*) name

Checks whether state variable is implemented

Parameters
nameA name string of the state variable.
Returns
YES if implemented

◆ parseXMLDescription:

- (BOOL) parseXMLDescription: (NSString*) xmlDesc

Parse the specified service description (SCPD).

The description is passed to the native parser as UTF-8 bytes, so non-ASCII text such as Japanese or emoji is preserved.

Returns NO without touching the receiver when xmlDesc is nil, empty, not an NSString or not convertible to UTF-8. When the native parser rejects the XML, it returns NO after the native service has been cleared: the receiver then has no actions or state variables, and action and state variable wrappers previously obtained from it must not be used.

Parameters
xmlDescThe service description
Returns
YES if successful; otherwise NO.

◆ serviceId

- (NSString *) serviceId

Get the service ID of the service.

Returns
The service ID.

◆ serviceType

- (NSString *) serviceType

Get the service type of the service.

Returns
The service type.

◆ stateVariables

- (NSArray *) stateVariables

Get all state variables in the service as a NSArray object. The array has the state variables as instances of CGUpnpStateVariable.

Returns
NSArray of CGUpnpStateVariable.

Property Documentation

◆ cObject

- (mUpnpService*) cObject
readatomicassign

◆ cObjectOwner

- (NSObject*) cObjectOwner
readwriteatomicretain

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