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 ()
void AddDeviceL ( CUpnpDevice *)
void AddDevicePropertyL ( CUpnpDescriptionProperty *)
IMPORT_C TIconAdd AddIcon ( TInt )
IMPORT_C void AddIconL ( CUpnpIcon *)
IMPORT_C TServiceAdd AddServiceL ( TInt , CUpnpService *)
IMPORT_C TInetAddr Address ()
IMPORT_C TBool Alive ()
void AttachServiceL (CUpnpService *)
void CleanupServiceArray ()
IMPORT_C CUpnpDevice * CloneL ()
IMPORT_C HBufC8 * ConcatWithUrlBaseL (const TDesC8 &)
IMPORT_C const TPtrC8 DescriptionProperty (const TDesC8 &)
IMPORT_C const TDesC8 & DescriptionUrl ()
IMPORT_C TInetAddr DescriptionUrlAddressL ()
IMPORT_C const TPtrC8 DescriptionUrlPath ()
IMPORT_C TInt DescriptionUrlPort ()
void DetachService (CUpnpService *)
IMPORT_C RPointerArray < CUpnpDevice > & DeviceList ()
IMPORT_C TUpnpDeviceNetwork DeviceNetwork ()
IMPORT_C const TPtrC8 DeviceType ()
IMPORT_C TBool Expired ()
IMPORT_C void GetAllDevices ( RPointerArray < CUpnpDevice > &)
IMPORT_C TPtrC8 GetProperty (const TDesC8 &)
TIconAdd IconReceiveState ()
IMPORT_C RPointerArray < CUpnpIcon > & Icons ()
void Init ()
IMPORT_C TBool IsEmbeddDevice ()
IMPORT_C TBool Local ()
IMPORT_C CUpnpDevice * NewL (const TUpnpDevice *, const RPointerArray < TUpnpService > &)
IMPORT_C const TPtrC8 PresentationUrl ()
IMPORT_C TBool Remote ()
TPtrC8 RemoveIpAddress (const TDesC8 &)
TServiceAdd ServiceDescriptionReceiveState ()
IMPORT_C const TPtrC8 ServiceDescriptionUrl (const TDesC8 &)
IMPORT_C const TPtrC8 ServiceId (const TDesC8 &)
IMPORT_C CDesC8Array & ServiceIdL ()
IMPORT_C RPointerArray < CUpnpService > & ServiceList ()
IMPORT_C CDesC8Array & ServiceTypesL ()
IMPORT_C void SetAddress (const TInetAddr &)
IMPORT_C void SetAlive ( TBool )
void SetDescriptionUrlL (const TDesC8 &)
IMPORT_C void SetDeviceNetwork ( TUpnpDeviceNetwork )
IMPORT_C void SetExpired ( TBool )
IMPORT_C void SetLocal ( TBool )
void SetRootDevice ( TBool )
void SetTypeL (const TDesC8 &)
IMPORT_C void SetUrlBaseL (const TDesC8 &)
void SetUuidL (const TDesC8 &)
IMPORT_C const TPtrC8 UrlBase ()
IMPORT_C const TPtrC8 Uuid ()
IMPORT_C void WaitIconL ( TInt )
IMPORT_C TInt WaitServiceDescriptionCount ()
IMPORT_C void WaitServiceDescriptionL ( TInt )
IMPORT_C void WaitServiceDescriptionRemoveSessionId ( TInt )
IMPORT_C TInt WaitServiceDescriptionSessionId ( TInt )
Private Member Functions
TInt ChangeIconSessionIdL (const TInt , const TInt )
TInt CheckIconSessionIdExist (const TInt )
void ConstructL (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
enum TIconAdd { ENotIconAdded , EIconAdded , EAllIconsAdded }
enum TServiceAdd { ENotServiceAdded , EServiceAdded , EAllServicesAdded }
enum TUpnpDeviceNetwork { 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 *)

void AddDeviceL ( CUpnpDevice * device )
Adds device
Since
Series60 2.6

Parameters

CUpnpDevice * device

AddDevicePropertyL(CUpnpDescriptionProperty *)

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

Parameters

CUpnpDescriptionProperty * aDeviceProperty

AddIcon(TInt)

IMPORT_C TIconAdd AddIcon ( TInt aSessionId )
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 aSessionId Session ID.

AddIconL(CUpnpIcon *)

IMPORT_C void AddIconL ( CUpnpIcon * aIcon )
Adds icon
Since
Series60 2.6

Parameters

CUpnpIcon * aIcon

AddServiceL(TInt, CUpnpService *)

IMPORT_C TServiceAdd AddServiceL ( TInt aSessionId,
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 aSessionId Session ID.
CUpnpService * aService

Address()

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

Alive()

IMPORT_C TBool Alive ( ) const
Getter.
Since
Series60 2.6

AttachServiceL(CUpnpService *)

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

Parameters

CUpnpService * aService Attached service.

ChangeIconSessionIdL(const TInt, const TInt)

TInt ChangeIconSessionIdL ( const TInt aOldSessionId,
const TInt aNewSessionId
) [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 aOldSessionId Old session id that is to be removed from list.
const TInt aNewSessionId New session id that is to be added to list.

CheckIconSessionIdExist(const TInt)

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

Parameters

const TInt aSessionId Session id that is searched from the list.

CleanupServiceArray()

void CleanupServiceArray ( )
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 > &)

void ConstructL ( 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 TPtrC8 DescriptionProperty ( 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 TInetAddr DescriptionUrlAddressL ( ) const
Getter.
Since
Series60 2.6

DescriptionUrlPath()

IMPORT_C const TPtrC8 DescriptionUrlPath ( ) const
Getter
Since
Series60 2.6
Note:

Method for internal use.

DescriptionUrlPort()

IMPORT_C TInt DescriptionUrlPort ( ) const
Getter.
Since
Series60 2.6
Note:

Method for internal use.

DetachService(CUpnpService *)

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

Parameters

CUpnpService * aService Service to detach.

DeviceList()

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

DeviceNetwork()

IMPORT_C TUpnpDeviceNetwork DeviceNetwork ( ) const
Getter.
Since
Series60 5.0

DeviceType()

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

Expired()

IMPORT_C TBool Expired ( ) const
Getter.
Since
Series60 3.2

GetAllDevices(RPointerArray< CUpnpDevice > &)

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

Parameters

RPointerArray < CUpnpDevice > & aDevices

GetProperty(const TDesC8 &)

IMPORT_C TPtrC8 GetProperty ( const TDesC8 & aProperty )

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

Parameters

const TDesC8 & aProperty name 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()

void Init ( )
General initializations, internal usage.
Since
Series60 2.6

IsEmbeddDevice()

IMPORT_C TBool IsEmbeddDevice ( )
Since
Series S60 3.1

Local()

IMPORT_C TBool Local ( ) 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 * aDevice Device to create new device from.
const RPointerArray < TUpnpService > & aServices Services 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 TPtrC8 PresentationUrl ( )

This function gives <presentationUrl> value.

Remote()

IMPORT_C TBool Remote ( ) 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 TPtrC8 ServiceDescriptionUrl ( const TDesC8 & aServiceType )
XML-inferface function.
Since
Series60 2.6

Parameters

const TDesC8 & aServiceType Type of the service.

ServiceId(const TDesC8 &)

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

Parameters

const TDesC8 & aServiceType Type 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 void SetAddress ( const TInetAddr & aAddr )
Sets the address of this device.
Since
Series60 2.6

Parameters

const TInetAddr & aAddr Address.

SetAlive(TBool)

IMPORT_C void SetAlive ( TBool aAlive )
Setter.
Since
Series60 2.6

Parameters

TBool aAlive Desired TBool.

SetDescriptionUrlL(const TDesC8 &)

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

Parameters

const TDesC8 & aDescriptionUrl

SetDeviceNetwork(TUpnpDeviceNetwork)

IMPORT_C void SetDeviceNetwork ( TUpnpDeviceNetwork aNetworkType )
Setter.
Since
Series60 5.0

Parameters

TUpnpDeviceNetwork aNetworkType Desired network.

SetExpired(TBool)

IMPORT_C void SetExpired ( TBool aAlive )
Setter.
Since
Series60 3.2

Parameters

TBool aAlive Desired TBool.

SetLocal(TBool)

IMPORT_C void SetLocal ( TBool aLocal )
Setter.
Since
Series60 2.6

Parameters

TBool aLocal Desired TBool.

SetRootDevice(TBool)

void SetRootDevice ( TBool aIsRoot )
Marks out that the device is root
Since
Series60 2.6

Parameters

TBool aIsRoot

SetTypeL(const TDesC8 &)

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

Parameters

const TDesC8 & aType

SetUrlBaseL(const TDesC8 &)

IMPORT_C void SetUrlBaseL ( const TDesC8 & aUrlBase )

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

Parameters

const TDesC8 & aUrlBase

SetUuidL(const TDesC8 &)

void SetUuidL ( const TDesC8 & aUUID )
Setter.
Since
Series60 3.2

Parameters

const TDesC8 & aUUID New device UUID.

UrlBase()

IMPORT_C const TPtrC8 UrlBase ( )

This function gives <URLBase> tag value.

Uuid()

IMPORT_C const TPtrC8 Uuid ( )
Getter.
Since
Series60 2.6

WaitIconL(TInt)

IMPORT_C void WaitIconL ( TInt aSessionId )
Adds aSessionId into list of currently pending icon requests.
Since
Series60 2.6

Parameters

TInt aSessionId Session ID.

WaitServiceDescriptionCount()

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

WaitServiceDescriptionL(TInt)

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

Parameters

TInt aSessionId Session ID.

WaitServiceDescriptionRemoveSessionId(TInt)

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

Parameters

TInt aIndex Index of sessionId.

WaitServiceDescriptionSessionId(TInt)

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

Parameters

TInt aIndex Index 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]