1 /* |
|
2 * Copyright (c) 2010 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 #ifndef C_JAVACENTRALREPOSITORY_H |
|
19 #define C_JAVACENTRALREPOSITORY_H |
|
20 |
|
21 |
|
22 #include <e32std.h> |
|
23 |
|
24 class CRepository; |
|
25 |
|
26 /** |
|
27 * Java Central Repository. |
|
28 */ |
|
29 class CJavaCentralRepository : public CBase |
|
30 { |
|
31 public: |
|
32 |
|
33 /** |
|
34 * Two-phased constructor. |
|
35 * @param aRepositoryUid The UID of the repository to be accessed |
|
36 */ |
|
37 static CJavaCentralRepository* NewL(TUid aRepositoryUid); |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * @param aRepositoryUid The UID of the repository to be accessed |
|
42 */ |
|
43 static CJavaCentralRepository* NewLC(TUid aRepositoryUid); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CJavaCentralRepository(); |
|
49 |
|
50 /** |
|
51 * Closes opened central repository. |
|
52 */ |
|
53 void Close(); |
|
54 |
|
55 /** |
|
56 * Reads a descriptor setting. |
|
57 * |
|
58 * @param aKey Key of setting to be read. |
|
59 * @param aValue Returns the value of the setting if it is a descriptor. |
|
60 * @leave System wide code if setting can not be read. |
|
61 */ |
|
62 void GetL(TUint32 aKey, TDes& aValue); |
|
63 |
|
64 /** |
|
65 * Reads a integer setting. |
|
66 * |
|
67 * @param aKey Key of setting to be read. |
|
68 * @param aValue Returns the value of the setting if it is an integer. |
|
69 * @leave System wide code if setting can not be read. |
|
70 */ |
|
71 void GetL(TUint32 aKey, TInt& aValue); |
|
72 |
|
73 /** |
|
74 * Stores descriptor setting. |
|
75 * |
|
76 * @param key The key of setting to be stored. |
|
77 * @param value The value of the setting to be stored. |
|
78 * @leave System wide error code if value cannot be stored. |
|
79 */ |
|
80 void SetL(TUint32 aKey, TDesC& aValue); |
|
81 |
|
82 /** |
|
83 * Stores integer setting. |
|
84 * |
|
85 * @param aKey Key of setting to be stored. |
|
86 * @param aValue The value of the setting to be stored. |
|
87 * @leave System wide error code if value cannot be stored. |
|
88 */ |
|
89 void SetL(TUint32 aKey, TInt aValue); |
|
90 |
|
91 HBufC* GetStringL(TUint32 aKey); |
|
92 |
|
93 TInt GetIntL(TUint32 aKey); |
|
94 |
|
95 private: |
|
96 |
|
97 CJavaCentralRepository(TUid aRepositoryUid); |
|
98 |
|
99 void ConstructL(); |
|
100 |
|
101 private: // data |
|
102 |
|
103 /** |
|
104 * Access to a repository |
|
105 * Own |
|
106 */ |
|
107 CRepository* iRepository; |
|
108 |
|
109 /** |
|
110 * Repository ID |
|
111 */ |
|
112 TUid iRepositoryUid; |
|
113 |
|
114 }; |
|
115 |
|
116 #endif // C_JAVACENTRALREPOSITORY_H |
|