CImMobilityManager Class Reference

class CImMobilityManager : public CBase

The CImMobilityManager class manages notifications from the Bearer Mobility Framework, passing notifications up to the Mobility Policy Provider, and instructing the server MTM of the appropriate actions to take to perform the requested mobility behaviour.

Inherits from

Constructor & Destructor Documentation

CImMobilityManager(TUid, TMsvId, MImMobileServer &)

CImMobilityManager ( TUid aMtmUid,
TMsvId aAccountId,
MImMobileServer & aMtm
) [private]

Parameters

TUid aMtmUid
TMsvId aAccountId
MImMobileServer & aMtm

~CImMobilityManager()

~CImMobilityManager ( )

Member Functions Documentation

AcceptNewCarrier(TImMobilityAction)

IMPORT_C void AcceptNewCarrier ( TImMobilityAction aAction )

Instruction from the Messaging Plugin Provider that the new carrier is to be accepted.

Parameters

TImMobilityAction aAction - action that the server MTM should take when closing existing sockets.

ConstructL()

void ConstructL ( ) [private]

Error(TInt)

void Error ( TInt aError )

Notification that an error has occured. This indicates that the RConnection in use is no longer valid, therefore the Server MTM will be immediately notified. Once this is done, this function MUST NOT perform any actions that use class data, as the Server MTM may delete its instance of CImMobilityManager .

Parameters

TInt aError - error code

IgnoreNewCarrier()

IMPORT_C void IgnoreNewCarrier ( )

Instruction from the Messaging Plugin Provider that the new carrier is to be ignored.

MigrateToNewCarrier()

IMPORT_C void MigrateToNewCarrier ( )

Notification from the server MTM that existing sockets have been closed and that it is ready for migration to the new carrier to occur.

NewCarrierAccepted()

IMPORT_C void NewCarrierAccepted ( )

Notification from the server MTM that it has successfully re-established connection with the remote server using the new carrier.

NewCarrierActive(TAccessPointInfo, TBool)

void NewCarrierActive ( TAccessPointInfo aNewAp,
TBool aIsSeamless
)

Notification that the new carrier is active and available for connecting sockets.

Parameters

TAccessPointInfo aNewAp - info about the new carrier
TBool aIsSeamless - indicates if a migration will be seamless

NewCarrierRejected()

IMPORT_C void NewCarrierRejected ( )

Notification from the server MTM that it has been unable to re-established connection with the remote server using the new carrier.

NewL(TUid, TMsvId, MImMobileServer &)

IMPORT_C CImMobilityManager * NewL ( TUid aMtmUid,
TMsvId aAccountId,
MImMobileServer & aMtm
) [static]

The factory constructor. Part of two phased construction.

Parameters

TUid aMtmUid
TMsvId aAccountId - the ID of the email account
MImMobileServer & aMtm - Bearer Mobility API for the server MTM

PreferredCarrierAvailable(TAccessPointInfo, TAccessPointInfo, TBool, TBool)

void PreferredCarrierAvailable ( TAccessPointInfo aOldAp,
TAccessPointInfo aNewAp,
TBool aIsUpgrade,
TBool aIsSeamless
)

Notification of preferred carrier availability. This is called as a result of a new, preferred carrier becoming available (upgrade) or the existing carrier being lost, with an alternative available (downgrade).

The notification is handed up to the Mobility Policy Provider for decision.

Parameters

TAccessPointInfo aOldAp - info about the old carrier
TAccessPointInfo aNewAp - info about the new carrier
TBool aIsUpgrade - indicates if this is an upgrade
TBool aIsSeamless - indicates if a migration will be seamless

SetConnection(RCommsSubSession &)

IMPORT_C void SetConnection ( RCommsSubSession & aConnection )

Registers with the Bearer Mobility Framework for preferred carrier notifications

Parameters

RCommsSubSession & aConnection - the connected session.

Member Enumerations Documentation

Enum TMobilityState

Specifies the high-level state of the mobility manager

Enumerators

EMobilityUninitialised

The Mobility Manager is uninitialiased.

EMobilityIdle

The Mobility Manager has been initialised. No notifications received, nor waiting for any response.

EMobilityWaitForUpgradePolicy

PreferredCarrierAvailable(upgradade) notification received and policy provider notified. Waiting for instruction from the policy provider.

EMobilityWaitForDowngradePolicy

PreferredCarrierAvailable(downgradade) notification received and policy provider notified. Waiting for instruction from the policy provider.

EMobilityWaitForUpgradePolicyAndOldSocketClose

Second PreferredCarrierAvailable(upgrade) notification received while waiting for the original old sockets to be closed. Policy provider notified. Waiting for instruction from the policy provider. Also waiting for notification that sockets using the old carrier have been disconnected. This state exists purely to handle an unexpected race condition

EMobilityWaitForOldSocketCloseCarrierRejected

Second PreferredCarrierAvailable(upgrade) notification received while waiting for the original old sockets to be closed. Policy provider notified. Policy Provider has rejected the second upgrade notice. Waiting for notification that sockets using the old carrier have been disconnected. When the old sockets become disconnected, the MTM shall be instructed to reconnect (via NewCarrierActive() , even though this will be a connection via the original carrier. This state exists purely to handle an unexpected race condition

EMobilityWaitForOldSocketClose

Waiting for notification that sockets using the old carrier have been disconnected.

EMobilityWaitForMigrate

Waiting for notification from the Bearer Mobility Framework that the new carrier is active and available for creation of new sockets.

EMobilityConnectingToNewCarrier

Waiting for notification from the Server MTM that either new sockets have been successfully created using the new carrier, or that connection has been unsuccessful.

Member Data Documentation

TMsvId iAccountId

TMsvId iAccountId [private]

CActiveCommsMobilityApiExt * iCommsMobilityApi

CActiveCommsMobilityApiExt * iCommsMobilityApi [private]

TBool iIsCancelled

TBool iIsCancelled [private]

TBool iIsSeamless

TBool iIsSeamless [private]

MImMobileServer & iMtm

MImMobileServer & iMtm [private]

TUid iMtmUid

TUid iMtmUid [private]

TAccessPointInfo iNewAp

TAccessPointInfo iNewAp [private]

TAccessPointInfo iOldAp

TAccessPointInfo iOldAp [private]

TUint iState

TUint iState [private]