CMceEvent Class Reference

class CMceEvent : public CBase

Base class for MCE events, inherited by both CMceInEvent and CMceOutEvent.

CMceEvent represents peer-to-peer connection made with remote terminal. This connection is also known as dialog and it is set up using SIP SUBSCRIBE method.

MCE events are typically used for queurying state of some parameter of remote terminal. The queuried parameter is known as event header. The changes of this parameter are notified to another terminal by sending SIP NOTIFY messages.

The event can be finally terminated by either endpoints.

If for any reason instance of this class is deleted while in active state, event is automatically terminated by MCE server.

mceclient.lib

Inherits from

Public Member Functions
~CMceEvent()
IMPORT_C RPointerArray< CMceEvent > *AssociatedEventsL()
IMPORT_C RPointerArray< CMceRefer > *AssociatedRefersL()
IMPORT_C CMceSession *AssociatedSession()
TUint32 DialogId()
voidErrorOccuredL(TInt)
IMPORT_C const TDesC8 &EventHeader()
voidEventReceivedL(TMceIds &)
voidEventReceivedL(TMceIds &, CMceMsgBase &)
voidEventReceivedL(TMceIds &, CMceMsgBase &, HBufC8 *)
CMceItcSender &ITCSender()
TUint32 Id()
TBool IsInEvent()
CMceManager &Manager()
IMPORT_C const TDesC8 &Originator()
TUint32 ProfileId()
IMPORT_C const TDesC8 &Recipient()
IMPORT_C TStateState()
IMPORT_C voidTerminateL(CDesC8Array *, HBufC8 *, HBufC8 *)
Protected Member Functions
CMceEvent(CMceManager &, TUint32, TUint32, TUint32)
voidConstructL(HBufC8 *, HBufC8 *, HBufC8 *, TUint32, CDesC8Array *)
voidPrepareForITC(TMceIds &)
Private Member Functions
voidEventReceivedL(TMceEvent &)
voidHandleEventL(TMceEvent &)
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
enumTState { EIdle, EPending, EActive, ETerminated }
Protected Attributes
TUint32 iDialogId
HBufC8 *iEventHeader
TUint32 iId
CMceManager &iManager
HBufC8 *iOriginator
TUint32 iProfileId
CMceEventReceiver *iReceiver
HBufC8 *iRecipient
TUint32 iRefreshInterval
CMceItcSender *iSender
TState iState
Private Attributes
TAny *iReserved

Constructor & Destructor Documentation

CMceEvent(CMceManager &, TUint32, TUint32, TUint32)

CMceEvent(CMceManager &aManager,
TUint32aProfileId,
TUint32aDialogId,
TUint32aRefreshInterval
)[protected]

C++ default constructor.

Parameters

CMceManager & aManager
TUint32 aProfileId
TUint32 aDialogId
TUint32 aRefreshInterval

~CMceEvent()

~CMceEvent()[virtual]

Destructor.

Member Functions Documentation

AssociatedEventsL()

IMPORT_C RPointerArray< CMceEvent > *AssociatedEventsL()const

Returns the associated events, if any.

AssociatedRefersL()

IMPORT_C RPointerArray< CMceRefer > *AssociatedRefersL()const

Returns the associated refers, if any.

AssociatedSession()

IMPORT_C CMceSession *AssociatedSession()const

Returns the associated session, if any.

ConstructL(HBufC8 *, HBufC8 *, HBufC8 *, TUint32, CDesC8Array *)

voidConstructL(HBufC8 *aEventHeader,
HBufC8 *aRecipient,
HBufC8 *aOriginator,
TUint32aDialogType,
CDesC8Array *aParams
)[protected]

second-phase constructor

Parameters

HBufC8 * aEventHeader
HBufC8 * aRecipient
HBufC8 * aOriginator
TUint32 aDialogType
CDesC8Array * aParams

DialogId()

TUint32 DialogId()const

Dialog ID

ErrorOccuredL(TInt)

voidErrorOccuredL(TIntaError)

Handling of error

Parameters

TInt aErrorthe error

EventHeader()

IMPORT_C const TDesC8 &EventHeader()const

Returns the Event header.

EventReceivedL(TMceIds &)

voidEventReceivedL(TMceIds &aId)

Handles reception of event update

Parameters

TMceIds & aIdid of object whose state is needed to be updated

EventReceivedL(TMceIds &, CMceMsgBase &)

voidEventReceivedL(TMceIds &aId,
CMceMsgBase &aMessage
)

Handles reception of event update

Parameters

TMceIds & aIdid of object whose state is needed to be updated
CMceMsgBase & aMessagethe message

EventReceivedL(TMceIds &, CMceMsgBase &, HBufC8 *)

voidEventReceivedL(TMceIds &aId,
CMceMsgBase &aMessage,
HBufC8 *aContent
)

Handles reception of event update

Parameters

TMceIds & aIdid of object whose state is needed to be updated
CMceMsgBase & aMessagethe message
HBufC8 * aContentthe content

EventReceivedL(TMceEvent &)

voidEventReceivedL(TMceEvent &aEvent)[private]

Traversal event handler

Parameters

TMceEvent & aEventthe event

HandleEventL(TMceEvent &)

voidHandleEventL(TMceEvent &aEvent)[private]

Handles event

Parameters

TMceEvent & aEventthe event

ITCSender()

CMceItcSender &ITCSender()

Gets sender for ITC.

Id()

TUint32 Id()const

ID

IsInEvent()

TBool IsInEvent()const [pure virtual]

Gets the type of the event

Manager()

CMceManager &Manager()

Gets manager

Originator()

IMPORT_C const TDesC8 &Originator()const

Returns the address of the originator

PrepareForITC(TMceIds &)

voidPrepareForITC(TMceIds &aId)[protected]

Prepares ids for ITC

Parameters

TMceIds & aIdITC ids

ProfileId()

TUint32 ProfileId()const

Gets SIP profile id.

Recipient()

IMPORT_C const TDesC8 &Recipient()const

Returns the address of the recipient

State()

IMPORT_C TStateState()const

Returns the state of the event.

TerminateL(CDesC8Array *, HBufC8 *, HBufC8 *)

IMPORT_C voidTerminateL(CDesC8Array *aHeaders = 0,
HBufC8 *aContentType = 0,
HBufC8 *aContent = 0
)
Terminates the event.
Pre-condition
State() == CMceEvent::EActive
Post-condition
State() == CMCEvent::EPending
leave
KErrNotSupported if event cannot be terminated (e.g. event attached to a CMceOutRefer)

Parameters

CDesC8Array * aHeaders = 0
HBufC8 * aContentType = 0
HBufC8 * aContent = 0

Member Enumerations Documentation

Enum TState

Enumerators

EIdle
EPending
EActive
ETerminated

Member Data Documentation

TUint32 iDialogId

TUint32 iDialogId[protected]

dialog id

HBufC8 * iEventHeader

HBufC8 *iEventHeader[protected]

The event header

TUint32 iId

TUint32 iId[protected]

ID

CMceManager & iManager

CMceManager &iManager[protected]

Event manager,not owned

HBufC8 * iOriginator

HBufC8 *iOriginator[protected]

The originator

TUint32 iProfileId

TUint32 iProfileId[protected]

SIP profile id

CMceEventReceiver * iReceiver

CMceEventReceiver *iReceiver[protected]

Event receiver, owned

HBufC8 * iRecipient

HBufC8 *iRecipient[protected]

The recipient

TUint32 iRefreshInterval

TUint32 iRefreshInterval[protected]

The refresh interval

TAny * iReserved

TAny *iReserved[private]

CMceItcSender * iSender

CMceItcSender *iSender[protected]

Sender, owned

TState iState

TState iState[protected]