diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-5E522208-E8ED-5E95-946C-5D87CF303F1D.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-5E522208-E8ED-5E95-946C-5D87CF303F1D.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,55 @@ + + + + + +Storing +Messages in SQL DatabaseThis document explains how to define the header structure of messages +before storing them in the SQL database and lists the advantages of doing +so. +
Header +structure

The header structure of messages is specific to each +Message Type Module (MTM). The Messaging framework provides a generic interface +to store and access the header information.

MTM developers use the CMsvHeaderStore API to create a specific +header table and specify their message header structure to the Message Server.

The CMsvHeaderStore::CreateStoreL() function +creates a header table. Before creating a header table for your MTM, you should +check whether the table already exists, by calling the DoesStoreExistsL() function.

TCommonHeaderField is the enumeration +defining the following standard message header fields:

    +
  • EFrom – +‘From’ field of the message header

  • +
  • EBCC – +‘BCC’ field of the message header

  • +
  • ETo – +‘To’ field of the message header

  • +
  • ECC – +‘CC’ field of the message header.

  • +
  • ESubject – +‘Subject’ field of the message header.

  • +

To add specific fields to the header table, call the AddFieldL() function.

CEmailAccounts is the API provided by the +email client MTM. This class creates, loads, saves and deletes email accounts. +When creating the email account, the client MTM has to provide the header +structure through the CMsvHeaderStore API +to pass to the Messaging framework. The framework will then create the header +for the account.

+
Advantages of SQL message storage

The message headers +are stored in an SQL database, which provides the following advantages:

    +
  • robustness of mail storage

  • +
  • quick processing of +the frequently-required header data

  • +
  • support for search-sort +operations

  • +
  • increased performance +of the Message Server.

  • +
+
+Creating +and Reading Email Messages in Chunks +Storing and +Restoring Email Messages in Chunks +
\ No newline at end of file