mUPnP for C
CGUpnpControlPoint Class Reference

#include <CGUpnpControlPoint.h>

Inheritance diagram for CGUpnpControlPoint:

Instance Methods

(mUpnpControlPoint *) - cObject
 
(BOOL) - start
 
(BOOL) - stop
 
(BOOL) - isRunning
 
(void) - search
 
(void) - searchWithST:
 
(void) - setSsdpSearchMX:
 
(NSInteger) - ssdpSearchMX
 
(NSArray *) - devices
 
(CGUpnpDevice *) - deviceForUDN:
 

Properties

mUpnpControlPointcObject
 
id< CGUpnpControlPointDelegatedelegate
 

Detailed Description

The CGUpnpControlPoint class is a wrapper class for mUpnpControlPoint of mUPnP for C to program using only Objective-C directly on MacOSX. Currently, the only basic methods are wrapped to control UPnP devices.

Method Documentation

◆ cObject

- (mUpnpControlPoint *) cObject

◆ deviceForUDN:

- (CGUpnpDevice *) deviceForUDN: (NSString*) udn

Get a specified UPnP devices by the UDN.

Returns
CGUpnpDevice when the specified device is found, otherwise nil.

◆ devices

- (NSArray *) devices

Get all UPnP devices which the control point found as a NSArray object. The array has the devices as instances of CGUpnpDevice.

Returns
NSArray of CGUpnpDevice.

◆ isRunning

- (BOOL) isRunning

Check if the controll point is running.

Returns
YES if the device is started normally, otherwise NO.

◆ search

- (void) search

Send a M-SEARCH request to find for the all UPnP devices of UPnP in the network. The method waits for the specified MX time. Use setSsdpSearchMX:aMX to change the time. The method is same as searchWithST() when the ST parameter is "ssdp:all".

◆ searchWithST:

- (void) searchWithST: (NSString*) aST

Send a M-SEARCH request to find for the specified UPnP devices by a ST parameter in the network. The method waits for the specified MX time. Use setSsdpSearchMX:aMX to change the time.

Parameters
aSTThe Search Target parameter (ex. "ssdp:all")

◆ setSsdpSearchMX:

- (void) setSsdpSearchMX: (NSInteger) aMX

Set a MX parameter used for SSDP searches in seconds. The parameter is used to wait for M-SEARCH responses in search and searchWithST:aST.

Parameters
aMXTime to wait

◆ ssdpSearchMX

- (NSInteger) ssdpSearchMX

Get a MX parameter used for SSDP searches in seconds. The parameter is used to wait for M-SEARCH responses in search and searchWithST:aST.

Returns
Time to wait

◆ start

- (BOOL) start

Activate some background threads of the control point such as SSDP and HTTP servers to listen messages and events of UPnP. You must call this method before you can actually use a control point.

Returns
TRUE if successful; otherwise FALSE

◆ stop

- (BOOL) stop

Stop some background threads of the control point such as SSDP and HTTP servers to listen messages and events of UPnP.

Returns
TRUE if successful; otherwise FALSE

Property Documentation

◆ cObject

- (mUpnpControlPoint*) cObject
readatomicassign

◆ delegate

- (id<CGUpnpControlPointDelegate>) delegate
readwriteatomicassign

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