Symbian3/PDK/Source/GUID-1E2DB50A-D8D7-595D-8448-77F057655E82.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     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-1E2DB50A-D8D7-595D-8448-77F057655E82" xml:lang="en"><title>Writing
       
    13 a Client MTM</title><abstract><p>This section describes the initial steps to be performed to write
       
    14 a Client MTM. It does not explain the implementation of all <xref href="GUID-E180D222-CC4F-5007-93FC-C339BBE708BC.dita">Client
       
    15 MTM functionality</xref>. You can refer the <xref href="GUID-232E2D33-8BC1-5CC3-A4DF-2C99900E1083.dita">Client
       
    16 MTM example</xref> for detailed implementation steps </p></abstract><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    17 <context><p>The main function of the Client MTM is to load the entry currently
       
    18 referred to by the MTM’s context, and save it once any changes have been made
       
    19 to it. An individual entry’s store is represented by the <xref href="GUID-8CB90FA2-A6CF-3FA2-81FF-7D22EFD9C2CE.dita"><apiname>CMsvStore</apiname></xref> class.
       
    20 Finally, after any changes are made to a store that stores the message body, <xref href="GUID-8CB90FA2-A6CF-3FA2-81FF-7D22EFD9C2CE.dita#GUID-8CB90FA2-A6CF-3FA2-81FF-7D22EFD9C2CE/GUID-F1D4FE2A-8BB9-3CC2-9C30-DC053848A6B5"><apiname>CMsvStore::CommitL()</apiname></xref> must
       
    21 be called to commit those changes. </p> </context>
       
    22 <steps id="GUID-6A78327C-5D21-5913-9404-7153B2002264">
       
    23 <step id="GUID-BC043CD5-E41A-5534-A2ED-0C6003723004"><cmd/>
       
    24 <info>Derive a class from the <xref href="GUID-177AF50B-14EF-3C45-AE22-1FEE5678261D.dita"><apiname>CBaseMtm</apiname></xref> class. </info>
       
    25 </step>
       
    26 <step id="GUID-7A80C910-9012-57FF-8A7A-4A63631BBE33"><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 <step id="GUID-B0606F56-C9D4-532F-B866-2D2AF54EC71C"><cmd/>
       
    30 <info>Create a session with Message Server using the <xref href="GUID-2DA04D96-F0AD-3FDC-9E36-1C27D889AF4B.dita"><apiname>CMsvSession</apiname></xref> parameter. </info>
       
    31 </step>
       
    32 <step id="GUID-72F50006-EA9B-5BF3-8A8F-BC51C4434F9D"><cmd/>
       
    33 <info>Create the <xref href="GUID-AF724192-6580-3DE3-9287-3A005C0AA932.dita"><apiname>CMsvOperation</apiname></xref> -based classes for performing
       
    34 the different operations that are required for your Messaging protocol. See <xref href="GUID-E180D222-CC4F-5007-93FC-C339BBE708BC.dita#GUID-E180D222-CC4F-5007-93FC-C339BBE708BC/GUID-6DD0912E-1E82-5BAD-889C-5FA79E5E800C">Client-side
       
    35 operations</xref>. </info>
       
    36 </step>
       
    37 </steps>
       
    38 <example><title>Client MTM example</title><codeblock xml:space="preserve">// 
       
    39 // CTextMtmClient
       
    40 //      Implements CBaseMtm to provide Client-side Text MTM     
       
    41 //
       
    42 
       
    43 EXPORT_C CTextMtmClient* CTextMtmClient::NewL(CRegisteredMtmDll&amp; aRegisteredMtmDll, CMsvSession&amp; aMsvSession)
       
    44 // Factory function
       
    45     {
       
    46     CTextMtmClient* self = new (ELeave) CTextMtmClient(aRegisteredMtmDll,aMsvSession);
       
    47     CleanupStack::PushL(self);
       
    48     self-&gt;ConstructL();
       
    49     CleanupStack::Pop();
       
    50     return self;
       
    51     }</codeblock> <p>For more details on implementing all Client
       
    52 MTM functions, see <xref href="GUID-232E2D33-8BC1-5CC3-A4DF-2C99900E1083.dita">example
       
    53 code</xref>. </p> </example>
       
    54 </taskbody><related-links>
       
    55 <link href="GUID-59217FA7-3078-53CA-88B3-78D6FB788271.dita"><linktext>MTM overview</linktext>
       
    56 </link>
       
    57 <link href="GUID-E180D222-CC4F-5007-93FC-C339BBE708BC.dita"><linktext>Client MTM</linktext>
       
    58 </link>
       
    59 </related-links></task>