diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-133999E8-0ACB-5929-949E-82BB16F8E267.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-133999E8-0ACB-5929-949E-82BB16F8E267.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,64 @@ + + + + + +Writing +a UI MTM

This section explains the initial set up steps to be performed +to write a UI MTM. It does not explain the implementation of all UI +MTM functionality, however, you can see the UI +MTM examplefor detailed implementation steps.

+

The most basic functionality required in a UI MTM is to open a +message (for viewing or editing) and close it again. The CBaseMtmUi::OpenL() function +opens the current context; the actual behaviour is dependent on the entry +that the context points at.

The base class of UI MTM, CBaseUiMtm, +defines functions that return CMsvOperation objects for +control of asynchronous operations. Implementers of these functions are required +to provide suitable classes that are derived from CMsvOperation. +For example, if CBaseUiMtm::EditL() is implemented to provide +message editing, a derived CMsvOperation class must be +provided that completes when the editing operation is complete.

+ + +Derive a class from the CBaseMtmUi class. + + +Register it using the CRegisteredMtmDll parameter. + + +Create the CMsvOperation -based classes for performing +the different operations that are required for your Messaging protocol. + + +UI MTM example// +// CTextMtmUi: User Interface MTM +// + +CTextMtmUi* CTextMtmUi::NewL(CBaseMtm& aBaseMtm, CRegisteredMtmDll& aRegisteredMtmDll) + { + CTextMtmUi* self=new(ELeave) CTextMtmUi(aBaseMtm, aRegisteredMtmDll); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; + } + +CTextMtmUi::CTextMtmUi(CBaseMtm& aBaseMtm, CRegisteredMtmDll& aRegisteredMtmDll) + : CBaseMtmUi(aBaseMtm, aRegisteredMtmDll) + { + + }

For more details on implementing all the +UI MTM functions, see example +code.

+
+MTM overview + +User Interface +MTM +
\ No newline at end of file