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