CyberLink for Objective-C

CGUpnpDevice Class Reference

#import <CGUpnpDevice.h>

Public Member Functions

(id) - init
(id) - initWithCObject:
(id) - initWithXMLDescription:
(BOOL) - parseXMLDescription:
(NSString *) - friendlyName
(NSString *) - deviceType
(NSString *) - udn
(NSString *) - manufacturer
(NSString *) - modelNumber
(NSString *) - modelName
(NSString *) - urlBase
(NSString *) - descriptionURL
(NSString *) - locationURL
(void) - setDeviceType:
(void) - setFriendlyName:
(void) - setUdn:
(BOOL) - isDeviceType:
(BOOL) - isUDN:
(BOOL) - isFriendlyName:
(NSString *) - presentationURL
(NSArray *) - services
(CGUpnpService *) - getServiceForID:
(CGUpnpService *) - getServiceForType:
(NSArray *) - icons
(BOOL) - start
(BOOL) - stop
(BOOL) - isRunning
(BOOL) - announce
(void) - setUserData:
(void *) - userData
(NSString *) - ipaddress
(CGUpnpIcon *) - smallestIcon
(CGUpnpIcon *) - smallestIconWithMimeType:
(NSString *) - absoluteIconUrl:

Protected Attributes

BOOL isCObjectCreated

Properties

CgUpnpDevice * cObject
id< CGUpnpDeviceDelegate > delegate

Detailed Description

The CGUpnpDevice class is a wrapper class for CgUpnpDevice of CyberLink for C.


Member Function Documentation

- (NSString *) absoluteIconUrl: (CGUpnpIcon *)  anIcon

Return a absolute url of the specified icon.

Parameters:
anIconIcon.
Returns:
Absolute url of the specified icon.
- (BOOL) announce

Announce the device.

Returns:
YES if the device is started normally, otherwise NO.
- (NSString *) descriptionURL

Return a descrition URL

Returns:
Descripton URL of the device.
- (NSString *) deviceType

Get the device type of the device.

Returns:
Device Type.
- (NSString *) friendlyName

Get the friendly name of the device.

Returns:
Friendly name.
- (CGUpnpService *) getServiceForID: (NSString *)  serviceId

Get a service in the device by the specified service ID.

Parameters:
serviceIdA service ID string of the service.
Returns:
The CGUpnpService if the specified service is found; otherwise nil.
- (CGUpnpService *) getServiceForType: (NSString *)  serviceType

Get a service in the device by the specified service type.

Parameters:
serviceTypeA service type string of the service.
Returns:
The CGUpnpService if the specified service is found; otherwise nil.
- (NSArray *) icons

Get all icons in the device as a NSArray object. The array has the services as instances of CGUpnpIconIcon.

Returns:
NSArray of CGUpnpIcon.
- (id) init

Create a new UPnP device.

Returns:
New instance if successfull; otherwise nil.
- (id) initWithCObject: (CgUpnpDevice *)  cobj

Create a new UPnP device with the C instance.

Returns:
New instance if successfull; otherwise nil.
- (id) initWithXMLDescription: (NSString *)  xmlDesc

Create a new UPnP device with the XML descriptioin.

Returns:
New instance if successfull; otherwise nil.
- (NSString *) ipaddress

Return a IP address.

Returns:
IP address of the device.
- (BOOL) isDeviceType: (NSString *)  aType

Check whether the device type is the specified type.

Parameters:
aTypeA type string of the device.
Returns:
YES if the specified type is same as the device type; otherwise NO.
- (BOOL) isFriendlyName: (NSString *)  aFriendlyName

Check whether the device's friendly name is the specified name.

Parameters:
aFriendlyNameA friendly name string of the device.
Returns:
YES if the specified friendly name is same as the device' friendly name; otherwise NO.
- (BOOL) isRunning

Check if the controll point is running.

Returns:
YES if the device is started normally, otherwise NO.
- (BOOL) isUDN: (NSString *)  aUDN

Check whether the device's UDN is the specified UDN.

Parameters:
aUDNA UDN string of the device.
Returns:
YES if the specified UDN is same as the device' UDN; otherwise NO.
- (NSString *) locationURL

Return a location URL

Returns:
Location URL of the device.
- (NSString *) manufacturer

Return a manufacture.

Returns:
Manufacture of the device.
- (NSString *) modelName

Return a model name.

Returns:
Model name of the device.
- (NSString *) modelNumber

Return a model number.

Returns:
Model number of the device.
- (BOOL) parseXMLDescription: (NSString *)  xmlDesc

Parse the specified XML description.

Returns:
YES if successfull; otherwise nui.
- (NSString *) presentationURL

Return a presentationURL

Returns:
presentationURL of the device.
- (NSArray *) services

Get all services in the device as a NSArray object. The array has the services as instances of CGUpnpService.

Returns:
NSArray of CGUpnpService.
- (void) setDeviceType: (NSString *)  aType

Set a device type of the device.

Parameters:
aTypeDevice type to set.
- (void) setFriendlyName: (NSString *)  aName

Set a friendly name of the device.

Parameters:
aNameFriendly name to set.
- (void) setUdn: (NSString *)  aUdn

Set a udn of the device.

Parameters:
aUdnUDN to set.
- (void) setUserData: (void *)  aUserData

Set a user data.

Parameters:
aUserDataA user data to set.
Returns:
The CGUpnpService if the specified service is found; otherwise nil.
- (CGUpnpIcon *) smallestIcon

Return a most smallest icon.

Returns:
Smallest Icon.
- (CGUpnpIcon *) smallestIconWithMimeType: (NSString *)  mimeType

Return a most smallest icon with a specified mime type.

Returns:
Smallest Icon.
- (BOOL) start

Start the device.

Returns:
YES if the device is started normally, otherwise NO.
- (BOOL) stop

Stop the device.

Returns:
YES if the device is started normally, otherwise NO.
- (NSString *) udn

Get the UDN of the device.

Returns:
UDN of the specified device.
- (NSString *) urlBase

Return a urlBase

Returns:
URLBase of the device.
- (void *) userData

Get a stored user data.

Returns:
A stored user data.

Field Documentation

- (BOOL) isCObjectCreated [protected]

Property Documentation

- (CgUpnpDevice*) cObject [read, write, assign]
- (id<CGUpnpDeviceDelegate>) delegate [read, write, assign]

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