|
1 /* |
|
2 * Copyright (c) 2004-2005 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: SD and CR variation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CCASDCRVARIATOR_H |
|
20 #define CCASDCRVARIATOR_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "MCASDCRVariator.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CRepository; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Persistent preference store implementation for |
|
33 * Central Repository |
|
34 * @lib CAEngine.lib |
|
35 * @since 3.0 |
|
36 */ |
|
37 class CCASDCRVariator : public CBase, public MCASDCRVariator |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor |
|
43 * @param aIdentifier The UID of the application, ignored in cenrep |
|
44 */ |
|
45 static CCASDCRVariator* NewL( TUid aIdentifier ); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CCASDCRVariator(); |
|
51 |
|
52 public: // MCASDCRVariator |
|
53 |
|
54 /** |
|
55 * @see MCASDCRVariator |
|
56 */ |
|
57 TInt GetInt( TInt aSetting, TInt& aValue ); |
|
58 |
|
59 /** |
|
60 * @see MCASDCRVariator |
|
61 */ |
|
62 TInt SetInt( TInt aSetting, TInt aValue ); |
|
63 |
|
64 /** |
|
65 * @see MCASDCRVariator |
|
66 */ |
|
67 TInt GetString( TInt aSetting, TDes& aValue ); |
|
68 |
|
69 /** |
|
70 * @see MCASDCRVariator |
|
71 */ |
|
72 TInt SetString( TInt aSetting, const TDesC& aValue ); |
|
73 |
|
74 /** |
|
75 * @see MCASDCRVariator |
|
76 */ |
|
77 TInt FlushData(); |
|
78 |
|
79 private: // New methods |
|
80 |
|
81 /** |
|
82 * C++ default constructor. |
|
83 */ |
|
84 CCASDCRVariator(); |
|
85 |
|
86 /** |
|
87 * By default Symbian OS constructor is private. |
|
88 * @see CCASDCRVariator::NewL. |
|
89 */ |
|
90 void ConstructL( TUid aIdentifier ); |
|
91 |
|
92 /** |
|
93 * Central repository: |
|
94 * Generate key value from a given setting number. |
|
95 * @param aSettingNumber Number (enum) of setting |
|
96 * @return Generated key |
|
97 * @see MCASettings for the setting enumerations |
|
98 * @since 3.0 |
|
99 */ |
|
100 TInt GenerateKey( const TInt aSettingNumber ) const; |
|
101 |
|
102 private: |
|
103 |
|
104 // central repository |
|
105 CRepository* iCenRep; // private and internal keys, owns |
|
106 }; |
|
107 |
|
108 #endif // CCASDCRVARIATOR_H |
|
109 |
|
110 // End of File |