emailservices/emailstore/message_store/server/inc/ContainerStoreDefs.h
changeset 0 8466d47a6819
child 29 6b8f3b30d0ec
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Container store definitions.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CONTAINER_STORE_DEFS_H__
       
    21 #define __CONTAINER_STORE_DEFS_H__
       
    22 
       
    23 // =========
       
    24 // CONSTANTS
       
    25 // =========
       
    26 
       
    27 const TContainerId KLowestUserCreatedContainerId = 100;
       
    28 const TContainerId KToBeDeletedContainers        = KLowestUserCreatedContainerId-1;
       
    29 const TContainerId KUncommittedContainers        = KLowestUserCreatedContainerId-2;
       
    30 const TContainerId KToRetryDeleteContainers      = KLowestUserCreatedContainerId-3;
       
    31 
       
    32 // This constant is updated when a backwards incompatible change is made to the DB structure.
       
    33 const TUint KDbSchemaVersion = 6;
       
    34 
       
    35 const TUint KNumberOfContentSubdirectories = 25;
       
    36 
       
    37 // General table
       
    38 _LIT( KGeneralTableName,                      "G001" );
       
    39 _LIT( KGeneralTableDbSchemaVersionCol,        "G002" );
       
    40 _LIT( KGeneralTableNextIdCol,                 "G003" );
       
    41 _LIT( KGeneralTableAuthenticationRequiredCol, "G004" );  //is authentication required
       
    42 _LIT( KGeneralTableEncryptionFlagCol,         "G005" );  //bit(encryption on/off)
       
    43 _LIT( KGeneralTableEncryptionStateCol,        "G006" );  //TEncryptionState, persisted in case power lost during encryption/descryption the entire db
       
    44 _LIT( KGeneralTableAuthenticationDataCol,     "G007" );
       
    45 _LIT( KGeneralTableMaxMruCountCol,            "G008" );
       
    46 _LIT( KGeneralTableCurMruNumberCol,           "G009" );
       
    47 
       
    48 // Account table
       
    49 _LIT( KAccountTableName,                  "A001" );
       
    50 _LIT( KAccountTableOwnerIdCol,            "A002" );
       
    51 _LIT( KAccountTableAccountNameCol,        "A003" );
       
    52 _LIT( KAccountTableMailBoxIdCol,          "A004" );
       
    53 _LIT( KAccountTableTotalCountsCol,        "A005" );
       
    54 _LIT( KAccountTableIsEncryptedCol,        "A006" );
       
    55 _LIT( KAccountTableMailBoxIdIndex,        "A007" );
       
    56 
       
    57 // Property Containers table
       
    58 _LIT( KContainersTableName,               "C001" );
       
    59 _LIT( KContainersTableIdCol,              "C002" );
       
    60 _LIT( KContainersTableParentIdCol,        "C003" );
       
    61 _LIT( KContainersTableChildrenCountCol,   "C004" );  // total number of children
       
    62 _LIT( KContainersTableChildrenCountsCol,  "C005" );  // counts based on custom behavior provider
       
    63 _LIT( KContainersTablePropertiesCol,      "C006" );
       
    64 _LIT( KContainersTableQuickPropertiesCol, "C007" );
       
    65 _LIT( KContainersTableCountsCol,		  "C008" );
       
    66 _LIT( KContainersTableIsRowEncryptedCol,  "C009" );
       
    67 _LIT( KContainersTableIdIndex,            "C00A" );
       
    68 
       
    69 // Sorting table
       
    70 _LIT( KSortingTableName,                  "D001" );
       
    71 //    column names
       
    72 _LIT( KSortingTableMessageIdCol,          "D002" );
       
    73 _LIT( KSortingTableFolderIdCol   ,        "D003" );
       
    74 _LIT( KSortingTableMailBoxIdCol,          "D004" );
       
    75 _LIT( KSortingTableReceivedDateCol,       "D005" );
       
    76 _LIT( KSortingTableReadUnreadCol,         "D006" );
       
    77 _LIT( KSortingTablePriorityCol,           "D007" );
       
    78 _LIT( KSortingTableFlagStatusCol,         "D008" );
       
    79 _LIT( KSortingTableSizeCol,               "D009" );
       
    80 _LIT( KSortingTableAttachmentFlagCol,     "D00A" );
       
    81 _LIT( KSortingTableFromCol,               "D00B" );
       
    82 _LIT( KSortingTableToCol,                 "D00C" );
       
    83 _LIT( KSortingTableSubjectCol,            "D00D" );
       
    84 _LIT( KSortingTableIsEncryptedCol,        "D00E" );
       
    85 //    indexes
       
    86 _LIT( KSortingTableMessageIdIndex,        "D00F" );
       
    87 _LIT( KSortingTableFolderIdIndex,         "D00G" );
       
    88 _LIT( KSortingTableMailBoxIdIndex,        "D00H" );
       
    89 _LIT( KSortingTableReceivedDateIndex,     "D00I" );
       
    90 _LIT( KSortingTableReadUnreadIndex,       "D00J" );
       
    91 _LIT( KSortingTablePriorityIndex,         "D00K" );
       
    92 _LIT( KSortingTableFlagStatusIndex,       "D00L" );
       
    93 _LIT( KSortingTableSizeIndex,             "D00M" );
       
    94 _LIT( KSortingTableAttachmentFlagIndex,   "D00N" );
       
    95 
       
    96 // Search Result table
       
    97 _LIT( KSearchResultTableName,             "E001" );
       
    98 //    column names
       
    99 _LIT( KSearchResultTableMessageIdCol,     "E002" );
       
   100 _LIT( KSearchResultTableMatchFlagCol,     "E003" );
       
   101 //    indexes
       
   102 _LIT( KSearchResultTableMessageIdIndex,   "E004" );
       
   103 
       
   104 // MRU Address table
       
   105 _LIT( KMruAddressTableName,               "F001" );
       
   106 // Column names
       
   107 _LIT( KMruAddressTableMruNumCol,          "F002" );
       
   108 _LIT( KMruAddressTableMailBoxIdCol,       "F003" );
       
   109 _LIT( KMruAddressTableDisplayNameCol,     "F004" );
       
   110 _LIT( KMruAddressTableEmailAddressCol,    "F005" );
       
   111 _LIT( KMruAddressTableIsEncryptedCol,     "F006" );
       
   112 // indexes
       
   113 _LIT( KMruAddressTableMruNumIndex,        "F007" );
       
   114 _LIT( KMruAddressTableMailboxIdIndex,     "F008" );
       
   115 
       
   116 
       
   117 /** Defines the states of encryption/decryption operation 
       
   118  *  This state needs to be persisted in the db, so that if
       
   119  *  power lost while encrypting/decrypting, it can continue
       
   120  *  after message store is started again.
       
   121  */
       
   122 enum TEncryptionState
       
   123 {
       
   124 	EMsgStoreESIdle,
       
   125 	EMsgStoreESEncrypting,
       
   126 	EMsgStoreESDecrypting
       
   127 }; // end TEncryptionState
       
   128 
       
   129 #endif