CUpnpDeviceLibrary Class Reference

class CUpnpDeviceLibrary : public CBase

The device library main class. This class contains an array of device library elements (of type CUpnpDeviceLibraryElement). This list is maintained up-to-date by reading received SSDP messages. Every element in the library has a timeout, and remote devices are removed from the library after the timeout.

Since
Series60 2.0

Inherits from

Public Member Functions
~CUpnpDeviceLibrary()
IMPORT_C voidAddInfoL(const TUpnpAddLocalDevice *, const TDesC8 &, const TInetAddr &)
IMPORT_C voidAddInfoL(const TUpnpAddLocalDevice *, const TDesC8 &)
IMPORT_C voidAddInfoL(CUpnpSsdpMessage *)
IMPORT_C RPointerArray< CUpnpDeviceLibraryElement > &DeviceList()
IMPORT_C TIntFind(const TDesC8 &)
IMPORT_C voidGetUpdate(TInt &, TUpnpDevice *&, TUpnpService *&, TInt &, TInt &)
IMPORT_C CUpnpDeviceLibrary *NewL(MUpnpDeviceLibraryObserver &, TInt)
IMPORT_C voidPrepareShutdown()
IMPORT_C voidRemoveAllDevicesL()
IMPORT_C voidRemoveL(const TDesC8 &)
IMPORT_C voidRemoveSilentL(const TDesC8 &)
IMPORT_C voidStopFilteringDeviceL(const TDesC8 &)
Protected Member Functions
voidRemoveDeviceL(CUpnpSsdpMessage *)
Private Member Functions
CUpnpDeviceLibrary(MUpnpDeviceLibraryObserver &, TInt)
TBool AddDeviceL(CUpnpSsdpMessage *)
voidAppendLocalDeviceL(const TUpnpAddLocalDevice *, const TDesC8 &, const TInetAddr &)
voidConstructL()
CUpnpDeviceLibraryElement *Element(TDesC8 &)
voidInvalidateNonLocalDevice(CUpnpDeviceLibraryElement &)
voidTimeoutExpiredL(CUpnpTimeoutElement *)
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()
Protected Attributes
TInt iUpdateId
Private Attributes
RPointerArray< CUpnpDeviceLibraryElement >iElementArray
TInt iHandle
MUpnpDeviceLibraryObserver &iObserver

Constructor & Destructor Documentation

CUpnpDeviceLibrary(MUpnpDeviceLibraryObserver &, TInt)

CUpnpDeviceLibrary(MUpnpDeviceLibraryObserver &aObserver,
TIntaHandle
)[private]

C++ default constructor.

Parameters

MUpnpDeviceLibraryObserver & aObserverThe observer of the library.
TInt aHandlethe thread log handle

~CUpnpDeviceLibrary()

IMPORT_C~CUpnpDeviceLibrary()

Destructor.

Member Functions Documentation

AddDeviceL(CUpnpSsdpMessage *)

TBool AddDeviceL(CUpnpSsdpMessage *aMessage)[private]
Add device.
Since
Series60 2.0

Parameters

CUpnpSsdpMessage * aMessage

AddInfoL(const TUpnpAddLocalDevice *, const TDesC8 &, const TInetAddr &)

IMPORT_C voidAddInfoL(const TUpnpAddLocalDevice *aIndex,
const TDesC8 &aBuffer,
const TInetAddr &aLocalAddr
)
Adds the data of the local device to the library.
Since
Series60 2.0

Parameters

const TUpnpAddLocalDevice * aIndexAn indexing structure to parse the actual data
const TDesC8 & aBufferA buffer containing the actual data
const TInetAddr & aLocalAddrLocal address

AddInfoL(const TUpnpAddLocalDevice *, const TDesC8 &)

IMPORT_C voidAddInfoL(const TUpnpAddLocalDevice *aIndex,
const TDesC8 &aBuffer
)
Adds the data of the local device to the library.
Since
Series60 2.0

Parameters

const TUpnpAddLocalDevice * aIndexAn indexing structure to parse the actual data
const TDesC8 & aBufferA buffer containing the actual data

AddInfoL(CUpnpSsdpMessage *)

IMPORT_C voidAddInfoL(CUpnpSsdpMessage *aMessage)
Adds the data of the SSDP message to the library.
Since
Series60 2.0

Parameters

CUpnpSsdpMessage * aMessageA SSDP message containing data

AppendLocalDeviceL(const TUpnpAddLocalDevice *, const TDesC8 &, const TInetAddr &)

voidAppendLocalDeviceL(const TUpnpAddLocalDevice *aIndex,
const TDesC8 &aBuffer,
const TInetAddr &aLocalAddr
)[private]

Creates and appends local device.

Parameters

const TUpnpAddLocalDevice * aIndexdescriptiors positions structure needed by deserialization algorithm
const TDesC8 & aBufferaBuffer CUpnpDeviceLibraryElement object in serialized form
const TInetAddr & aLocalAddrlocal address of device being added

ConstructL()

voidConstructL()[private]

By default Symbian 2nd phase constructor is private.

DeviceList()

IMPORT_C RPointerArray< CUpnpDeviceLibraryElement > &DeviceList()
Returns an array containing pointers to the library elements
Since
Series60 2.0

Element(TDesC8 &)

CUpnpDeviceLibraryElement *Element(TDesC8 &aUUID)[private]
Return element.
Since
Series60 2.0

Parameters

TDesC8 & aUUID

Find(const TDesC8 &)

IMPORT_C TIntFind(const TDesC8 &aUuid)
Returns the index of an element with matching UUID.
Since
Series60 2.0

Parameters

const TDesC8 & aUuidThe UUID of searched device

GetUpdate(TInt &, TUpnpDevice *&, TUpnpService *&, TInt &, TInt &)

IMPORT_C voidGetUpdate(TInt &aUpdateId,
TUpnpDevice *&aDevices,
TUpnpService *&aServices,
TInt &aDeviceCount,
TInt &aServiceCount
)
?member_description.
Since
Series60 2.0

Parameters

TInt & aUpdateId
TUpnpDevice *& aDevices
TUpnpService *& aServices
TInt & aDeviceCount
TInt & aServiceCount

InvalidateNonLocalDevice(CUpnpDeviceLibraryElement &)

voidInvalidateNonLocalDevice(CUpnpDeviceLibraryElement &aElem)[private]

Invalidates non local device with the same UID as local device being added

Parameters

CUpnpDeviceLibraryElement & aElem

NewL(MUpnpDeviceLibraryObserver &, TInt)

IMPORT_C CUpnpDeviceLibrary *NewL(MUpnpDeviceLibraryObserver &aObserver,
TIntaHandle
)[static]

Two-phased constructor.

Parameters

MUpnpDeviceLibraryObserver & aObserverThe observer of the library.
TInt aHandlethe thread log handle

PrepareShutdown()

IMPORT_C voidPrepareShutdown()
Prepare for shutdown.
Since
Series60 2.0

RemoveAllDevicesL()

IMPORT_C voidRemoveAllDevicesL()
Removes all remote devices from the device library, used for ip address changes
Since
Series60 3.1

RemoveDeviceL(CUpnpSsdpMessage *)

voidRemoveDeviceL(CUpnpSsdpMessage *aMessage)[protected]
Remove Device.
Since
Series60 2.0

Parameters

CUpnpSsdpMessage * aMessage

RemoveL(const TDesC8 &)

IMPORT_C voidRemoveL(const TDesC8 &aUuid)
Removes an element from the library.
Since
Series60 2.0

Parameters

const TDesC8 & aUuidThe UUID of the element to be removed

RemoveSilentL(const TDesC8 &)

IMPORT_C voidRemoveSilentL(const TDesC8 &aUuid)
Removes an element from the library.
Since
Series60 2.0

Parameters

const TDesC8 & aUuidThe UUID of the element to be removed

StopFilteringDeviceL(const TDesC8 &)

IMPORT_C voidStopFilteringDeviceL(const TDesC8 &aUuid)
Set device notification filtering
Since
Series60 3.2

Parameters

const TDesC8 & aUuidDevice Uuid

TimeoutExpiredL(CUpnpTimeoutElement *)

voidTimeoutExpiredL(CUpnpTimeoutElement *aElement)[private]
From MUpnpTimeoutElementParent Callback function. Implementation of MUpnpTimeoutElementParent::TimeoutExpired. If the element is local, it is advertised and new timeout is set. If the element describes a remote device, the device is removed from the library and observer is informed about the disappearing.
Since
Series60 2.0

Parameters

CUpnpTimeoutElement * aElementThe element whose timeout has ran out

Member Data Documentation

RPointerArray< CUpnpDeviceLibraryElement > iElementArray

RPointerArray< CUpnpDeviceLibraryElement >iElementArray[private]

TInt iHandle

TInt iHandle[private]

MUpnpDeviceLibraryObserver & iObserver

MUpnpDeviceLibraryObserver &iObserver[private]

TInt iUpdateId

TInt iUpdateId[protected]