class CImppServerMtm : public CBaseServerMtm |
Public Member Functions | |
---|---|
~CImppServerMtm () | |
void | ChangeL ( TMsvEntry , TRequestStatus &) |
TBool | CommandExpected () |
void | CopyFromLocalL (const CMsvEntrySelection &, TMsvId , TRequestStatus &) |
void | CopyToLocalL (const CMsvEntrySelection &, TMsvId , TRequestStatus &) |
void | CopyWithinServiceL (const CMsvEntrySelection &, TMsvId , TRequestStatus &) |
void | CreateL ( TMsvEntry , TRequestStatus &) |
void | DeleteAllL (const CMsvEntrySelection &, TRequestStatus &) |
const TDesC8 & | MobilityProgress () |
void | MoveToLocalL (const CMsvEntrySelection &, TMsvId , TRequestStatus &) |
void | MoveWithinServiceL (const CMsvEntrySelection &, TMsvId , TRequestStatus &) |
void | NewCarrierActive ( TAccessPointInfo , TBool ) |
IMPORT_C CImppServerMtm * | NewL ( CRegisteredMtmDll &, CMsvServerEntry *) |
void | PrepareForNewCarrier ( TImMobilityAction , TBool ) |
const TDesC8 & | Progress () |
void | StartCommandL ( CMsvEntrySelection &, TInt , const TDesC8 &, TRequestStatus &) |
Protected Member Functions | |
---|---|
TInt | Extension_ ( TUint , TAny *&, TAny *) |
Public Member Enumerations | |
---|---|
enum | TPopOpStopType { EPopStopOpBearerLost , EPopStopOpImmediate , EPopStopOpNormal } |
Private Member Enumerations | |
---|---|
enum | TImppCopyMethod { EImppCopy , EImppMove , EImppPopulate } |
enum |
TPopMigrateState
{
ENotMigrating , EWaitingForOpToStop , EWaitingForOpToComplete , EDisconnectingForMigrate , EWaitingForNewCarrier , EWaitingCarrierRejected , EConnectingAfterMigrate } |
enum |
TPopsMtmState
{
EPopConnecting , EPopRefreshing , EPopCopying , EPopMoving , EPopDeleting , EPopQuitting , EPopTidying , EPopConnectedAndIdle , EPopDisconnected , EPopPopulating , EPopAddingOfflineOp , EPopFindingFirstOfflineOp , EPopCancellingOfflineOps , EPopTopPopulating , EPopAuthoriseAndConnect } |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Inherited Attributes | |
---|---|
CActive::iStatus | |
CBaseServerMtm::iServerEntry |
CImppServerMtm | ( | CRegisteredMtmDll & | aPopServerMtmDll, |
CMsvServerEntry * | aEntry | ||
) | [private] |
CRegisteredMtmDll & aPopServerMtmDll | |
CMsvServerEntry * aEntry |
void | AddOfflineOperationL | ( | const CMsvEntrySelection & | aSelection, |
TMsvId | aDestination, | |||
CImOffLineOperation::TOffLineOpType | aOperationType, | |||
TRequestStatus & | aStatus | |||
) | [private] |
const CMsvEntrySelection & aSelection | |
TMsvId aDestination | |
CImOffLineOperation::TOffLineOpType aOperationType | |
TRequestStatus & aStatus |
void | CancelOfflineOperationsL | ( | const CMsvEntrySelection & | aSelection, |
TRequestStatus & | aStatus | |||
) | [private] |
const CMsvEntrySelection & aSelection | |
TRequestStatus & aStatus |
void | ChangeL | ( | TMsvEntry | aNewEntry, |
TRequestStatus & | aStatus | |||
) | [virtual] |
Updates a remote entry with relevant data when called by the Message Server.
Implementations should provide this function if the messaging protocol supports updating of remote entries. If this is not supported, implementations should leave with KErrNotSupported.
The Server-side MTM implementation must decide what information in the TMsvEntry is relevant to the remote entry, and translate it appropriately for the specific protocol. Most of the data contained in the TMsvEntry is specific to the Symbian OS Message Server, and would probably have no direct correlation with the protocol's own storage format. Some entry data may however be useful. For example, if the protocol supports remote renaming of folders, the implementation could:
1. check for a folder type entry
2. extract the folder name from aNewEntry.iDetails
3. check if the folder name has changed by comparing the new name with iDetails in the index entry currently; if not, complete with KErrNone
4. initiate a protocol-specific action to rename the remote folder
The implementation should also always update the local Message Server index through CMsvServerEntry::ChangeL().
TMsvEntry aNewEntry | Data by which to update entry |
TRequestStatus & aStatus | Asynchronous completion word for the operation. |
TBool | CommandExpected | ( | ) | [virtual] |
Tests if the Server-side MTM object should be deleted when called by the Message Server
It is useful to stop the MTM being deleted when more commands are expected shortly. This would be the case, for example, after receiving a command to go online.
If there are no more commands expected by the Server-side MTM object, then the function should return EFalse, and the Message Server will delete it.
void | CompleteCurrentOpForMigration | ( | ) | [private] |
Handles the completion of operations in order to migrate. This is called by the PrepareForNewCarrier() function, when it is called by the mobility manager with the mobility action CompleteCurrentOpForMigration.
void | CopyFromLocalL | ( | const CMsvEntrySelection & | aSelection, |
TMsvId | aDestination, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Copies a selection of entries from a local location to a remote location.
Requirements:
Implementations should provide this function if the messaging protocol supports retrieval of remote entries. If this is not supported, implementations should leave with KErrNotSupported.
Implementations of this function have three fundamental steps:
1. reading entry data
2. converting entry data from the Message Server format into that required by the protocol
3. doing the transfer operation using the appropriate communications protocols
const CMsvEntrySelection & aSelection | The collection of message index entries for which the copy is required |
TMsvId aDestination | The entry ID of the service by which the entries should be transferred |
TRequestStatus & aStatus | Asynchronous completion word for the operation |
void | CopyToLocalL | ( | const CMsvEntrySelection & | aSelection, |
TMsvId | aDestination, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Copies a selection of entries from a remote location to a local location. This will only be meaningful for some protocols.
Requirements:
Implementations should provide this function if the messaging protocol supports retrieval of remote entries. If this is not supported, implementations should leave with KErrNotSupported.
Implementations of this function have three fundamental steps:
1. doing the transfer operation using the appropriate communications protocols
2. converting protocol-specific data into the three-part storage format (index entry, message store, binary files) required by the Message Server
3. updating entries in the Message Server
const CMsvEntrySelection & aSelection | The collection of message index entries for which the copy/moving is required. |
TMsvId aDestination | The entry ID to which the selection is to be copied |
TRequestStatus & aStatus | Asynchronous completion word for the operation |
void | CopyWithinServiceL | ( | const CMsvEntrySelection & | aSelection, |
TMsvId | aDestination, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Copies a selection of entries within a remote location.
Requirements:
Implementations should provide this function if the messaging protocol supports the ability to copy entries within a remote service. If this is not supported, implementations should leave with KErrNotSupported.
const CMsvEntrySelection & aSelection | The collection of message index entries for which the copy is required |
TMsvId aDestination | The server entry ID to which the selection is to be copied |
TRequestStatus & aStatus | Asynchronous completion word for the operation |
void | CreateL | ( | TMsvEntry | aNewEntry, |
TRequestStatus & | aStatus | |||
) | [virtual] |
Creates a new remote entry with relevant data when called by the Message Server.
Implementations should provide this function if the messaging protocol supports creation of remote entries. If this is not supported, implementations should leave with KErrNotSupported.
As with ChangeL() , the Server-side MTM implementation must decide what information in the TMsvEntry is relevant to the remote entry, and translate it appropriately for the specific protocol. Most of the data contained in the TMsvEntry is specific to the Message Server, and would probably have no direct correlation with the protocol's own storage format. For example, for a folder, probably only the name and parent are needed, so if the protocol supports creation of remote folders, the implementation could:
1. check for a folder type entry
2. get the folder name and parent details from aNewEntry
3. initiate a protocol-specific action to create the remote folder
TMsvEntry aNewEntry | Data by which to create entry |
TRequestStatus & aStatus | Asynchronous completion word for the operation. |
void | DeleteAllL | ( | const CMsvEntrySelection & | aSelection, |
TRequestStatus & | aStatus | |||
) | [virtual] |
Deletes each entry in the supplied selection when called by the message Server. If any of the entries in the selection is a parent entry, then all its children should also be deleted, recursively to the bottom of the ownership tree.
Implementations should provide this function if the messaging protocol supports deletion of remote entries. If this is not supported, implementations should leave with KErrNotSupported.
const CMsvEntrySelection & aSelection | The collection of entries that are to be deleted. |
TRequestStatus & aStatus | Asynchronous completion object. |
void | DoCancel | ( | ) | [private, 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 | DoCancelCurrentOp | ( | ) | [private] |
Cancel according to iState.iCurrentOperation
If the cancel is to allow a migration, the operation object in use is cancelled, but not deleted. This means it is possible to restart it later.
void | DoComplete | ( | TInt | aError | ) | [private, virtual] |
TInt aError | The leave code given by DoRunL(). |
void | DoConnectL | ( | TRequestStatus & | aStatus, |
CMsvEntrySelection & | aSelection | |||
) | [private] |
TRequestStatus & aStatus | |
CMsvEntrySelection & aSelection |
void | DoQuitL | ( | TRequestStatus & | aStatus | ) | [private] |
TRequestStatus & aStatus |
void | DoRunL | ( | ) | [private, virtual] |
Handles the completion of any asynchronous requests that it makes. It is called from the base class RunL() .
Note that any leaves made by this function result in DoComplete() being called with the leave code.
void | DoTopPopulateL | ( | const CMsvEntrySelection & | aSelection, |
TInt | aLimit, | |||
TRequestStatus & | aStatus | |||
) | [private] |
const CMsvEntrySelection & aSelection | |
TInt aLimit | |
TRequestStatus & aStatus |
TInt | Extension_ | ( | TUint | aExtensionId, |
TAny *& | a0, | |||
TAny * | a1 | |||
) | [protected, virtual] |
The extension method provides a polymorphic behaviour to call the correct MTM.
TInt | GetNonOperationMtmData | ( | TNonOperationMtmDataType | aMtmDataType, |
TPtrC8 & | aMtmDataBuffer | |||
) | [private] |
TNonOperationMtmDataType aMtmDataType | |
TPtrC8 & aMtmDataBuffer |
void | GetPopDetailsL | ( | const CMsvEntrySelection & | aSel | ) | [private] |
const CMsvEntrySelection & aSel |
void | GetSystemProgress | ( | TMsvSystemProgress & | aSysProg | ) | [private] |
TMsvSystemProgress & aSysProg |
const TDesC8 & | MobilityProgress | ( | ) | [virtual] |
Returns Progress info for Migration purposes
void | MoveToLocalL | ( | const CMsvEntrySelection & | aSelection, |
TMsvId | aDestination, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Moves a selection of entries from a remote location to a local location.
Requirements:
Implementations should provide this function if the messaging protocol supports retrieval of remote entries. If this is not supported, implementations should leave with KErrNotSupported.
Implementations of this function have three fundamental steps:
1. doing the transfer operation using the appropriate communications protocols
2. converting protocol-specific data into the three-part storage format (index entry, message store, binary files) required by the Message Server
3. updating entries in the Message Server
MoveToLocalL() should differ from CopyToLocalL() in additionally deleting the original remote data.
const CMsvEntrySelection & aSelection | The collection of message index entries for which the moving is required. |
TMsvId aDestination | The entry ID to which the selection is to be copied/moved |
TRequestStatus & aStatus | Asynchronous completion word for the operation |
void | MoveWithinServiceL | ( | const CMsvEntrySelection & | aSelection, |
TMsvId | aDestination, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Moves a selection of entries within a remote location.
Requirements:
Implementations should provide this function if the messaging protocol supports the ability to move entries within a remote service. If this is not supported, implementations should leave with KErrNotSupported.
The implementation of MoveWithinServiceL() should differ from CopyWithinServiceL() in additionally deleting the original data.
const CMsvEntrySelection & aSelection | The collection of message index entries for which the move is required |
TMsvId aDestination | The server entry ID to which the selection is to be moved |
TRequestStatus & aStatus | Asynchronous completion word for the operation |
void | NewCarrierActive | ( | TAccessPointInfo | aNewAp, |
TBool | aIsSeamless | |||
) |
Notice that the New Carrier is now active and the server MTM can make connections on it. Once this notice is received from the Mobility Manager, the Server MTM can create a new session on it and restart any awaiting operations on the New Carrier. These could be operations that were stopped mid-way and need resuming from there or operations(requests) that were cancelled and need starting from beginning.
TAccessPointInfo aNewAp | |
TBool aIsSeamless | - Flag to indicate whether the migration is seamless. |
IMPORT_C CImppServerMtm * | NewL | ( | CRegisteredMtmDll & | aPopServerMtmDll, |
CMsvServerEntry * | aEntry | |||
) | [static] |
CRegisteredMtmDll & aPopServerMtmDll | |
CMsvServerEntry * aEntry |
void | PrepareForNewCarrier | ( | TImMobilityAction | aAction, |
TBool | aIsSeamless | |||
) |
Notice that a preferred carrier has become available, and migration to that bearer has been accepted. The Pop Server MTM shall either pause or allow any current operation to complete according to the action specified in parameter aAction. Once the current operation is paused or complete, the Pop Server MTM shall close any existing sockets and finally notify the mobility framework that it is ready to migrate to the new carrier.
TImMobilityAction aAction | - indicates the action that should be taken re: current operations |
TBool aIsSeamless | - indicates if the Bearer is seamless. |
const TDesC8 & | Progress | ( | ) | [virtual] |
This function is called by the Message Server to get progress information for the current asynchronous operation.
The call is made as a response to a client program requesting progress information through CMsvOperation::ProgressL() . The packing format used in the TDesC8 is MTM-specific. Only the implementation of the User Interface MTM progress information functions need to understand the format.
The progress buffer should have a maximum size of 256 bytes.
CBaseMtmUi::DisplayProgressSummary() CBaseMtmUi::GetProgress()
TBool | PruneMessages | ( | const CMsvEntrySelection & | aSelection, |
TRequestStatus & | aStatus | |||
) | [private] |
const CMsvEntrySelection & aSelection | |
TRequestStatus & aStatus |
void | RestartAfterMigrateL | ( | ) | [private] |
Restarts any pre-migration outstanding operations, or set the state machine into the same state it was pre-migration along with any necessary connections and set ups.
Note that iCurrentOperation will have returned to EPopConnectedAndIdle if the migration type was "allow complete" or "stop for migrate" and the operation came to a natural finish.
If iCurrentOperation is not EPopConnectedAndIdle, it indicates that the operation had not completed prior to the migration. This is caused with by an "accept immediately" migration, a CarrierLost() migration, or a "stop operation" migration for which the operation did not come to a natural completion. In these cases, the operation in progress needs to be resumed.
TBool | StartBearerMobilityL | ( | TInt | aError | ) | [private] |
Creates the mobility manager and registers the RConnection for notification of bearer migration events, if the necessary conditions are met.
Returns ETrue if mobility enabled and the initial carrier has been rejected.
TInt aError | completion code of the session connect async operation |
void | StartCommandL | ( | CMsvEntrySelection & | aSelection, |
TInt | aCommand, | |||
const TDesC8 & | aParameter, | |||
TRequestStatus & | aStatus | |||
) | [virtual] |
Executes an MTM-specific operation on a selection of entries when called by the Message Server.
The call is made as a response to a client program invoking an MTM-specific operation through CBaseMtm::InvokeSyncFunctionL()/InvokeAsyncFunctionL(). The aSelection, aCommand, and aParameter arguments pass the values of the original aSelection, aFunctionId, and aParameter respectively arguments from such a call. The use (if any) of the aSelection and aParameter arguments by the function depends on the command.
CMsvEntrySelection & aSelection | A selection of message entries on which the command is to be executed |
TInt aCommand | The MTM-specific command to be carried out |
const TDesC8 & aParameter | Command-specific parameters |
TRequestStatus & aStatus | Asynchronous completion word for the operation |
void | StopCurrentOpForMigration | ( | ) | [private] |
Handles the halting of operations in order to migrate. This is called by the PrepareForNewCarrier() function, when it is called by the mobility manager with the mobility action StopCurrentOpForMigration.
void | StoreConfigurationToMigrateL | ( | ) | [private] |
Stores configuration to be re-used post Migration.
CMsvEntrySelection * | StripInvalidEntriesLC | ( | const CMsvEntrySelection & | aSelection, |
TBool | aExcludePartial = EFalse | |||
) | const [private] |
const CMsvEntrySelection & aSelection | |
TBool aExcludePartial = EFalse |
ENotMigrating | |
EWaitingForOpToStop | |
EWaitingForOpToComplete | |
EDisconnectingForMigrate | |
EWaitingForNewCarrier | |
EWaitingCarrierRejected | |
EConnectingAfterMigrate |
EPopConnecting | |
EPopRefreshing | |
EPopCopying | |
EPopMoving | |
EPopDeleting | |
EPopQuitting | |
EPopTidying | |
EPopConnectedAndIdle | |
EPopDisconnected | |
EPopPopulating | |
EPopAddingOfflineOp | |
EPopFindingFirstOfflineOp | |
EPopCancellingOfflineOps | |
EPopTopPopulating | |
EPopAuthoriseAndConnect |
TNonOperationMtmDataAccessPointIdBuffer | iMtmDataAccessPointIdBuffer | [private] |
CImPop3OfflineOperationFinder * | iOfflineOpFinder | [private] |
TPopSavedValuesForMigration | iSavedValuesForMigration | [private] |
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.