emailservices/emailstore/message_store/server/inc/ContainerStoreGeneralTable.h
changeset 0 8466d47a6819
child 8 e1b6206813b4
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 general table.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CONTAINER_STORE_GENERAL_TABLE_H__
       
    21 #define __CONTAINER_STORE_GENERAL_TABLE_H__
       
    22 
       
    23 // ========
       
    24 // INCLUDES
       
    25 // ========
       
    26 
       
    27 #include <e32base.h>
       
    28 #include <d32dbms.h>  // database
       
    29 //<cmail>
       
    30 #include "DebugLogMacros.h"
       
    31 //</cmail>
       
    32 
       
    33 #include "ContainerStoreTable.h"
       
    34 #include "ContainerStore.h"
       
    35 #include "ContainerStoreDefs.h"
       
    36 
       
    37 // =======
       
    38 // CLASSES
       
    39 // =======
       
    40 
       
    41 // ==================================
       
    42 // CLASS: CContainerStoreGeneralTable
       
    43 // ==================================
       
    44 class CContainerStoreGeneralTable : public CContainerStoreTable
       
    45 	{
       
    46 	public:
       
    47 	
       
    48 	    // ==============
       
    49 	    // PUBLIC METHODS
       
    50 	    // ==============
       
    51 	
       
    52 		static CContainerStoreGeneralTable* CreateL( CContainerStoreUtils& aUtils );
       
    53 		
       
    54 		static CContainerStoreGeneralTable* OpenL( CContainerStoreUtils& aUtils );
       
    55 		
       
    56 		virtual ~CContainerStoreGeneralTable();
       
    57 		
       
    58 		TContainerId AssignNextIdL();
       
    59         
       
    60         TBool IsAuthenticateRequiredL();
       
    61         
       
    62         void SetAuthenticationRequiredL( TBool aFlag );
       
    63 		
       
    64 		//Check if the encryption flag is on
       
    65 		TBool IsEncryptionOnL();
       
    66 		
       
    67 		//Turn encryption flag on/off
       
    68 		void  SetEncryptionFlagL( TBool aFlag );
       
    69 				
       
    70 		TBool AuthenticationDataPresentL();
       
    71 		
       
    72 		void SetAuthenticationDataL( const TDesC8& aBuffer );		
       
    73 		
       
    74 		void GetAuthenticationDataL( RBuf8& aBuffer );
       
    75 		
       
    76 		//gets the encryption progress state
       
    77         TEncryptionState EncryptionStateL();
       
    78 		
       
    79 		//sets the encryption progress state
       
    80 		void SetEncryptionStateL( TEncryptionState aEncryptionState );
       
    81         
       
    82         TUint MaxMruCountL();
       
    83         
       
    84         void SetMaxMruCountL( TUint aCount );
       
    85         
       
    86         TUint CurMruNumberL();
       
    87         
       
    88         void SetCurMruNumberL( TUint aNum );
       
    89 		
       
    90 	private:
       
    91 
       
    92         // ===============
       
    93         // PRIVATE METHODS
       
    94         // ===============
       
    95         	
       
    96 		CContainerStoreGeneralTable( CContainerStoreUtils& aUtils );
       
    97 		
       
    98 		void OpenTableL();
       
    99 		
       
   100 		void CreateTableL();
       
   101 				
       
   102         // ==================
       
   103         // PRIVATE ATTRIBUTES
       
   104         // ==================
       
   105 	    TInt                  iNextIdColNum;
       
   106         TInt                  iAuthenticationRequiredColNum;   
       
   107 	    TInt                  iAuthenticationDataColNum;
       
   108 	    TInt				  iEncryptionFlagColNum;     //on/off
       
   109 	    TInt                  iEncryptionStateColNum;   //TEncryptionState
       
   110         TInt                  iMaxMruCountColNum;       //Most Recently Used address count
       
   111         TInt                  iCurMruNumberColNum;      //Current MRU number
       
   112         
       
   113 	    __LOG_DECLARATION
       
   114     		
       
   115 	}; // end class CContainerStoreGeneralTable
       
   116 
       
   117 #endif