class MXIMPContextObserver |
Interface for XIMP context event observer. This interface must be implemented by the client which is using the XIMP Framework services, to receive status and data notification callbacks from XIMP Framework.
MOwnPresenceEvent
MPresentityGroupListEvent
MPresenceWatcherListEvent
See event interface type specific documentation for further information about different event types.
void CMyObserverClass::HandlePresenceContextEvent( const MXIMPContext& aContext, const MXIMPBase& aEvent ) { switch( aEvent.GetInterfaceId() ) { case MXIMPRequestCompleteEvent::KInterfaceId: { const MXIMPRequestCompleteEvent* complEvent = TXIMPGetInterface< const MXIMPRequestCompleteEvent >::From( aEvent, MXIMPBase::EPanicIfUnknown ); // Do here request complete event specific handling complEvent->RequestId(); break; } case MXIMPContextStateEvent::KInterfaceId: { const MXIMPContextStateEvent* ctxtStateEvent = TXIMPGetInterface< const MXIMPContextStateEvent >::From( aEvent, MXIMPBase::EPanicIfUnknown ); // Do here context state event specific handling ctxtStateEvent->ContextState(); break; } default: { // New event types may be introduced in newer XIMP Framework // versions, so handle unknown event types gracefully. break; } } }
Public Member Functions | |
---|---|
void | HandlePresenceContextEvent(const MXIMPContext &, const MXIMPBase &) |
TAny * | PresenceContextObserverExtensionOrNull(TInt32) |
Protected Member Functions | |
---|---|
~MXIMPContextObserver() |
~MXIMPContextObserver | ( | ) | [protected, inline, virtual] |
Protected destructor. Observer instancies can't be destroyed via this interface.
void | HandlePresenceContextEvent | ( | const MXIMPContext & | aContext, |
const MXIMPBase & | aEvent | |||
) | [pure virtual] |
Event callback.
Events are delivered as MXIMPBase typed objects to client. Client can use MXIMPBase::GetInterfaceId() to determine the real event interface type.
const MXIMPContext & aContext | Presence context object from where this event is coming. Provided as reference for client, so client can distinguish events from different contexts. |
const MXIMPBase & aEvent | The event object. Client can use MXIMPBase::GetInterfaceId() to determine real event type and TXIMPGetInterface helper to cast base typed object to real event interface. Object ownership isn't transfered to client. |
TAny * | PresenceContextObserverExtensionOrNull | ( | TInt32 | aInterfaceId | ) | [inline, virtual] |
Extension point for this observer interface.
Returns an pointer to MXIMPContextObserver extension interface or NULL if the concrete observer implementation doesn't support requested extension.
TInt32 aInterfaceId | Interface ID identifying the requested extension interface. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.