natfw/tsrc/natfwtestconsoles/natfwtestconsole/inc/datadepository.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2007 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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __DATADEPOSITORY_H__
       
    22 #define __DATADEPOSITORY_H__
       
    23 
       
    24 #include "e32base.h" 
       
    25 
       
    26 //Forward declare
       
    27 class CRepository;
       
    28 
       
    29 class CDataDepository : public CBase
       
    30 {
       
    31 public:
       
    32     static CDataDepository* NewL( CRepository* aRepository );
       
    33     static CDataDepository* NewLC( CRepository* aRepository );
       
    34         
       
    35     TUint32 CreateNewTableKeyL( TUint aTableMask, TUint32 aFieldMask ) const;
       
    36         
       
    37     void StoreL( const TUint32 aKey, const TInt aData );
       
    38     void StoreL( const TUint32 aKey, const TDesC8& aData );
       
    39         
       
    40     TInt Read( const TUint32 aKey, TInt& aData );
       
    41     TInt ReadL( const TUint32 aKey, HBufC8** aData );
       
    42         
       
    43     TInt EraseL( TUint32 aTableMask, TUint32 aFieldMask );
       
    44 
       
    45     ~CDataDepository( );
       
    46 
       
    47 private: 
       
    48     CDataDepository( CRepository* aRepository );
       
    49     
       
    50 private: //DATA
       
    51     CRepository* iRepository;
       
    52 };
       
    53 
       
    54 #endif //__DATADEPOSITORY_H__