CUpnpDevice Class Reference

class CUpnpDevice : public CBase

Device

Prior using the CUpnpDevice class, client application has to create the network connection. If connection is not up and running, the CUpnpDispatcherEngine class construction will fail. See UPnP Interface Design document for instuctions.

Since
Series60 2.6

Inherits from

Public Member Functions
CUpnpDevice()
~CUpnpDevice()
voidAddDeviceL(CUpnpDevice *)
voidAddDevicePropertyL(CUpnpDescriptionProperty *)
IMPORT_C TIconAddAddIcon(TInt)
IMPORT_C voidAddIconL(CUpnpIcon *)
IMPORT_C TServiceAddAddServiceL(TInt, CUpnpService *)
IMPORT_C TInetAddrAddress()
IMPORT_C TBoolAlive()
voidAttachServiceL(CUpnpService *)
voidCleanupServiceArray()
IMPORT_C CUpnpDevice *CloneL()
IMPORT_C HBufC8 *ConcatWithUrlBaseL(const TDesC8 &)
IMPORT_C const TPtrC8DescriptionProperty(const TDesC8 &)
IMPORT_C const TDesC8 &DescriptionUrl()
IMPORT_C TInetAddrDescriptionUrlAddressL()
IMPORT_C const TPtrC8DescriptionUrlPath()
IMPORT_C TIntDescriptionUrlPort()
voidDetachService(CUpnpService *)
IMPORT_C RPointerArray< CUpnpDevice > &DeviceList()
IMPORT_C TUpnpDeviceNetworkDeviceNetwork()
IMPORT_C const TPtrC8DeviceType()
IMPORT_C TBoolExpired()
IMPORT_C voidGetAllDevices(RPointerArray< CUpnpDevice > &)
IMPORT_C TPtrC8GetProperty(const TDesC8 &)
TIconAdd IconReceiveState()
IMPORT_C RPointerArray< CUpnpIcon > &Icons()
voidInit()
IMPORT_C TBoolIsEmbeddDevice()
IMPORT_C TBoolLocal()
IMPORT_C CUpnpDevice *NewL(const TUpnpDevice *, const RPointerArray< TUpnpService > &)
IMPORT_C const TPtrC8PresentationUrl()
IMPORT_C TBoolRemote()
TPtrC8 RemoveIpAddress(const TDesC8 &)
TServiceAdd ServiceDescriptionReceiveState()
IMPORT_C const TPtrC8ServiceDescriptionUrl(const TDesC8 &)
IMPORT_C const TPtrC8ServiceId(const TDesC8 &)
IMPORT_C CDesC8Array &ServiceIdL()
IMPORT_C RPointerArray< CUpnpService > &ServiceList()
IMPORT_C CDesC8Array &ServiceTypesL()
IMPORT_C voidSetAddress(const TInetAddr &)
IMPORT_C voidSetAlive(TBool)
voidSetDescriptionUrlL(const TDesC8 &)
IMPORT_C voidSetDeviceNetwork(TUpnpDeviceNetwork)
IMPORT_C voidSetExpired(TBool)
IMPORT_C voidSetLocal(TBool)
voidSetRootDevice(TBool)
voidSetTypeL(const TDesC8 &)
IMPORT_C voidSetUrlBaseL(const TDesC8 &)
voidSetUuidL(const TDesC8 &)
IMPORT_C const TPtrC8UrlBase()
IMPORT_C const TPtrC8Uuid()
IMPORT_C voidWaitIconL(TInt)
IMPORT_C TIntWaitServiceDescriptionCount()
IMPORT_C voidWaitServiceDescriptionL(TInt)
IMPORT_C voidWaitServiceDescriptionRemoveSessionId(TInt)
IMPORT_C TIntWaitServiceDescriptionSessionId(TInt)
Private Member Functions
TInt ChangeIconSessionIdL(const TInt, const TInt)
TInt CheckIconSessionIdExist(const TInt)
voidConstructL(const TUpnpDevice *, const RPointerArray< TUpnpService > &)
CUpnpDevice *NewL(const TDesC8 &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumTIconAdd { ENotIconAdded, EIconAdded, EAllIconsAdded }
enumTServiceAdd { ENotServiceAdded, EServiceAdded, EAllServicesAdded }
enumTUpnpDeviceNetwork { EUnknown = 0, ELocalDevice, EHomeNetwork, ERemoteDevice }
Protected Attributes
TInetAddr iAddress
TBool iAlive
HBufC8 *iClockSeq
HBufC8 *iDescriptionURL
HBufC *iDeviceDescription
RPointerArray< CUpnpDevice >iDeviceList
HBufC8 *iDeviceType
HBufC8 *iDomain
TBool iExpired
TInt iHandle
TIconAdd iIconReceiveState
RArray< TInt >iIconSessionIds
RPointerArray< CUpnpIcon >iIcons
TBool iIsAllIconsArrived
TBool iIsRootDevice
TUpnpDeviceNetwork iNetworkType
RPointerArray< CUpnpDescriptionProperty >iProperties
TServiceAdd iServiceDescriptionReceiveState
RArray< TInt >iServiceDescriptionSessionIds
RPointerArray< CUpnpService >iServiceList
CDesC8ArrayFlat *iServiceTypes
CDesC8ArrayFlat *iServicesId
TInt64 iTimeValue
HBufC8 *iUUID
HBufC8 *iUrlBase

Constructor & Destructor Documentation

CUpnpDevice()

CUpnpDevice()

C++ default constructor.

~CUpnpDevice()

~CUpnpDevice()[virtual]

Destructor.

Member Functions Documentation

AddDeviceL(CUpnpDevice *)

voidAddDeviceL(CUpnpDevice *device)
Adds device
Since
Series60 2.6

Parameters

CUpnpDevice * device

AddDevicePropertyL(CUpnpDescriptionProperty *)

voidAddDevicePropertyL(CUpnpDescriptionProperty *aDeviceProperty)
Adds a specific device property
Since
Series60 2.6

Parameters

CUpnpDescriptionProperty * aDeviceProperty

AddIcon(TInt)

IMPORT_C TIconAddAddIcon(TIntaSessionId)
Adds a icon to this device. Returns EAllIconsAdded, if all icons for this device has been downloaded. Else returns EIconAdded.
Since
Series60 2.6

Parameters

TInt aSessionIdSession ID.

AddIconL(CUpnpIcon *)

IMPORT_C voidAddIconL(CUpnpIcon *aIcon)
Adds icon
Since
Series60 2.6

Parameters

CUpnpIcon * aIcon

AddServiceL(TInt, CUpnpService *)

IMPORT_C TServiceAddAddServiceL(TIntaSessionId,
CUpnpService *aService
)
Adds a service to this device. Returns EAllServicesAdded, if information about all services on this device has been received. Else returns EServiceAdded.
Since
Series60 2.6

Parameters

TInt aSessionIdSession ID.
CUpnpService * aService

Address()

IMPORT_C TInetAddrAddress()[virtual]
Returns the address of this device.
Since
Series60 2.6

Alive()

IMPORT_C TBoolAlive()const
Getter.
Since
Series60 2.6

AttachServiceL(CUpnpService *)

voidAttachServiceL(CUpnpService *aService)
Add service to dispatcher.
Since
Series60 2.6

Parameters

CUpnpService * aServiceAttached service.

ChangeIconSessionIdL(const TInt, const TInt)

TInt ChangeIconSessionIdL(const TIntaOldSessionId,
const TIntaNewSessionId
)[private]
This function is used for removing old icon request session id from list and adding a new one.
Since
Series60 2.6

Parameters

const TInt aOldSessionIdOld session id that is to be removed from list.
const TInt aNewSessionIdNew session id that is to be added to list.

CheckIconSessionIdExist(const TInt)

TInt CheckIconSessionIdExist(const TIntaSessionId)[private]
This function checks if given session id exists in
Since
Series60 2.6

Parameters

const TInt aSessionIdSession id that is searched from the list.

CleanupServiceArray()

voidCleanupServiceArray()
Cleanups array
Since
Series S60 3.2

CloneL()

IMPORT_C CUpnpDevice *CloneL()
Makes a copy of device
Since
Series60 2.6

ConcatWithUrlBaseL(const TDesC8 &)

IMPORT_C HBufC8 *ConcatWithUrlBaseL(const TDesC8 &aUrl)

Concatenate given URL with URLBase if exists

Parameters

const TDesC8 & aUrl

ConstructL(const TUpnpDevice *, const RPointerArray< TUpnpService > &)

voidConstructL(const TUpnpDevice *aDevice,
const RPointerArray< TUpnpService > &aServices
)[private]

By default Symbian 2nd phase constructor is private.

Parameters

const TUpnpDevice * aDevice
const RPointerArray< TUpnpService > & aServices

DescriptionProperty(const TDesC8 &)

IMPORT_C const TPtrC8DescriptionProperty(const TDesC8 &aPropertyName)
XML-inferface function.
Since
Series60 2.6

Parameters

const TDesC8 & aPropertyName

DescriptionUrl()

IMPORT_C const TDesC8 &DescriptionUrl()const
Getter.
Since
Series60 2.6

DescriptionUrlAddressL()

IMPORT_C TInetAddrDescriptionUrlAddressL()const
Getter.
Since
Series60 2.6

DescriptionUrlPath()

IMPORT_C const TPtrC8DescriptionUrlPath()const
Getter
Since
Series60 2.6
Note:

Method for internal use.

DescriptionUrlPort()

IMPORT_C TIntDescriptionUrlPort()const
Getter.
Since
Series60 2.6
Note:

Method for internal use.

DetachService(CUpnpService *)

voidDetachService(CUpnpService *aService)
Removes service from iServiceList.
Since
Series60 3.2

Parameters

CUpnpService * aServiceService to detach.

DeviceList()

IMPORT_C RPointerArray< CUpnpDevice > &DeviceList()
Getter (embedded devices).
Since
Series60 2.6

DeviceNetwork()

IMPORT_C TUpnpDeviceNetworkDeviceNetwork()const
Getter.
Since
Series60 5.0

DeviceType()

IMPORT_C const TPtrC8DeviceType()
XML-inferface function.
Since
Series60 2.6

Expired()

IMPORT_C TBoolExpired()const
Getter.
Since
Series60 3.2

GetAllDevices(RPointerArray< CUpnpDevice > &)

IMPORT_C voidGetAllDevices(RPointerArray< CUpnpDevice > &aDevices)
Gets whole embedded hierarchy as a flat list.
Since
Series60 2.6

Parameters

RPointerArray< CUpnpDevice > & aDevices

GetProperty(const TDesC8 &)

IMPORT_C TPtrC8GetProperty(const TDesC8 &aProperty)

Get information from device description. Given parameter is name of XML-tag in device description.

Parameters

const TDesC8 & aPropertyname of element in device description

IconReceiveState()

TIconAdd IconReceiveState()const [inline]
For Control point. State of icon receiving.
Since
Series60 2.6

Icons()

IMPORT_C RPointerArray< CUpnpIcon > &Icons()
Getter.
Since
Series60 2.6

Init()

voidInit()
General initializations, internal usage.
Since
Series60 2.6

IsEmbeddDevice()

IMPORT_C TBoolIsEmbeddDevice()
Since
Series S60 3.1

Local()

IMPORT_C TBoolLocal()const
Getter.
Since
Series60 2.6

NewL(const TUpnpDevice *, const RPointerArray< TUpnpService > &)

IMPORT_C CUpnpDevice *NewL(const TUpnpDevice *aDevice,
const RPointerArray< TUpnpService > &aServices
)[static]

Two-phased constructor.

Parameters

const TUpnpDevice * aDeviceDevice to create new device from.
const RPointerArray< TUpnpService > & aServicesServices for the new device.

NewL(const TDesC8 &)

CUpnpDevice *NewL(const TDesC8 &aDescription)[private, static]

Two-phased constructor.

Parameters

const TDesC8 & aDescription

PresentationUrl()

IMPORT_C const TPtrC8PresentationUrl()

This function gives <presentationUrl> value.

Remote()

IMPORT_C TBoolRemote()const
Getter.
Since
Series60 5.0

RemoveIpAddress(const TDesC8 &)

TPtrC8 RemoveIpAddress(const TDesC8 &aAddress)[static]
Removes IP address in front of the url leaving only path to file.
Since
Series60 2.6

Parameters

const TDesC8 & aAddress

ServiceDescriptionReceiveState()

TServiceAdd ServiceDescriptionReceiveState()const [inline]
For Control point. State of icon receiving.
Since
Series60 2.6

ServiceDescriptionUrl(const TDesC8 &)

IMPORT_C const TPtrC8ServiceDescriptionUrl(const TDesC8 &aServiceType)
XML-inferface function.
Since
Series60 2.6

Parameters

const TDesC8 & aServiceTypeType of the service.

ServiceId(const TDesC8 &)

IMPORT_C const TPtrC8ServiceId(const TDesC8 &aServiceType)
XML-inferface function.
Since
Series60 2.6

Parameters

const TDesC8 & aServiceTypeType of the service.

ServiceIdL()

IMPORT_C CDesC8Array &ServiceIdL()

Get information about service IDs

ServiceList()

IMPORT_C RPointerArray< CUpnpService > &ServiceList()
Getter.
Since
Series60 2.6

ServiceTypesL()

IMPORT_C CDesC8Array &ServiceTypesL()
XML-inferface function.
Since
Series60 2.6

SetAddress(const TInetAddr &)

IMPORT_C voidSetAddress(const TInetAddr &aAddr)
Sets the address of this device.
Since
Series60 2.6

Parameters

const TInetAddr & aAddrAddress.

SetAlive(TBool)

IMPORT_C voidSetAlive(TBoolaAlive)
Setter.
Since
Series60 2.6

Parameters

TBool aAliveDesired TBool.

SetDescriptionUrlL(const TDesC8 &)

voidSetDescriptionUrlL(const TDesC8 &aDescriptionUrl)
Sets description Url
Since
Series60 2.6

Parameters

const TDesC8 & aDescriptionUrl

SetDeviceNetwork(TUpnpDeviceNetwork)

IMPORT_C voidSetDeviceNetwork(TUpnpDeviceNetworkaNetworkType)
Setter.
Since
Series60 5.0

Parameters

TUpnpDeviceNetwork aNetworkTypeDesired network.

SetExpired(TBool)

IMPORT_C voidSetExpired(TBoolaAlive)
Setter.
Since
Series60 3.2

Parameters

TBool aAliveDesired TBool.

SetLocal(TBool)

IMPORT_C voidSetLocal(TBoolaLocal)
Setter.
Since
Series60 2.6

Parameters

TBool aLocalDesired TBool.

SetRootDevice(TBool)

voidSetRootDevice(TBoolaIsRoot)
Marks out that the device is root
Since
Series60 2.6

Parameters

TBool aIsRoot

SetTypeL(const TDesC8 &)

voidSetTypeL(const TDesC8 &aType)
Sets type of device
Since
Series60 2.6

Parameters

const TDesC8 & aType

SetUrlBaseL(const TDesC8 &)

IMPORT_C voidSetUrlBaseL(const TDesC8 &aUrlBase)

This function set UrlBase value if it is empty in xml document.

Parameters

const TDesC8 & aUrlBase

SetUuidL(const TDesC8 &)

voidSetUuidL(const TDesC8 &aUUID)
Setter.
Since
Series60 3.2

Parameters

const TDesC8 & aUUIDNew device UUID.

UrlBase()

IMPORT_C const TPtrC8UrlBase()

This function gives <URLBase> tag value.

Uuid()

IMPORT_C const TPtrC8Uuid()
Getter.
Since
Series60 2.6

WaitIconL(TInt)

IMPORT_C voidWaitIconL(TIntaSessionId)
Adds aSessionId into list of currently pending icon requests.
Since
Series60 2.6

Parameters

TInt aSessionIdSession ID.

WaitServiceDescriptionCount()

IMPORT_C TIntWaitServiceDescriptionCount()
Returns count of currently pending service HTTP GET requests.
Since
Series60 2.6

WaitServiceDescriptionL(TInt)

IMPORT_C voidWaitServiceDescriptionL(TIntaSessionId)
Adds aSessionId to list, that contains sessionIds of currently pending service HTTP GET requests.
Since
Series60 2.6

Parameters

TInt aSessionIdSession ID.

WaitServiceDescriptionRemoveSessionId(TInt)

IMPORT_C voidWaitServiceDescriptionRemoveSessionId(TIntaIndex)
Removes session id from device's service receiving list. This sessionId is in array position of aIndex.
Since
Series60 2.6

Parameters

TInt aIndexIndex of sessionId.

WaitServiceDescriptionSessionId(TInt)

IMPORT_C TIntWaitServiceDescriptionSessionId(TIntaIndex)
Returns a sessionId of HTTP GET in array, that has index of aIndex.
Since
Series60 2.6

Parameters

TInt aIndexIndex of sessionId.

Member Enumerations Documentation

Enum TIconAdd

Enumerators

ENotIconAdded
EIconAdded
EAllIconsAdded

Enum TServiceAdd

Enumerators

ENotServiceAdded
EServiceAdded
EAllServicesAdded

Enum TUpnpDeviceNetwork

Localization of device (local, home network or remote)

Enumerators

EUnknown = 0
ELocalDevice
EHomeNetwork
ERemoteDevice

Member Data Documentation

TInetAddr iAddress

TInetAddr iAddress[protected]

TBool iAlive

TBool iAlive[protected]

HBufC8 * iClockSeq

HBufC8 *iClockSeq[protected]

HBufC8 * iDescriptionURL

HBufC8 *iDescriptionURL[protected]

HBufC * iDeviceDescription

HBufC *iDeviceDescription[protected]

RPointerArray< CUpnpDevice > iDeviceList

RPointerArray< CUpnpDevice >iDeviceList[protected]

HBufC8 * iDeviceType

HBufC8 *iDeviceType[protected]

HBufC8 * iDomain

HBufC8 *iDomain[protected]

TBool iExpired

TBool iExpired[protected]

TInt iHandle

TInt iHandle[protected]

TIconAdd iIconReceiveState

TIconAdd iIconReceiveState[protected]

RArray< TInt > iIconSessionIds

RArray< TInt >iIconSessionIds[protected]

RPointerArray< CUpnpIcon > iIcons

RPointerArray< CUpnpIcon >iIcons[protected]

TBool iIsAllIconsArrived

TBool iIsAllIconsArrived[protected]

TBool iIsRootDevice

TBool iIsRootDevice[protected]

TUpnpDeviceNetwork iNetworkType

TUpnpDeviceNetwork iNetworkType[protected]

RPointerArray< CUpnpDescriptionProperty > iProperties

RPointerArray< CUpnpDescriptionProperty >iProperties[protected]

TServiceAdd iServiceDescriptionReceiveState

TServiceAdd iServiceDescriptionReceiveState[protected]

RArray< TInt > iServiceDescriptionSessionIds

RArray< TInt >iServiceDescriptionSessionIds[protected]

RPointerArray< CUpnpService > iServiceList

RPointerArray< CUpnpService >iServiceList[protected]

CDesC8ArrayFlat * iServiceTypes

CDesC8ArrayFlat *iServiceTypes[protected]

CDesC8ArrayFlat * iServicesId

CDesC8ArrayFlat *iServicesId[protected]

TInt64 iTimeValue

TInt64 iTimeValue[protected]

HBufC8 * iUUID

HBufC8 *iUUID[protected]

HBufC8 * iUrlBase

HBufC8 *iUrlBase[protected]