CUpnpDispatcher Class Reference

class CUpnpDispatcher : public CBase

This class represents a logical unit between UPnP devices / control points and Message Handler. Message Handler is a Symbian Server - thus, dispatcher follows the same client/server framework and is a client that opens a session to Message Handler. This is not done by class CUpnpDispatcher; the class RUpnpDispatcherSession represents the client interface.

Using AddCustomer/RemoveCustomer functions it is possible to set the active services. Dispatcher is able to forward messages to its customers.

Also SendMessage function is very essential part of the dispatcher.

Inherits from

Public Member Functions
~CUpnpDispatcher()
IMPORT_C voidAddCustomer(const MUpnpDispatcherCustomer &)
IMPORT_C voidAddCustomerL(const MUpnpDispatcherCustomer &, TBool)
IMPORT_C voidAddLocalDeviceL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const CDesC8Array &, const TBool)
voidDeviceListReceivedL(TInt)
IMPORT_C TInetAddrHttpServerAddress()
const HBufC8 *MacAddressL()
IMPORT_C CUpnpDispatcher *NewL(MUpnpDiscoveryObserver *)
IMPORT_C CUpnpDispatcher *NewLC(MUpnpDiscoveryObserver *)
IMPORT_C voidRemoveCustomer(const MUpnpDispatcherCustomer &)
IMPORT_C voidRemoveCustomer(const MUpnpDispatcherCustomer &, TBool)
voidRemoveLocalDeviceL(const TDesC8 &, TBool)
IMPORT_C voidSearchL(const TDesC8 &)
IMPORT_C voidSearchL(const TDesC16 &)
IMPORT_C voidSendMessageL(CUpnpHttpMessage *, MUpnpDispatcherCustomer &, TBool)
voidSetTransactionCreator(MUpnpHttpServerTransactionCreator *)
IMPORT_C voidStartHttpServerL(TBool, const TInt)
IMPORT_C voidStartIPFilteringL()
IMPORT_C voidStopFilteringL(const TDesC8 &)
IMPORT_C voidStopHttpServer()
IMPORT_C voidStopIPFiltering()
IMPORT_C voidUpdateDevicesL(TInt)
Private Member Functions
CUpnpDispatcher(MUpnpDiscoveryObserver *)
voidConstructL()
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()
Private Member Enumerations
enumTState { EReceiving, ESending }
Private Attributes
CUpnpDispatcherEngine *iEngine
MUpnpDiscoveryObserver *iParent
TInt iUpdateId

Constructor & Destructor Documentation

CUpnpDispatcher(MUpnpDiscoveryObserver *)

CUpnpDispatcher(MUpnpDiscoveryObserver *aParent)[private]

CUpnpDispatcher

Perform the first phase of two phase construction

Parameters

MUpnpDiscoveryObserver * aParent

~CUpnpDispatcher()

IMPORT_C~CUpnpDispatcher()[virtual]

Destroy the object and release all memory objects

Member Functions Documentation

AddCustomer(const MUpnpDispatcherCustomer &)

IMPORT_C voidAddCustomer(const MUpnpDispatcherCustomer &aCustomer)

Add a customer to the customer list of this dispatcher. In practice, means that messages start being forwarded to that customer.

Parameters

const MUpnpDispatcherCustomer & aCustomerThe customer to be added.

AddCustomerL(const MUpnpDispatcherCustomer &, TBool)

IMPORT_C voidAddCustomerL(const MUpnpDispatcherCustomer &aCustomer,
TBoolaIsCP
)

Add a customer to the customer list of this dispatcher. In practice, means that messages start being forwarded to that customer.

Parameters

const MUpnpDispatcherCustomer & aCustomerThe customer to be added.
TBool aIsCPThe customer is control point.

AddLocalDeviceL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const CDesC8Array &, const TBool)

IMPORT_C voidAddLocalDeviceL(const TDesC8 &aUuid,
const TDesC8 &aDeviceType,
const TDesC8 &aDescriptionPath,
const CDesC8Array &aServices,
const TBoolaIsRootDevice
)

Adds a local device to Message Handler's device library.

Parameters

const TDesC8 & aUuidUUID of the device.
const TDesC8 & aDeviceTypeDevice type of the device (e.g MediaServer:1)
const TDesC8 & aDescriptionPathURL to device description.
const CDesC8Array & aServicesList of services this device provides.
const TBool aIsRootDeviceETrue, if this device is UPnP root device, \ EFalse otherwise.

ConstructL()

voidConstructL()[private]

ConstructL

Perform the second phase construction of a CUpnpDispatcher object

DeviceListReceivedL(TInt)

voidDeviceListReceivedL(TIntaUpdateId)[virtual]

Parameters

TInt aUpdateId

HttpServerAddress()

IMPORT_C TInetAddrHttpServerAddress()

Returns HTTP server address.

MacAddressL()

const HBufC8 *MacAddressL()

Returns an active interface's Hardware (MAC) address.

NewL(MUpnpDiscoveryObserver *)

IMPORT_C CUpnpDispatcher *NewL(MUpnpDiscoveryObserver *aParent)[static]

Create a CUpnpDispatcher object using two phase construction, and return a pointer to the created object.

A session with Message Handler is initiated during the construction.

Parameters

MUpnpDiscoveryObserver * aParent

NewLC(MUpnpDiscoveryObserver *)

IMPORT_C CUpnpDispatcher *NewLC(MUpnpDiscoveryObserver *aParent)[static]

Create a CUpnpDispatcher object using two phase construction, and return a pointer to the created object

A session with Message Handler is initiated during the construction.

Parameters

MUpnpDiscoveryObserver * aParentthe object to be used to handle updates from the server

RemoveCustomer(const MUpnpDispatcherCustomer &)

IMPORT_C voidRemoveCustomer(const MUpnpDispatcherCustomer &aCustomer)

Remove a customer from the customer list of this dispatcher. In practice, means that messages stop being forwarded to that customer.

Parameters

const MUpnpDispatcherCustomer & aCustomerThe customer to be removed.

RemoveCustomer(const MUpnpDispatcherCustomer &, TBool)

IMPORT_C voidRemoveCustomer(const MUpnpDispatcherCustomer &aCustomer,
TBoolaIsCP
)

Remove a customer from the customer list of this dispatcher. In practice, means that messages stop being forwarded to that customer.

Parameters

const MUpnpDispatcherCustomer & aCustomerThe customer to be removed.
TBool aIsCPThe customer is control point.

RemoveLocalDeviceL(const TDesC8 &, TBool)

voidRemoveLocalDeviceL(const TDesC8 &aUuid,
TBoolaSilent
)

Removes a local device from Message Handler's device library.

Parameters

const TDesC8 & aUuidUUID of the device that is to be removed.
TBool aSilent

SearchL(const TDesC8 &)

IMPORT_C voidSearchL(const TDesC8 &aSearchString)

Sends a SSDP Search with 8-bit searchString.

Parameters

const TDesC8 & aSearchStringString to use in SSDP ST -header.

SearchL(const TDesC16 &)

IMPORT_C voidSearchL(const TDesC16 &aSearchString)

Sends a SSDP Search with 16-bit searchString. This method makes a conversion to 8-bit and then makes the search

Parameters

const TDesC16 & aSearchStringStfing to use in SSDP ST -header.

SendMessageL(CUpnpHttpMessage *, MUpnpDispatcherCustomer &, TBool)

IMPORT_C voidSendMessageL(CUpnpHttpMessage *aMessage,
MUpnpDispatcherCustomer &aCustomer,
TBoolaIsLocal = EFalse
)

Send a message. This function pushes the message to the Message Handler.

Parameters

CUpnpHttpMessage * aMessageThe message to be sent.
MUpnpDispatcherCustomer & aCustomer
TBool aIsLocal = EFalseETrue if is local device, else EFalse if device is local, then action will be send without network layeraMessage has to be EAction type.

SetTransactionCreator(MUpnpHttpServerTransactionCreator *)

voidSetTransactionCreator(MUpnpHttpServerTransactionCreator *aTransactionCreator)
Sets handle to transaction creator interface.
Since
Series60 5.0

Parameters

MUpnpHttpServerTransactionCreator * aTransactionCreatorpointer to object implementing MUpnpHttpServerTransactionCreator interface.

StartHttpServerL(TBool, const TInt)

IMPORT_C voidStartHttpServerL(TBoolaRegister,
const TIntaPort
)

Starts http server

Parameters

TBool aRegisterdetermines if starting error in message handler process will be checked
const TInt aPortstarts server on fixed port

StartIPFilteringL()

IMPORT_C voidStartIPFilteringL()

StopFilteringL(const TDesC8 &)

IMPORT_C voidStopFilteringL(const TDesC8 &aUuids)

Sends a stop filtering request. Device notification will not be stoped in ssdp.

Parameters

const TDesC8 & aUuidsUUids.

StopHttpServer()

IMPORT_C voidStopHttpServer()

Stops http server

StopIPFiltering()

IMPORT_C voidStopIPFiltering()

UpdateDevicesL(TInt)

IMPORT_C voidUpdateDevicesL(TIntaNewId)

Informs upper layers about newly found devices.

Parameters

TInt aNewIdNew update id that needs to be stored.

Member Enumerations Documentation

Enum TState

Enumerators

EReceiving
ESending

Member Data Documentation

CUpnpDispatcherEngine * iEngine

CUpnpDispatcherEngine *iEngine[private]

MUpnpDiscoveryObserver * iParent

MUpnpDiscoveryObserver *iParent[private]

TInt iUpdateId

TInt iUpdateId[private]