Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: msvapi.h
Link against: msgs.lib

Class MMsvSessionObserver

MMsvSessionObserver

Support

Supported from 5.0

Description

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 through CMsvSession.

Defined in MMsvSessionObserver:
EMsvCloseSession, EMsvCorruptedIndexRebuilding, EMsvCorruptedIndexRebuilt, EMsvGeneralError, EMsvMediaAvailable, EMsvMediaChanged, EMsvMediaIncorrect, EMsvMediaUnavailable, EMsvMtmGroupDeInstalled, EMsvMtmGroupInstalled, EMsvServerFailedToStart, EMsvServerReady, EMsvServerTerminated, EMsvStoreCommitted, EMsvStoreCreated, EMsvStoreDeleted, EmsvEntriesChanged, EmsvEntriesDeleted, EmsvEntriesMoved, EmsvEntryCreated, HandleSessionEvent(), HandleSessionEventL(), TMsvSessionEvent

See also:


Event handler


HandleSessionEvent()

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

Support

Withdrawn in 5.1

Description

Indicates an event has occurred—non leaving.

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.

Parameters

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


HandleSessionEventL()

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

Support

Supported from 5.1

Description

Indicates an event has occurred—leaving.

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.

Parameters

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

[Top]


Enumerations


Enum TMsvSessionEvent

TMsvSessionEvent

Description

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. aArg2 is the TMsvId of the parent entry.

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.This is not used after EPOC R5.

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.

EMsvMediaChanged

The Message Server has automatically changed the index location to use the internal disk.aArg1 is a TDriveNumber value that identifies the drive used by the Message Server to hold the index prior to the change. aArg2 is also a TDriveNumber value; it identifies the new drive that the Message Server is using.CMsvEntry contexts either refresh themselves or mark themselves invalid.

EMsvMediaUnavailable

The media (disk) containing the Message Server index has been removed. aArg1 is a TDriveNumber value that identifies the drive that is no longer available.Future requests may fail with KMsvMediaUnavailable. A EMsvMediaChanged event may be received in the future, as the Message Server switches back to the internal drive.

EMsvMediaAvailable

The disk containing the Message Store is available again.aArg1 is a TDriveNumber value that identifies the drive that is being used.The Message Server can now operate as normal. No client action is necessary.

EMsvMediaIncorrect

An incorrect disk is inserted. aArg1 is a TDriveNumber value that identifies the drive in which the incorrect disk has been inserted.Some requests may fail with KMsvMediaIncorrect. Clients may get an EMsvMediaChanged event in the future telling them that the Message Server has switched back to the internal drive.

EMsvMediaIncorrect

An incorrect disk is inserted. aArg1 is a TDriveNumber value that identifies the drive in which the incorrect disk has been inserted.Some requests may fail with KMsvMediaIncorrect. Clients may get an EMsvMediaChanged event in the future telling them that the Message Server has switched back to the internal drive.

EMsvCorruptedIndexRebuilding

The Message Server has started to rebuild its index after it has been corrupted.