Writing a UI Data MTM

This section explains the initial steps to be performed to write a UI Data MTM. It does not explain the implementation of all UI Data MTM functionality , however, you can refer to the UI Data MTM example for detailed implementation steps.

A derived UI Data MTM is simpler to implement than the MTM classes, and most of its code is specific to the protocol that is being implemented. The UI Data MTM implementation can require a resource file that details the strings used by the MTM and a list of functions (as command IDs) and flags that are specific to the MTM.


  1. Derive a class from the CBaseMtmUiData class.

  2. Register it using the CRegisteredMtmDll parameter.

Use the derived CBaseMtmUiData class functionality in the Messaging client application.

       //
// CTxtiMtmUiData: UI Data MTM
//

CTxtiMtmUiData* CTxtiMtmUiData::NewL(CRegisteredMtmDll& aRegisteredDll)
    {
    CTxtiMtmUiData* base=new(ELeave) CTxtiMtmUiData(aRegisteredDll);
    CleanupStack::PushL(base);
    base->ConstructL();
    CleanupStack::Pop();
    return base;
    }
      

UI Data MTM example

For more details on implementing all UI MTM functionalities, see example code .