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 example for 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.
//
// 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 .
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.