Symbian3/SDK/Source/GUID-AAE39139-B377-5122-A2B0-98708EA00614.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE task
       
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
       
    12 <task id="GUID-AAE39139-B377-5122-A2B0-98708EA00614" xml:lang="en"><title>Writing
       
    13 a UI Data MTM </title><abstract><p>This section explains the initial steps to be performed to write
       
    14 a UI Data MTM. It does not explain the implementation of all <xref href="GUID-D7600D93-CFB8-565D-8200-7082B2CF1791.dita">UI
       
    15 Data MTM functionality</xref>, however, you can refer to the <xref href="GUID-70B9796F-8CF3-5DC4-93B4-0B1FED936169.dita">UI
       
    16 Data MTM example</xref>for detailed implementation steps.</p></abstract><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    17 <context><p>A derived UI Data MTM is simpler to implement than the MTM classes,
       
    18 and most of its code is specific to the protocol that is being implemented.
       
    19 The UI Data MTM implementation can require a resource file that details the
       
    20 strings used by the MTM and a list of functions (as command IDs) and flags
       
    21 that are specific to the MTM. </p> </context>
       
    22 <steps id="GUID-6E0C8880-28B0-5ADC-B65E-B3AEE6E932AE">
       
    23 <step id="GUID-C6574E7B-1748-583F-89AA-9B0FA60FF875"><cmd/>
       
    24 <info>Derive a class from the <xref href="GUID-899C6D87-5712-34A7-902C-EA452894700C.dita"><apiname>CBaseMtmUiData</apiname></xref> class. </info>
       
    25 </step>
       
    26 <step id="GUID-2DDD85DF-A8C9-5BFA-8060-09D547F95992"><cmd/>
       
    27 <info>Register it using the <xref href="GUID-0D5D7FAC-4F14-3046-92FB-873B8350FF4C.dita"><apiname>CRegisteredMtmDll</apiname></xref> parameter. </info>
       
    28 </step>
       
    29 </steps>
       
    30 <result><p>Use the derived <xref href="GUID-899C6D87-5712-34A7-902C-EA452894700C.dita"><apiname>CBaseMtmUiData</apiname></xref> class
       
    31 functionality in the Messaging client application. </p><codeblock xml:space="preserve">//
       
    32 // CTxtiMtmUiData: UI Data MTM
       
    33 //
       
    34 
       
    35 CTxtiMtmUiData* CTxtiMtmUiData::NewL(CRegisteredMtmDll&amp; aRegisteredDll)
       
    36     {
       
    37     CTxtiMtmUiData* base=new(ELeave) CTxtiMtmUiData(aRegisteredDll);
       
    38     CleanupStack::PushL(base);
       
    39     base-&gt;ConstructL();
       
    40     CleanupStack::Pop();
       
    41     return base;
       
    42     }</codeblock></result>
       
    43 <example><title>UI Data MTM example</title> <p>For more details on implementing
       
    44 all UI MTM functionalities, see <xref href="GUID-70B9796F-8CF3-5DC4-93B4-0B1FED936169.dita">example
       
    45 code</xref>. </p> </example>
       
    46 </taskbody><related-links>
       
    47 <link href="GUID-59217FA7-3078-53CA-88B3-78D6FB788271.dita"><linktext>MTM overview</linktext>
       
    48 </link>
       
    49 <link href="GUID-E180D222-CC4F-5007-93FC-C339BBE708BC.dita"><linktext>User Interface
       
    50 Data MTM</linktext></link>
       
    51 </related-links></task>