natfw/natfwclient/tsrc/ut_natfwclient/inc/settings.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 __SETTINGS_H__
       
    22 #define __SETTINGS_H__
       
    23 
       
    24 #include <e32base.h> 
       
    25 #include <centralrepository.h>
       
    26 
       
    27 //Forward declare
       
    28 class CDataDepository;
       
    29 
       
    30 
       
    31 class CSettings : public CBase
       
    32 {
       
    33 public:
       
    34   
       
    35     IMPORT_C TUint32 CreateNewTableKeyL( TUint aTableMask, TUint32 aFieldMask ) const;
       
    36         
       
    37     IMPORT_C void StoreL( const TUint32 aKey, const TInt aData );
       
    38     IMPORT_C void StoreL( const TUint32 aKey, const TDesC8& aData );
       
    39         
       
    40     IMPORT_C TInt Read( const TUint32 aKey, TInt& aData );
       
    41     IMPORT_C TInt ReadL( const TUint32 aKey, HBufC8** aData );
       
    42     
       
    43     IMPORT_C TInt EraseL( TUint32 aTableMask, TUint32 aFieldTypeMask );
       
    44     
       
    45     virtual void CreateSettingsL() = 0;
       
    46 
       
    47     virtual ~CSettings( );
       
    48 
       
    49     IMPORT_C TInt ReadDomainSettingsKeyL( const TDesC8& aDomain, TUint32& aDomainKey ) const;
       
    50 
       
    51 protected: 
       
    52     CSettings();
       
    53     void ConstructBaseL( TUid aCRUid );
       
    54 
       
    55 protected: //DATA
       
    56     CRepository* iRepository;
       
    57     
       
    58 private: //DATA
       
    59     CDataDepository* iDepository;
       
    60  
       
    61 };
       
    62 
       
    63 #endif //__SETTINGS_H__