Symbian3/SDK/Source/GUID-DB1D3045-2DC5-5C50-B430-526674369DC6.dita
changeset 0 89d6a7a84779
child 8 ae94777fff8f
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 concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-DB1D3045-2DC5-5C50-B430-526674369DC6" xml:lang="en"><title>Server-side
       
    13 MTM implementation</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <section><title>Example Code</title> <p>Click on the following link to download
       
    15 the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-419758e4-b663-48d3-bf21-d9c4bb00da23.zip" scope="external">TextMTM.zip</xref> </p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-419758e4-b663-48d3-bf21-d9c4bb00da23.html" scope="peer">browse</xref> to view the example code. </p> <p>The
       
    16 files reproduced here are the main files contained in the examples directory.
       
    17 Some extra files may be needed to run the examples, and these will be found
       
    18 in the appropriate examples directory. </p><p>The Server-side Text MTM simulates
       
    19 with the local file system the actions normally undertaken by a message  transport
       
    20 protocol. A Text service entry maps a local file directory, from which message
       
    21 header information can be obtained  (in a similar fashion to POP3), and from
       
    22 which messages can be get and put.</p><p>A file or folder in the mapped directory
       
    23 is regarded as a remote entry,  and recorded by an entry in the message index.
       
    24 The name of the file to which a  message corresponds is stored in the index
       
    25 Description field, and the full  folder path in the index Details field. No
       
    26 message store is associated with  these remote entries.</p><p> Under a local
       
    27 folder, for example, the Inbox, each message has a message  store that contains
       
    28 a rich text stream representing the body text.</p><p>Messages can be deleted,
       
    29 moved, or copied. When a local message to  transferred to a Text service,
       
    30 the Server-side MTM constructs a new file, obtaining its name and location
       
    31 from the index fields. When the transfer is from the service to a local folder,
       
    32 the Server-side MTM creates a rich text stream and reads the file text into
       
    33 it.</p><p>The Text server DLL currently supports one MTM-specific operation, <codeph>KTXTMTMRefresh</codeph>,
       
    34 which refreshes the folder tree below a service entry.</p></section>
       
    35 <section><title>Class summary</title><p><xref href="GUID-DA714708-9A0B-3B10-AC8E-44C903365453.dita"><apiname>CMsvServerEntry TMsvId CMsvEntrySelection
       
    36 TParse </apiname></xref></p></section>
       
    37 <section><title>Move, copy, and delete implementation</title> <p>Move, copy,
       
    38 and delete operations all operate on a collection of message entries, often
       
    39 involving creating new index entries, and deleting existing ones. This common
       
    40 functionality is provided by the class <codeph>CTxtCopyMoveBase</codeph>. </p> <p>A <codeph>CTxtCopyMoveBase</codeph> instance
       
    41 is provided with an object to perform the specific operation required. The
       
    42 classes <codeph>CTxtCopyToLocalOp</codeph>, <codeph>CTxtCopyFromLocalOp</codeph>, <codeph>CTxtCopyWithinServiceOp</codeph>, <codeph>CTxtMoveToLocalOp</codeph>, <codeph>CTxtMoveFromLocalOp</codeph>, <codeph>CTxtMoveWithinServiceOp</codeph> and <codeph>CTxtDeleteOp</codeph> each
       
    43 define the functionality for a specific operation. </p> <p>Each of these classes
       
    44 is derived from <codeph>CTxtActiveOper</codeph>. The move operation classes
       
    45 are derived from their copy counterparts, and add the extra deletion after
       
    46 copying. </p> </section>
       
    47 <section><title>Service refresh implementation</title> <p>The contents of
       
    48 folders under the file system can be changed at any time outside of the application,
       
    49 by the user or some other application. In order for these changes to be visible
       
    50 in the messaging application, the Server-side MTM provides a refresh capability. </p> <p>The
       
    51 refresh capability is provided by the refresher class <codeph>CTxtRefreshMBox</codeph>.
       
    52 It ensures that the current entries accurately reflect the state of the corresponding
       
    53 file folder, adding or removing entries under the service as required. </p> </section>
       
    54 </conbody></concept>