class CMsvSession : public CActive |
Represents a channel of communication between a client thread (Client-side MTM, User Interface MTM, or message client application) and the Message Server thread.
The class provides the means by which clients are notified when important Message Server events occur.
Note the following significant groups of functions:
Creation functions: a message client application must use OpenSyncL() or OpenASyncL() to create a session object, before it can instantiate any MTM or CMsvEntry object. Only a single session should be created within a thread. As Client-side MTM, User Interface MTM, and CMsvEntry objects are created in the client thread, these use the client session, and do not create their own. Note that to close a session, delete all objects relying on that session, and then the session object itself.
Cleanup functions: CMsvSession provides the ability to handle the cleanup of entries in the event of a leave occurring, in a very similar manner to the standard cleanup stack. The difference is that, on a leave, any entries that are on the entry cleanup stack are removed from the Message Server. The implementation uses the standard cleanup stack, so entry push and pop functions should be used in the same order as all other types of push and pop. The functions can be used both by MTM implementations and message client applications.
Protected Member Functions | |
---|---|
CMsvSession(MMsvSessionObserver &) | |
CMsvSession(MMsvSessionObserver &, RFs &) | |
CMsvSession(MMsvSessionObserver &, TInt) | |
CMsvSession(MMsvSessionObserver &, RFs &, TInt) | |
void | CheckDrive() |
void | ConstructAsObserverL() |
void | ConstructL(TBool) |
void | DoCancel() |
IMPORT_C TInt | OperationId() |
TInt | RunError(TInt) |
void | RunL() |
IMPORT_C RMsvServerSession & | Session() |
Private Member Functions | |
---|---|
void | CleanupEntryDelete() |
void | CreateSessionLogL() |
void | DoHandleNotifyL(TMsvNotifBuffer &) |
void | DoRunL(TMsvNotifBuffer &) |
void | GetMessageFolderL() |
void | HandleNotifyL() |
void | Log(TRefByValue< const TDesC >, ...) |
void | NotifyAllObserversL(MMsvSessionObserver::TMsvSessionEvent, TAny *, TAny *, TAny *) |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Inherited Attributes | |
---|---|
CActive::iStatus |
CMsvSession | ( | MMsvSessionObserver & | aObserver | ) | [protected] |
MMsvSessionObserver & aObserver |
CMsvSession | ( | MMsvSessionObserver & | aObserver, |
RFs & | aFs | ||
) | [protected] |
MMsvSessionObserver & aObserver | |
RFs & aFs |
CMsvSession | ( | MMsvSessionObserver & | aObserver, |
TInt | aPriority | ||
) | [protected] |
MMsvSessionObserver & aObserver | |
TInt aPriority |
CMsvSession | ( | MMsvSessionObserver & | aObserver, |
RFs & | aFs, | ||
TInt | aPriority | ||
) | [protected] |
MMsvSessionObserver & aObserver | |
RFs & aFs | |
TInt aPriority |
IMPORT_C void | AddObserverL | ( | MMsvSessionObserver & | aObserver | ) |
MMsvSessionObserver & aObserver |
IMPORT_C void | ChangeAttributesL | ( | const CMsvEntrySelection & | aSelection, |
TUint | aSetAttributes, | |||
TUint | aClearAttributes | |||
) |
const CMsvEntrySelection & aSelection | |
TUint aSetAttributes | |
TUint aClearAttributes |
IMPORT_C CMsvOperation * | ChangeDriveL | ( | TInt | aDrive, |
TRequestStatus & | aStatus | |||
) |
TInt aDrive | |
TRequestStatus & aStatus |
IMPORT_C CMsvOperation * | CopyStoreL | ( | const TDriveUnit & | aDrive, |
TRequestStatus & | aStatus | |||
) |
const TDriveUnit & aDrive | |
TRequestStatus & aStatus |
IMPORT_C TInt | DeInstallMtmGroup | ( | const TDesC & | aFullName | ) |
const TDesC & aFullName |
IMPORT_C void | DecPcSyncCountL | ( | const CMsvEntrySelection & | aSelection | ) |
const CMsvEntrySelection & aSelection |
IMPORT_C CMsvOperation * | DeleteStoreL | ( | const TDriveUnit & | aDrive, |
TRequestStatus & | aStatus | |||
) |
const TDriveUnit & aDrive | |
TRequestStatus & aStatus |
void | DoCancel | ( | ) | [protected, virtual] |
Implements cancellation of an outstanding request.
This function is called as part of the active object's Cancel().
It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.
DoCancel() must not wait for event completion; this is handled by Cancel().
void | DoHandleNotifyL | ( | TMsvNotifBuffer & | aBuffer | ) | [private] |
TMsvNotifBuffer & aBuffer |
void | DoRunL | ( | TMsvNotifBuffer & | aBuffer | ) | [private] |
TMsvNotifBuffer & aBuffer |
IMPORT_C TBool | DriveContainsStoreL | ( | TDriveUnit | aDrive | ) |
TDriveUnit aDrive |
IMPORT_C void | GetChildIdsL | ( | TMsvId | aId, |
const CMsvEntryFilter & | aFilter, | |||
CMsvEntrySelection & | aSelection | |||
) |
TMsvId aId | |
const CMsvEntryFilter & aFilter | |
CMsvEntrySelection & aSelection |
IMPORT_C TInt | GetEntry | ( | TMsvId | aId, |
TMsvId & | aService, | |||
TMsvEntry & | aEntry | |||
) |
IMPORT_C void | GetMtmRequiredCapabilitiesL | ( | TUid | aMtmTypeUid, |
TCapabilitySet & | aCapSet | |||
) | const |
TUid aMtmTypeUid | |
TCapabilitySet & aCapSet |
IMPORT_C void | IncPcSyncCountL | ( | const CMsvEntrySelection & | aSelection | ) |
const CMsvEntrySelection & aSelection |
IMPORT_C TInt | InstallMtmGroup | ( | const TDesC & | aFullName | ) |
const TDesC & aFullName |
void | Log | ( | TRefByValue< const TDesC > | aFmt, |
... | ||||
) | [private] |
TRefByValue< const TDesC > aFmt | |
... |
void | NotifyAllObserversL | ( | MMsvSessionObserver::TMsvSessionEvent | aEvent, |
TAny * | aArg1, | |||
TAny * | aArg2, | |||
TAny * | aArg3 | |||
) | [private] |
MMsvSessionObserver::TMsvSessionEvent aEvent | |
TAny * aArg1 | |
TAny * aArg2 | |
TAny * aArg3 |
IMPORT_C CMsvSession * | OpenAsObserverL | ( | MMsvSessionObserver & | aObserver | ) | [static] |
MMsvSessionObserver & aObserver |
IMPORT_C CMsvSession * | OpenAsObserverL | ( | MMsvSessionObserver & | aObserver, |
RFs & | aFs | |||
) | [static] |
MMsvSessionObserver & aObserver | |
RFs & aFs |
IMPORT_C CMsvSession * | OpenAsObserverL | ( | MMsvSessionObserver & | aObserver, |
TInt | aPriority | |||
) | [static] |
MMsvSessionObserver & aObserver | |
TInt aPriority |
IMPORT_C CMsvSession * | OpenAsObserverL | ( | MMsvSessionObserver & | aObserver, |
RFs & | aFs, | |||
TInt | aPriority | |||
) | [static] |
MMsvSessionObserver & aObserver | |
RFs & aFs | |
TInt aPriority |
IMPORT_C CMsvSession * | OpenAsyncL | ( | MMsvSessionObserver & | aObserver | ) | [static] |
MMsvSessionObserver & aObserver |
IMPORT_C CMsvSession * | OpenAsyncL | ( | MMsvSessionObserver & | aObserver, |
RFs & | aFs | |||
) | [static] |
MMsvSessionObserver & aObserver | |
RFs & aFs |
IMPORT_C CMsvSession * | OpenAsyncL | ( | MMsvSessionObserver & | aObserver, |
TInt | aPriority | |||
) | [static] |
MMsvSessionObserver & aObserver | |
TInt aPriority |
IMPORT_C CMsvSession * | OpenAsyncL | ( | MMsvSessionObserver & | aObserver, |
RFs & | aFs, | |||
TInt | aPriority | |||
) | [static] |
MMsvSessionObserver & aObserver | |
RFs & aFs | |
TInt aPriority |
IMPORT_C CMsvSession * | OpenSyncL | ( | MMsvSessionObserver & | aObserver | ) | [static] |
MMsvSessionObserver & aObserver |
IMPORT_C CMsvSession * | OpenSyncL | ( | MMsvSessionObserver & | aObserver, |
RFs & | aFs | |||
) | [static] |
MMsvSessionObserver & aObserver | |
RFs & aFs |
IMPORT_C CMsvSession * | OpenSyncL | ( | MMsvSessionObserver & | aObserver, |
TInt | aPriority | |||
) | [static] |
MMsvSessionObserver & aObserver | |
TInt aPriority |
IMPORT_C CMsvSession * | OpenSyncL | ( | MMsvSessionObserver & | aObserver, |
RFs & | aFs, | |||
TInt | aPriority | |||
) | [static] |
MMsvSessionObserver & aObserver | |
RFs & aFs | |
TInt aPriority |
IMPORT_C void | RemoveObserver | ( | MMsvSessionObserver & | aObserver | ) |
MMsvSessionObserver & aObserver |
void | RunL | ( | ) | [protected, virtual] |
Handles an active object's request completion event.
A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.
The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.
Before calling this active object's RunL() function, the active scheduler has:
1. decided that this is the highest priority active object with a completed request
2. marked this active object's request as complete (i.e. the request is no longer outstanding)
RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.
Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.
CActiveScheduler::WaitForAnyRequest
TRAPD
IMPORT_C TInt | ServiceAccessPointId | ( | TMsvId | aServiceId, |
TUint32 & | aAccessPointId | |||
) |
IMPORT_C TInt | SetReceiveEntryEvents | ( | TBool | aReceive | ) |
TBool aReceive |
IMPORT_C CMsvOperation * | TransferCommandL | ( | const CMsvEntrySelection & | aSelection, |
TInt | aCommandId, | |||
const TDesC8 & | aParameter, | |||
TRequestStatus & | aStatus | |||
) |
const CMsvEntrySelection & aSelection | |
TInt aCommandId | |
const TDesC8 & aParameter | |
TRequestStatus & aStatus |
IMPORT_C void | TransferCommandL | ( | const CMsvEntrySelection & | aSelection, |
TInt | aCommandId, | |||
const TDesC8 & | aParameter, | |||
TDes8 & | aProgress | |||
) |
const CMsvEntrySelection & aSelection | |
TInt aCommandId | |
const TDesC8 & aParameter | |
TDes8 & aProgress |
CArrayPtrFlat< MMsvSessionObserver > * | iObservers | [private] |
TBool | iUseSharedFs | [private] |
Specifies whether to use the shared file server session