Symbian3/SDK/Source/GUID-AAE39139-B377-5122-A2B0-98708EA00614.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE task
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-AAE39139-B377-5122-A2B0-98708EA00614" xml:lang="en"><title>Writing
a UI Data MTM </title><abstract><p>This section explains the initial steps to be performed to write
a UI Data MTM. It does not explain the implementation of all <xref href="GUID-D7600D93-CFB8-565D-8200-7082B2CF1791.dita">UI
Data MTM functionality</xref>, however, you can refer to the <xref href="GUID-70B9796F-8CF3-5DC4-93B4-0B1FED936169.dita">UI
Data MTM example</xref>for detailed implementation steps.</p></abstract><prolog><metadata><keywords/></metadata></prolog><taskbody>
<context><p>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. </p> </context>
<steps id="GUID-6E0C8880-28B0-5ADC-B65E-B3AEE6E932AE">
<step id="GUID-C6574E7B-1748-583F-89AA-9B0FA60FF875"><cmd/>
<info>Derive a class from the <xref href="GUID-899C6D87-5712-34A7-902C-EA452894700C.dita"><apiname>CBaseMtmUiData</apiname></xref> class. </info>
</step>
<step id="GUID-2DDD85DF-A8C9-5BFA-8060-09D547F95992"><cmd/>
<info>Register it using the <xref href="GUID-0D5D7FAC-4F14-3046-92FB-873B8350FF4C.dita"><apiname>CRegisteredMtmDll</apiname></xref> parameter. </info>
</step>
</steps>
<result><p>Use the derived <xref href="GUID-899C6D87-5712-34A7-902C-EA452894700C.dita"><apiname>CBaseMtmUiData</apiname></xref> class
functionality in the Messaging client application. </p><codeblock xml:space="preserve">//
// CTxtiMtmUiData: UI Data MTM
//

CTxtiMtmUiData* CTxtiMtmUiData::NewL(CRegisteredMtmDll&amp; aRegisteredDll)
    {
    CTxtiMtmUiData* base=new(ELeave) CTxtiMtmUiData(aRegisteredDll);
    CleanupStack::PushL(base);
    base-&gt;ConstructL();
    CleanupStack::Pop();
    return base;
    }</codeblock></result>
<example><title>UI Data MTM example</title> <p>For more details on implementing
all UI MTM functionalities, see <xref href="GUID-70B9796F-8CF3-5DC4-93B4-0B1FED936169.dita">example
code</xref>. </p> </example>
</taskbody><related-links>
<link href="GUID-59217FA7-3078-53CA-88B3-78D6FB788271.dita"><linktext>MTM overview</linktext>
</link>
<link href="GUID-E180D222-CC4F-5007-93FC-C339BBE708BC.dita"><linktext>User Interface
Data MTM</linktext></link>
</related-links></task>