|
1 /** |
|
2 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Settings Repository class of SMF |
|
16 */ |
|
17 |
|
18 #ifndef SETTINGSREPOSITORY_H_ |
|
19 #define SETTINGSREPOSITORY_H_ |
|
20 |
|
21 const TInt KMaxSettingValue = 50; |
|
22 |
|
23 #include <centralrepository.h> |
|
24 #include <QStringList> |
|
25 #include <QMap> |
|
26 //#include <BADESCA.H> |
|
27 /*! |
|
28 @class CSettingsRepository |
|
29 |
|
30 @discussion An instance Settings Repository class |
|
31 to set/get setting values to/from symbian repository. |
|
32 */ |
|
33 class CSettingsRepository : public CBase |
|
34 { |
|
35 public: |
|
36 |
|
37 /*! |
|
38 @function NewL |
|
39 |
|
40 @discussion Create a CSettingsRepository object |
|
41 @result a pointer to the created instance of CSettingsRepository |
|
42 */ |
|
43 static CSettingsRepository* NewL(); |
|
44 |
|
45 /*! |
|
46 @function NewLC |
|
47 |
|
48 @discussion Create a CSettingsRepository object |
|
49 @result a pointer to the created instance of CSettingsRepository |
|
50 */ |
|
51 static CSettingsRepository* NewLC(); |
|
52 |
|
53 |
|
54 /*! |
|
55 @function ~CSettingsRepository |
|
56 |
|
57 @discussion Destroy the object and release all memory objects |
|
58 */ |
|
59 ~CSettingsRepository(); |
|
60 |
|
61 |
|
62 public: |
|
63 |
|
64 |
|
65 /*! |
|
66 @function CSettingsRepository |
|
67 |
|
68 @discussion Perform the first phase of two phase construction |
|
69 */ |
|
70 |
|
71 CSettingsRepository(); |
|
72 /* |
|
73 * Method to set the PluginDetails to Smf repository |
|
74 * Parm - @aPluginName,Name of the plugin |
|
75 * Param - @aPluginStatus,holds the Plgugin Status. |
|
76 */ |
|
77 void SetPluginDetails(QString& aPluginName,QString& aPluginStatus); |
|
78 /* |
|
79 * Method to set the Auth Expiry Value to Repository |
|
80 * Param - @aVal,Auth Expiry Value |
|
81 */ |
|
82 void SetAuthExpirationValue(QString& aVal); |
|
83 /* |
|
84 * Method to set the Max. Data Transfer Limit to Repository |
|
85 * Param - @aVal,Max. Data Transfer Limit Value |
|
86 */ |
|
87 void SetMaxDataTransferLimit(QString& aVal); |
|
88 /* |
|
89 * Method to set the Roaming Status for Data Transfer to Repository |
|
90 * Param - @aStatus,Rpaming Status value for Data Transfer |
|
91 */ |
|
92 void SetRoamingStatusforDataTransfer(QString& aStatus); |
|
93 /* |
|
94 * Method to set the Upload File Type to Repository |
|
95 * Param - @aStatus,Upload File Type Value |
|
96 */ |
|
97 void SetUploadFileType(QString& aFileType); |
|
98 /* |
|
99 * Method to Get the PluginDetails from Repository |
|
100 * Key-Plugin name |
|
101 * Value-Plugin status |
|
102 */ |
|
103 void GetPluginDetails(QMap<QString,QString>& aDetails); |
|
104 /* |
|
105 * Method to Get the Auth Expiry Value from Repository |
|
106 */ |
|
107 QString GetAuthExpirationValue() const; |
|
108 /* |
|
109 * Method to Get the Max. Data Transfer Limit from Repository |
|
110 */ |
|
111 QString GetMaxDataTransferLimit()const; |
|
112 /* |
|
113 * Method to Get the Roaming Status for Data Transfer from Repository |
|
114 */ |
|
115 QString GetRoamingStatusforDataTransfer() const; |
|
116 /* |
|
117 * Method to Get the Upload File Type from Repository |
|
118 */ |
|
119 QString GetUploadFileType() const; |
|
120 private: |
|
121 /* |
|
122 * Method to set the PluginDetails to Symbian Repository |
|
123 * Parm - @aPluginName,Name of the plugin |
|
124 * Param - @aPluginStatus,holds the Plgugin Status. |
|
125 */ |
|
126 void SetPluginDetails(TDesC& aPluginName,TDesC& aPluginStatus); |
|
127 /* |
|
128 * Method to set the Auth Expiry Value to Repository |
|
129 * Param - @aVal,Auth Expiry Value |
|
130 */ |
|
131 void SetAuthExpirationValue(TDesC& aVal); |
|
132 /* |
|
133 * Method to set the Max. Data Transfer Limit to Repository |
|
134 * Param - @aVal,Max. Data Transfer Limit Value |
|
135 */ |
|
136 void SetMaxDataTransferLimit(TDesC& aVal); |
|
137 /* |
|
138 * Method to set the Roaming Status for Data Transfer to Repository |
|
139 * Param - @aStatus,Rpaming Status value for Data Transfer |
|
140 */ |
|
141 void SetRoamingStatusforDataTransfer(TDesC& aStatus); |
|
142 /* |
|
143 * Method to set the Upload File Type to Repository |
|
144 * Param - @aStatus,Upload File Type Value |
|
145 */ |
|
146 void SetUploadFileType(TDesC& aFileType); |
|
147 /* |
|
148 * Method to Get the PluginDetails from Repository |
|
149 */ |
|
150 void GetPluginDetailsInternal(TDes& aName , TDes& aDetails) const; |
|
151 /* |
|
152 * Method to Get the Auth Expiry Value from Repository |
|
153 */ |
|
154 void GetAuthExpirationValueInternal(TDes& aExp) const; |
|
155 /* |
|
156 * Method to Get the Max. Data Transfer Limit from Repository |
|
157 */ |
|
158 void GetMaxDataTransferLimitInternal(TDes& aMax) const; |
|
159 /* |
|
160 * Method to Get the Roaming Status for Data Transfer from Repository |
|
161 */ |
|
162 void GetRoamingStatusforDataTransferInternal(TDes& aRoam) const; |
|
163 /* |
|
164 * Method to Get the Upload File Type from Repository |
|
165 */ |
|
166 void GetUploadFileTypeInternal(TDes& aFtype) const; |
|
167 |
|
168 private: |
|
169 |
|
170 /*! |
|
171 @function ConstructL |
|
172 |
|
173 @discussion Perform the second phase construction of a CSettingsRepository object |
|
174 */ |
|
175 void ConstructL(); |
|
176 |
|
177 /*! |
|
178 Pointer to the Centra Repository class object. |
|
179 */ |
|
180 CRepository* iRepository; |
|
181 |
|
182 }; |
|
183 |
|
184 |
|
185 #endif /* SETTINGSREPOSITORY_H_ */ |