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 void AddInfoL (const TUpnpAddLocalDevice *, const TDesC8 &, const TInetAddr &)
IMPORT_C void AddInfoL (const TUpnpAddLocalDevice *, const TDesC8 &)
IMPORT_C void AddInfoL ( CUpnpSsdpMessage *)
IMPORT_C RPointerArray < CUpnpDeviceLibraryElement > & DeviceList ()
IMPORT_C TInt Find (const TDesC8 &)
IMPORT_C void GetUpdate ( TInt &, TUpnpDevice *&, TUpnpService *&, TInt &, TInt &)
IMPORT_C CUpnpDeviceLibrary * NewL ( MUpnpDeviceLibraryObserver &, TInt )
IMPORT_C void PrepareShutdown ()
IMPORT_C void RemoveAllDevicesL ()
IMPORT_C void RemoveL (const TDesC8 &)
IMPORT_C void RemoveSilentL (const TDesC8 &)
IMPORT_C void StopFilteringDeviceL (const TDesC8 &)
Protected Member Functions
void RemoveDeviceL ( CUpnpSsdpMessage *)
Private Member Functions
CUpnpDeviceLibrary ( MUpnpDeviceLibraryObserver &, TInt )
TBool AddDeviceL ( CUpnpSsdpMessage *)
void AppendLocalDeviceL (const TUpnpAddLocalDevice *, const TDesC8 &, const TInetAddr &)
void ConstructL ()
CUpnpDeviceLibraryElement * Element ( TDesC8 &)
void InvalidateNonLocalDevice ( CUpnpDeviceLibraryElement &)
void TimeoutExpiredL ( 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,
TInt aHandle
) [private]

C++ default constructor.

Parameters

MUpnpDeviceLibraryObserver & aObserver The observer of the library.
TInt aHandle the 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 void AddInfoL ( 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 * aIndex An indexing structure to parse the actual data
const TDesC8 & aBuffer A buffer containing the actual data
const TInetAddr & aLocalAddr Local address

AddInfoL(const TUpnpAddLocalDevice *, const TDesC8 &)

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

Parameters

const TUpnpAddLocalDevice * aIndex An indexing structure to parse the actual data
const TDesC8 & aBuffer A buffer containing the actual data

AddInfoL(CUpnpSsdpMessage *)

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

Parameters

CUpnpSsdpMessage * aMessage A SSDP message containing data

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

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

Creates and appends local device.

Parameters

const TUpnpAddLocalDevice * aIndex descriptiors positions structure needed by deserialization algorithm
const TDesC8 & aBuffer aBuffer CUpnpDeviceLibraryElement object in serialized form
const TInetAddr & aLocalAddr local address of device being added

ConstructL()

void ConstructL ( ) [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 TInt Find ( const TDesC8 & aUuid )
Returns the index of an element with matching UUID.
Since
Series60 2.0

Parameters

const TDesC8 & aUuid The UUID of searched device

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

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

void InvalidateNonLocalDevice ( 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,
TInt aHandle
) [static]

Two-phased constructor.

Parameters

MUpnpDeviceLibraryObserver & aObserver The observer of the library.
TInt aHandle the thread log handle

PrepareShutdown()

IMPORT_C void PrepareShutdown ( )
Prepare for shutdown.
Since
Series60 2.0

RemoveAllDevicesL()

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

RemoveDeviceL(CUpnpSsdpMessage *)

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

Parameters

CUpnpSsdpMessage * aMessage

RemoveL(const TDesC8 &)

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

Parameters

const TDesC8 & aUuid The UUID of the element to be removed

RemoveSilentL(const TDesC8 &)

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

Parameters

const TDesC8 & aUuid The UUID of the element to be removed

StopFilteringDeviceL(const TDesC8 &)

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

Parameters

const TDesC8 & aUuid Device Uuid

TimeoutExpiredL(CUpnpTimeoutElement *)

void TimeoutExpiredL ( 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 * aElement The 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]