EPOC   SDK Home Glossary Indexes Previous Next Up

MMsvSessionObserver class


Contents


MMsvSessionObserver class — Session events notification

Section Contents


Overview

Compatibility

Applications that use this class will not work correctly on a version of EPOC earlier than ER5.

Derivation

Not applicable

Defined in

msvapi.h

Description

This mixin class provides the interface for notification of events from a Message Server session. The types of event are given in the enumeration TMsvSessionEvent. Clients must provide an object that implements the interface, and set it to be notified through CMsvSession::OpenSyncL() or CMsvSession::OpenASyncL(). Additional observers can also be added and removed: see Session observers.


Event handler


HandleSessionEvent() — Event handler

virtual void HandleSessionEvent(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3)=0;

Description

The function is called by a session to indicate an event has occurred. The type of event is indicated by the value of aEvent. The interpretation of the TAny arguments depends on this type.

For most event types, the action that is taken, for example, updating the display, is client-specific. All clients though should respond to EMsvCloseSession and EMsvServerTerminated events.

Arguments

TMsvSessionEvent aEvent

Indicates the event type.

TAny* aArg1

Event type-specific argument value

TAny* aArg2

Event type-specific argument value

TAny* aArg3

Event type-specific argument value


Enumerations


TMsvSessionEvent enum — Session event type

EmsvEntryCreated

One or more entries have been created. aArg1 is a CMsvEntrySelection of the new entries. aArg2 is the TMsvId of the parent entry.

EmsvEntriesChanged

One or more index entries have been changed. aArg1 is a CMsvEntrySelection of the index entries.

EmsvEntriesDeleted

One or more entries have been deleted. aArg1 is a CMsvEntrySelection containing the IDs of the deleted entries. aArg2 is the TMsvId of the parent entry.

EmsvEntriesMoved

One or more entries have been moved. aArg1 is a CMsvEntrySelection containing the IDs of the moved entries. aArg2 is the TMsvId of the new parent. aArg3 is the TMsvId of the old parent entry.

EMsvMtmGroupInstalled

A new MTM has been installed. aArg2 points to a TUid for the new MTM.

EMsvMtmGroupDeInstalled

A MTM has been uninstalled. aArg2 points to a TUid of the removed MTM.

EMsvStoreDeleted

A CMsvStore has been deleted. aArg1 points to a CMsvEntrySelection containing the ID of the entry concerned. aArg2 points to the ID of the parent of the entry.

EMsvStoreCommitted

A CMsvStore has been committed. aArg1 points to a CMsvEntrySelection containing the ID of the entry concerned. aArg2 points to the ID of the parent of the entry.

EMsvGeneralError

Something has happening in the server, but this client was unable to retrieve the information. aArg1 points to the error code.

EMsvStoreCreated

An entry has just created a store.

EMsvCloseSession

The client should immediately close the session with the Message Server.

EMsvServerReady

Received after a client has used CMsvSession::OpenAsyncL() to create a session. The session can now be used.

EMsvServerFailedToStart

Received after a client has used CMsvSession::OpenAsyncL() to create a session. The server could not be started, and aArg1 points to the error code.

EMsvCorruptedIndexRebuilt

The Message Server index had been corrupted and had to be rebuilt. All local entries are recovered, but all remote entries have been lost.

EMsvServerTerminated

The Message Server has been terminated. All clients must close their sessions immediately.

EPOC       SDK Home Glossary Indexes Previous Next Up