Symbian3/SDK/Source/GUID-5E522208-E8ED-5E95-946C-5D87CF303F1D.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 concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-5E522208-E8ED-5E95-946C-5D87CF303F1D" xml:lang="en"><title>Storing
       
    13 Messages in SQL Database</title><shortdesc>This document explains how to define the header structure of messages
       
    14 before storing them in the SQL database and lists the advantages of doing
       
    15 so. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    16 <section id="GUID-FC18D7D2-4B90-548F-A3C7-AAA32DEAB058"><title>Header
       
    17 structure</title> <p>The header structure of messages is specific to each
       
    18 Message Type Module (MTM). The Messaging framework provides a generic interface
       
    19 to store and access the header information. </p> <p>MTM developers use the <xref href="GUID-0D95F395-B164-36C7-B745-177DDC8F17C5.dita"><apiname>CMsvHeaderStore</apiname></xref> API to create a specific
       
    20 header table and specify their message header structure to the Message Server. </p> <p>The <xref href="GUID-0D95F395-B164-36C7-B745-177DDC8F17C5.dita"><apiname>CMsvHeaderStore::CreateStoreL()</apiname></xref> function
       
    21 creates a header table. Before creating a header table for your MTM, you should
       
    22 check whether the table already exists, by calling the <xref href="GUID-0D95F395-B164-36C7-B745-177DDC8F17C5.dita"><apiname>DoesStoreExistsL()</apiname></xref> function. </p> <p> <xref href="GUID-0D95F395-B164-36C7-B745-177DDC8F17C5.dita"><apiname> TCommonHeaderField</apiname></xref> is the enumeration
       
    23 defining the following standard message header fields: </p> <ul>
       
    24 <li id="GUID-B3C53A00-1430-57DB-BD3C-F0F63C105E87"><p> <codeph>EFrom</codeph> –
       
    25 ‘From’ field of the message header </p> </li>
       
    26 <li id="GUID-44C7345E-911E-5392-ACC4-D3B6A6F15D78"><p> <codeph>EBCC</codeph> –
       
    27 ‘BCC’ field of the message header </p> </li>
       
    28 <li id="GUID-45F46F10-9922-5646-8A4B-F00759B1BE72"><p> <codeph>ETo</codeph> –
       
    29 ‘To’ field of the message header </p> </li>
       
    30 <li id="GUID-5F7CA59A-CD5F-573C-91A0-148442CCCC5A"><p> <codeph>ECC</codeph> –
       
    31 ‘CC’ field of the message header. </p> </li>
       
    32 <li id="GUID-CBEE41C2-0197-533D-AD0B-A76EC2506FE3"><p> <codeph>ESubject</codeph> –
       
    33 ‘Subject’ field of the message header. </p> </li>
       
    34 </ul> <p>To add specific fields to the header table, call the <xref href="GUID-0D95F395-B164-36C7-B745-177DDC8F17C5.dita"><apiname>AddFieldL()</apiname></xref> function. </p> <p> <xref href="GUID-0D95F395-B164-36C7-B745-177DDC8F17C5.dita"><apiname>CEmailAccounts</apiname></xref> is the API provided by the
       
    35 email client MTM. This class creates, loads, saves and deletes email accounts.
       
    36 When creating the email account, the client MTM has to provide the header
       
    37 structure through the <xref href="GUID-0D95F395-B164-36C7-B745-177DDC8F17C5.dita"><apiname>CMsvHeaderStore</apiname></xref> API
       
    38 to pass to the Messaging framework. The framework will then create the header
       
    39 for the account. </p> </section>
       
    40 <section><title>Advantages of SQL message storage</title> <p>The message headers
       
    41 are stored in an SQL database, which provides the following advantages: </p> <ul>
       
    42 <li id="GUID-A1C20DCD-625E-5732-85E9-082FD488D398"><p>robustness of mail storage </p> </li>
       
    43 <li id="GUID-527ED804-E6E3-5833-BB10-EDD5E5D2EC81"><p>quick processing of
       
    44 the frequently-required header data </p> </li>
       
    45 <li id="GUID-E5E62B12-07EA-58A1-BC8A-389C17F43A21"><p>support for search-sort
       
    46 operations </p> </li>
       
    47 <li id="GUID-39CB6C7D-AA08-5F7D-BC8B-ACCE227D6C5F"><p>increased performance
       
    48 of the Message Server. </p> </li>
       
    49 </ul> </section>
       
    50 </conbody><related-links>
       
    51 <link href="GUID-9A3E0279-4F87-594D-A987-66DC77F408A0.dita"><linktext>Creating
       
    52 and Reading Email Messages in Chunks</linktext></link>
       
    53 <link href="GUID-6FE94423-9563-5F31-95EB-504479144B05.dita"><linktext>Storing and
       
    54 Restoring Email Messages in                 Chunks</linktext></link>
       
    55 </related-links></concept>