This section explains the initial set up steps to be performed to write a Server MTM. It does not explain the implementation of all Server MTM functionality , however, you can refer the Server MTM example for detailed implementation steps.
Server MTM functions usually start an operation to perform a task asynchronously. The CBaseServerMtm Server MTM class passes its own iStatus member to the operation. Note that there is no base class for server-side operations, as there is on the client side. Server MTMs therefore implement their own operation classes derived directly from CActive . They are, however, usually designed to return progress in a similar way to a client-side operation.
//
// CTextServerMtm: The Server-side MTM implementation
//
CTextServerMtm* CTextServerMtm::NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aInitialEntry)
// Exported factory function
{
CleanupStack::PushL(aInitialEntry);
CTextServerMtm* self=new (ELeave) CTextServerMtm(aRegisteredMtmDll, aInitialEntry);
CleanupStack::Pop();
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop();
return self;
}
CTextServerMtm::CTextServerMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aInitialEntry)
: CBaseServerMtm(aRegisteredMtmDll, aInitialEntry),
iCurrentOperation(ETxtOpIdle),
iServiceEntryId(aInitialEntry->Entry().Id())
{
}
For more details on implementing all 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.