Accepting a Newly-Available Bearer

This tutorial explains how to set the mobility policy handler component to accept a newly-available bearer.

Procedure

  1. Derive a class from the CImMobilityPolicyPlugin class.

  2. Implement the PreferredCarrierAvailable and MigrationComplete functions in the derived CImMobilityPolicyPlugin class to get the required behaviour when a new bearer is available.

    When a new bearer is available, the Network bearer mobility framework calls the MMobilityProtocolResp::PreferredCarrierAvailable function to notify the bearer mobility policy manager. This happens only if the bearer mobility policy manager is registered with the PreferredCarrierAvailable (Network bearer mobility framework) for bearer mobility notification.

  3. Call the CImMobilityManager::AcceptNewCarrier() function on the instance of CImMobilityManager identified in the PreferredCarrierAvailable() function.

  4. Set the CImMobilityManager::AcceptNewCarrier() function value to any of the following:

    • KAcceptCompleteCurrent to specify that any operations in progress should be allowed to continue before migrating.

      Note: KAcceptCompleteCurrent will not cancel the server communication that is currently in progress. After the operation is completed, the server MTM completes the user requested operation, logs out from the remote server, and closes the session allowing the migration to occur.
    • KAcceptStopCurrent to specify that any operations in progress should be stopped before migrating.

      Note: KAcceptStopCurrent will not cancel server communication that is currently in progress. After the operation is stopped, the server MTM logs out from the remote server, and closes the session allowing the migration to occur.
    • KAcceptImmediately to specify that the migration should be performed immediately.

      Note: KAcceptImmediately causes the outstanding server communications to be cancelled, the session with the remote server is dropped without logging out, and allows the migration to occur.