|
1 /* |
|
2 * Copyright (c) 2009 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 #include "StorageUtils.h" |
|
18 #include "javastoragenames.h" |
|
19 #include "javastorage.h" |
|
20 #include "javastorageexception.h" |
|
21 #include "javasymbianoslayer.h" |
|
22 #include "javacommonutils.h" |
|
23 |
|
24 using namespace std; |
|
25 using namespace java::storage; |
|
26 using namespace java::security::legacysupport; |
|
27 using namespace java::util; |
|
28 |
|
29 StorageUtils* StorageUtils::NewL() |
|
30 { |
|
31 StorageUtils* self = new(ELeave) StorageUtils(); |
|
32 CleanupStack::PushL(self); |
|
33 self->ConstructL(); |
|
34 CleanupStack::Pop(self); |
|
35 return self; |
|
36 } |
|
37 |
|
38 StorageUtils::StorageUtils() |
|
39 { |
|
40 } |
|
41 |
|
42 void StorageUtils::ConstructL() |
|
43 { |
|
44 try |
|
45 { |
|
46 iStorage = JavaStorage::createInstance(); |
|
47 iStorage->open(JAVA_DATABASE_NAME); |
|
48 } |
|
49 catch (JavaStorageException& aJse) |
|
50 { |
|
51 User::Leave(aJse.mStatus); |
|
52 } |
|
53 } |
|
54 |
|
55 void StorageUtils::readOnScreenKeyboardAttributeL(const std::wstring& aMidletSuiteUid, wstring& aValue) |
|
56 { |
|
57 try |
|
58 { |
|
59 JavaStorageApplicationEntry_t query; |
|
60 JavaStorageApplicationList_t queryResult; |
|
61 JavaStorageEntry attr; |
|
62 attr.setEntry(ID, aMidletSuiteUid); |
|
63 query.insert(attr); |
|
64 attr.setEntry(ON_SCREEN_KEYPAD, L""); |
|
65 query.insert(attr); |
|
66 iStorage->search(MIDP_PACKAGE_TABLE, query, queryResult); |
|
67 wstring value = L""; |
|
68 findEntry(queryResult, ON_SCREEN_KEYPAD, aValue); |
|
69 if (aValue.size() == 0) |
|
70 { |
|
71 User::Leave(KErrNotFound); |
|
72 } |
|
73 } |
|
74 catch (JavaStorageException& aJse) |
|
75 { |
|
76 User::Leave(KErrNotFound); |
|
77 } |
|
78 } |
|
79 |
|
80 void StorageUtils::writeOnScreenKeyboardAttribute(const std::wstring& aMidletSuiteUid, const wstring& aValue) |
|
81 { |
|
82 try |
|
83 { |
|
84 JavaStorageApplicationEntry_t oldEntry; |
|
85 JavaStorageEntry attr; |
|
86 attr.setEntry(ID, aMidletSuiteUid); |
|
87 oldEntry.insert(attr); |
|
88 JavaStorageApplicationEntry_t entry; |
|
89 attr.setEntry(ON_SCREEN_KEYPAD, aValue); |
|
90 entry.insert(attr); |
|
91 iStorage->update(MIDP_PACKAGE_TABLE, entry, oldEntry); |
|
92 } |
|
93 catch (JavaStorageException& aJse) |
|
94 { |
|
95 } |
|
96 } |
|
97 |
|
98 void StorageUtils::readMidletSuitesInfos(vector<MidletSuiteInfo*>& aMidletSuites) |
|
99 { |
|
100 try |
|
101 { |
|
102 JavaStorageApplicationEntry_t query; |
|
103 JavaStorageApplicationList_t queryResult; |
|
104 JavaStorageEntry attr; |
|
105 attr.setEntry(ID, L""); |
|
106 query.insert(attr); |
|
107 attr.setEntry(PACKAGE_NAME, L""); |
|
108 query.insert(attr); |
|
109 attr.setEntry(VENDOR, L""); |
|
110 query.insert(attr); |
|
111 attr.setEntry(VERSION, L""); |
|
112 query.insert(attr); |
|
113 iStorage->search(APPLICATION_PACKAGE_TABLE, query, queryResult); |
|
114 JavaStorageApplicationList_t::const_iterator iterator; |
|
115 JavaStorageApplicationList_t domainQueryResult; |
|
116 MidletSuiteInfo* info; |
|
117 for (iterator = queryResult.begin(); iterator != queryResult.end(); iterator++) |
|
118 { |
|
119 std::wstring suiteUid = L""; |
|
120 std::wstring suiteName = L""; |
|
121 std::wstring suiteVendor = L""; |
|
122 std::wstring suiteVersion = L""; |
|
123 std::wstring suiteProtectionDomain = L""; |
|
124 JavaStorageApplicationEntry_t entry = (*iterator); |
|
125 findColumn(entry, ID, suiteUid); |
|
126 findColumn(entry, PACKAGE_NAME, suiteName); |
|
127 findColumn(entry, VENDOR, suiteVendor); |
|
128 findColumn(entry, VERSION, suiteVersion); |
|
129 entry.clear(); |
|
130 query.clear(); |
|
131 attr.setEntry(ID, suiteUid); |
|
132 query.insert(attr); |
|
133 attr.setEntry(SECURITY_DOMAIN_CATEGORY, L""); |
|
134 query.insert(attr); |
|
135 domainQueryResult.clear(); |
|
136 iStorage->search(MIDP_PACKAGE_TABLE, query, domainQueryResult); |
|
137 findEntry(queryResult,SECURITY_DOMAIN_CATEGORY , suiteProtectionDomain); |
|
138 info = new MidletSuiteInfo(suiteUid, suiteName, suiteVendor, suiteVersion, suiteProtectionDomain); |
|
139 aMidletSuites.push_back(info); |
|
140 } |
|
141 } |
|
142 catch (JavaStorageException& aJse) |
|
143 { |
|
144 } |
|
145 } |
|
146 |
|
147 void StorageUtils::readMidletSuiteInfoL(const std::wstring& aMidletSuiteName, const std::wstring& aMidletSuiteVendor, const std::wstring& aMidletSuiteVersion, MidletSuiteInfo& aMidletSuiteInfo) |
|
148 { |
|
149 if (aMidletSuiteName.size() == 0 |
|
150 || aMidletSuiteVendor.size() == 0 |
|
151 || aMidletSuiteVersion.size() == 0) |
|
152 { |
|
153 User::Leave(KErrNotFound); |
|
154 } |
|
155 try |
|
156 { |
|
157 JavaStorageApplicationEntry_t query; |
|
158 JavaStorageApplicationList_t queryResult; |
|
159 JavaStorageEntry attr; |
|
160 wstring midletSuiteUid = L""; |
|
161 attr.setEntry(ID, L""); |
|
162 query.insert(attr); |
|
163 attr.setEntry(PACKAGE_NAME, aMidletSuiteName); |
|
164 query.insert(attr); |
|
165 attr.setEntry(VENDOR, aMidletSuiteVendor); |
|
166 query.insert(attr); |
|
167 attr.setEntry(VERSION, aMidletSuiteVersion); |
|
168 query.insert(attr); |
|
169 iStorage->search(APPLICATION_PACKAGE_TABLE, query, queryResult); |
|
170 findEntry(queryResult, ID, midletSuiteUid); |
|
171 wstring midletSuiteVersion = aMidletSuiteVersion; |
|
172 if (midletSuiteUid.size() == 0) |
|
173 { |
|
174 TAppVersion appVersion = wstringToAppVersion(aMidletSuiteVersion); |
|
175 midletSuiteVersion = JavaCommonUtils::intToWstring(appVersion.iMajor); |
|
176 midletSuiteVersion += L"."; |
|
177 midletSuiteVersion += JavaCommonUtils::intToWstring(appVersion.iMinor); |
|
178 query.clear(); |
|
179 queryResult.clear(); |
|
180 attr.setEntry(ID, L""); |
|
181 query.insert(attr); |
|
182 attr.setEntry(PACKAGE_NAME, aMidletSuiteName); |
|
183 query.insert(attr); |
|
184 attr.setEntry(VENDOR, aMidletSuiteVendor); |
|
185 query.insert(attr); |
|
186 attr.setEntry(VERSION, midletSuiteVersion); |
|
187 query.insert(attr); |
|
188 iStorage->search(APPLICATION_PACKAGE_TABLE, query, queryResult); |
|
189 findEntry(queryResult, ID, midletSuiteUid); |
|
190 if (midletSuiteUid.size() == 0) |
|
191 { |
|
192 // one more try: the long version |
|
193 midletSuiteVersion += L"."; |
|
194 midletSuiteVersion += JavaCommonUtils::intToWstring(appVersion.iBuild); |
|
195 query.clear(); |
|
196 queryResult.clear(); |
|
197 attr.setEntry(ID, L""); |
|
198 query.insert(attr); |
|
199 attr.setEntry(PACKAGE_NAME, aMidletSuiteName); |
|
200 query.insert(attr); |
|
201 attr.setEntry(VENDOR, aMidletSuiteVendor); |
|
202 query.insert(attr); |
|
203 attr.setEntry(VERSION, midletSuiteVersion); |
|
204 query.insert(attr); |
|
205 iStorage->search(APPLICATION_PACKAGE_TABLE, query, queryResult); |
|
206 findEntry(queryResult, ID, midletSuiteUid); |
|
207 if (midletSuiteUid.size() == 0) |
|
208 { |
|
209 User::Leave(KErrNotFound); |
|
210 } |
|
211 } |
|
212 } |
|
213 query.clear(); |
|
214 attr.setEntry(ID, midletSuiteUid); |
|
215 query.insert(attr); |
|
216 attr.setEntry(SECURITY_DOMAIN_CATEGORY, L""); |
|
217 query.insert(attr); |
|
218 queryResult.clear(); |
|
219 iStorage->search(MIDP_PACKAGE_TABLE, query, queryResult); |
|
220 wstring midletSuiteDomain = L""; |
|
221 findEntry(queryResult,SECURITY_DOMAIN_CATEGORY , midletSuiteDomain); |
|
222 if (midletSuiteDomain.size() == 0) |
|
223 { |
|
224 User::Leave(KErrNotFound); |
|
225 } |
|
226 MidletSuiteInfo midletSuiteInfo(midletSuiteUid, |
|
227 aMidletSuiteName, |
|
228 aMidletSuiteVendor, |
|
229 midletSuiteVersion, |
|
230 midletSuiteDomain); |
|
231 aMidletSuiteInfo = midletSuiteInfo; |
|
232 } |
|
233 catch (JavaStorageException& aJse) |
|
234 { |
|
235 User::Leave(KErrNotFound); |
|
236 } |
|
237 } |
|
238 |
|
239 int StorageUtils::readMidletSuiteSecuritySettings(const std::wstring& aMidletSuiteUid, std::vector<MidletSuiteSecuritySettings>& aMidletSuiteSecuritySettings) |
|
240 { |
|
241 try |
|
242 { |
|
243 JavaStorageApplicationEntry_t query; |
|
244 JavaStorageApplicationList_t queryResult; |
|
245 JavaStorageEntry attr; |
|
246 attr.setEntry(ID, aMidletSuiteUid); |
|
247 query.insert(attr); |
|
248 attr.setEntry(FUNCTION_GROUP, L""); |
|
249 query.insert(attr); |
|
250 iStorage->search(MIDP_FUNC_GRP_SETTINGS_TABLE, query, queryResult); |
|
251 JavaStorageApplicationList_t::const_iterator iterator; |
|
252 JavaStorageApplicationList_t settingsQueryResult; |
|
253 MidletSuiteSecuritySettings settings; |
|
254 for (iterator = queryResult.begin(); iterator != queryResult.end(); iterator++) |
|
255 { |
|
256 std::wstring settingsName = L""; |
|
257 JavaStorageApplicationEntry_t entry = (*iterator); |
|
258 findColumn(entry, FUNCTION_GROUP, settingsName); |
|
259 entry.clear(); |
|
260 query.clear(); |
|
261 attr.setEntry(ID, aMidletSuiteUid); |
|
262 query.insert(attr); |
|
263 attr.setEntry(FUNCTION_GROUP, settingsName); |
|
264 query.insert(attr); |
|
265 attr.setEntry(CURRENT_SETTING, L""); |
|
266 query.insert(attr); |
|
267 attr.setEntry(ALLOWED_SETTINGS , L""); |
|
268 query.insert(attr); |
|
269 settingsQueryResult.clear(); |
|
270 iStorage->search(MIDP_FUNC_GRP_SETTINGS_TABLE, query, settingsQueryResult); |
|
271 if (settingsQueryResult.size() > 0) |
|
272 { |
|
273 wstring currentInteractionMode = L""; |
|
274 wstring allowedInteractionModes = L""; |
|
275 findEntry(settingsQueryResult,CURRENT_SETTING , currentInteractionMode); |
|
276 findEntry(settingsQueryResult,ALLOWED_SETTINGS , allowedInteractionModes); |
|
277 if (currentInteractionMode.size() > 0 && allowedInteractionModes.size() > 0) |
|
278 { |
|
279 settings = MidletSuiteSecuritySettings( |
|
280 settingsName, |
|
281 JavaCommonUtils::wstringToInt(currentInteractionMode), |
|
282 JavaCommonUtils::wstringToInt(allowedInteractionModes)); |
|
283 } |
|
284 } |
|
285 aMidletSuiteSecuritySettings.push_back(settings); |
|
286 } |
|
287 } |
|
288 catch (JavaStorageException& aJse) |
|
289 { |
|
290 return KErrNotFound; |
|
291 } |
|
292 return KErrNone; |
|
293 } |
|
294 |
|
295 int StorageUtils::readMidletSuiteSecuritySettings(const std::wstring& aMidletSuiteUid, const std::wstring& aSettingsName, MidletSuiteSecuritySettings& aSecuritySettings) |
|
296 { |
|
297 try |
|
298 { |
|
299 JavaStorageApplicationEntry_t query; |
|
300 JavaStorageApplicationList_t queryResult; |
|
301 JavaStorageEntry attr; |
|
302 attr.setEntry(ID, aMidletSuiteUid); |
|
303 query.insert(attr); |
|
304 attr.setEntry(FUNCTION_GROUP, aSettingsName); |
|
305 query.insert(attr); |
|
306 iStorage->search(MIDP_FUNC_GRP_SETTINGS_TABLE, query, queryResult); |
|
307 if (queryResult.size() == 0) |
|
308 { |
|
309 return KErrNotFound; |
|
310 } |
|
311 MidletSuiteSecuritySettings settings; |
|
312 queryResult.clear(); |
|
313 attr.setEntry(CURRENT_SETTING, L""); |
|
314 query.insert(attr); |
|
315 attr.setEntry(ALLOWED_SETTINGS , L""); |
|
316 query.insert(attr); |
|
317 iStorage->search(MIDP_FUNC_GRP_SETTINGS_TABLE, query, queryResult); |
|
318 if (queryResult.size() > 0) |
|
319 { |
|
320 wstring currentInteractionMode = L""; |
|
321 wstring allowedInteractionModes = L""; |
|
322 findEntry(queryResult,CURRENT_SETTING , currentInteractionMode); |
|
323 findEntry(queryResult,ALLOWED_SETTINGS , allowedInteractionModes); |
|
324 if (currentInteractionMode.size() > 0 && allowedInteractionModes.size() > 0) |
|
325 { |
|
326 settings = MidletSuiteSecuritySettings( |
|
327 JavaCommonUtils::wstringToInt(currentInteractionMode), |
|
328 JavaCommonUtils::wstringToInt(allowedInteractionModes)); |
|
329 } |
|
330 } |
|
331 aSecuritySettings = settings; |
|
332 } |
|
333 catch (JavaStorageException& aJse) |
|
334 { |
|
335 return KErrNotFound; |
|
336 } |
|
337 return KErrNone; |
|
338 } |
|
339 |
|
340 int StorageUtils::writeMidletSuiteSecuritySettings(const std::wstring& aMidletSuiteUid, const std::wstring& aSettingsName, int aCurrentInteractionMode) |
|
341 { |
|
342 try |
|
343 { |
|
344 JavaStorageApplicationEntry_t entry; |
|
345 JavaStorageApplicationEntry_t oldEntry; |
|
346 JavaStorageEntry attr; |
|
347 attr.setEntry(ID, aMidletSuiteUid); |
|
348 oldEntry.insert(attr); |
|
349 attr.setEntry(FUNCTION_GROUP, aSettingsName); |
|
350 oldEntry.insert(attr); |
|
351 attr.setEntry(CURRENT_SETTING, JavaCommonUtils::intToWstring(aCurrentInteractionMode)); |
|
352 entry.insert(attr); |
|
353 iStorage->update(MIDP_FUNC_GRP_SETTINGS_TABLE, entry, oldEntry); |
|
354 } |
|
355 catch (JavaStorageException& aJse) |
|
356 { |
|
357 return KErrNotFound; |
|
358 } |
|
359 return KErrNone; |
|
360 } |
|
361 |
|
362 int StorageUtils::writeUserSecuritySettingsPromptFlag(const std::wstring& aMidletSuiteUid, const std::wstring& aSettingsName, bool aPromptFlag) |
|
363 { |
|
364 try |
|
365 { |
|
366 JavaStorageApplicationEntry_t entry; |
|
367 JavaStorageApplicationEntry_t oldEntry; |
|
368 JavaStorageEntry attr; |
|
369 attr.setEntry(ID, aMidletSuiteUid); |
|
370 oldEntry.insert(attr); |
|
371 attr.setEntry(FUNCTION_GROUP, aSettingsName); |
|
372 oldEntry.insert(attr); |
|
373 std::wstring blanketPrompt; |
|
374 if (aPromptFlag) |
|
375 { |
|
376 blanketPrompt = L"1"; |
|
377 } |
|
378 else |
|
379 { |
|
380 blanketPrompt = L"0"; |
|
381 } |
|
382 attr.setEntry(BLANKET_PROMPT, blanketPrompt); |
|
383 entry.insert(attr); |
|
384 iStorage->update(MIDP_FUNC_GRP_SETTINGS_TABLE, entry, oldEntry); |
|
385 } |
|
386 catch (JavaStorageException& aJse) |
|
387 { |
|
388 return KErrNotFound; |
|
389 } |
|
390 return KErrNone; |
|
391 } |
|
392 |
|
393 StorageUtils::~StorageUtils() |
|
394 { |
|
395 if (iStorage != NULL) |
|
396 { |
|
397 iStorage->close(); |
|
398 delete iStorage; |
|
399 iStorage = NULL; |
|
400 } |
|
401 } |
|
402 |
|
403 void StorageUtils::findEntry(const JavaStorageApplicationList_t& queryResult, |
|
404 const std::wstring& eName, |
|
405 std::wstring& eValue) |
|
406 { |
|
407 if (queryResult.size() > 0) |
|
408 { |
|
409 JavaStorageApplicationEntry_t entry = queryResult.front(); |
|
410 JavaStorageEntry findPattern; |
|
411 findPattern.setEntry(eName, L""); |
|
412 JavaStorageApplicationEntry_t::const_iterator findIterator = |
|
413 entry.find(findPattern); |
|
414 if (findIterator != entry.end()) |
|
415 { |
|
416 eValue = findIterator->entryValue(); |
|
417 } |
|
418 } |
|
419 } |
|
420 |
|
421 void StorageUtils::findColumn(const JavaStorageApplicationEntry_t& aEntry, |
|
422 const wstring& aColName, wstring& aColValue) |
|
423 { |
|
424 JavaStorageEntry findPattern; |
|
425 findPattern.setEntry(aColName, L""); |
|
426 JavaStorageApplicationEntry_t::const_iterator findIterator = |
|
427 aEntry.find(findPattern); |
|
428 if (findIterator != aEntry.end()) |
|
429 { |
|
430 aColValue = findIterator->entryValue(); |
|
431 } |
|
432 } |
|
433 |
|
434 // Converts a string from either xxx.yy(zzzzz) or xxx.yy.zzzzzz |
|
435 // into a TAppVersion representation |
|
436 // where xx is the major, yy is the minor and zzzzz is the build |
|
437 TAppVersion StorageUtils::wstringToAppVersion(const std::wstring& aVersionString) |
|
438 { |
|
439 TAppVersion appVersion; |
|
440 char* temp = JavaCommonUtils::wstringToUtf8(aVersionString); |
|
441 std::string versionStr = temp; |
|
442 |
|
443 std::string::size_type idx = 0; |
|
444 idx = versionStr.find(".", idx); |
|
445 |
|
446 if (idx != std::string::npos) |
|
447 { |
|
448 versionStr.replace(idx, 1, " "); |
|
449 } |
|
450 |
|
451 std::string::size_type tmp = 0; |
|
452 tmp = versionStr.find("(", idx + 1); |
|
453 |
|
454 if (tmp != std::string::npos) |
|
455 { |
|
456 idx = tmp; |
|
457 versionStr.replace(idx, 1, " "); |
|
458 } |
|
459 else |
|
460 { |
|
461 tmp = versionStr.find(".", idx + 1); |
|
462 idx = tmp; |
|
463 if (tmp != std::string::npos) |
|
464 { |
|
465 versionStr.replace(idx, 1, " "); |
|
466 } |
|
467 } |
|
468 |
|
469 tmp = versionStr.find(")", idx + 1); |
|
470 |
|
471 if (tmp != std::string::npos) |
|
472 { |
|
473 idx = tmp; |
|
474 versionStr.replace(idx, 1, " "); |
|
475 } |
|
476 else |
|
477 { |
|
478 tmp = versionStr.find(".", idx + 1); |
|
479 idx = tmp; |
|
480 if (tmp != std::string::npos) |
|
481 { |
|
482 versionStr.replace(idx, 1, " "); |
|
483 } |
|
484 } |
|
485 |
|
486 int major = 0; |
|
487 int minor = 0; |
|
488 int build = 0; |
|
489 int result = sscanf( |
|
490 versionStr.c_str(), "%d %d %d", &major, &minor, &build); |
|
491 |
|
492 if (major > 0) |
|
493 { |
|
494 appVersion.iMajor = major; |
|
495 } |
|
496 |
|
497 if (minor > 0) |
|
498 { |
|
499 appVersion.iMinor = minor; |
|
500 } |
|
501 |
|
502 if (build > 0) |
|
503 { |
|
504 appVersion.iBuild = build; |
|
505 } |
|
506 delete[] temp; |
|
507 |
|
508 return appVersion; |
|
509 } |
|
510 |
|
511 |
|
512 MidletSuiteInfo::MidletSuiteInfo(const std::wstring& aUid, |
|
513 const std::wstring& aName, |
|
514 const std::wstring& aVendor, |
|
515 const std::wstring& aVersion, |
|
516 const std::wstring& aProtectionDomain) |
|
517 : iUid(aUid), iName(aName), iVendor(aVendor), iVersion(aVersion), iProtectionDomain(aProtectionDomain) |
|
518 { |
|
519 } |
|
520 |
|
521 MidletSuiteInfo& MidletSuiteInfo::operator=(const MidletSuiteInfo& aMidletSuiteInfo) |
|
522 { |
|
523 iUid = aMidletSuiteInfo.iUid; |
|
524 iName = aMidletSuiteInfo.iName; |
|
525 iVendor = aMidletSuiteInfo.iVendor; |
|
526 iVersion = aMidletSuiteInfo.iVersion; |
|
527 iProtectionDomain = aMidletSuiteInfo.iProtectionDomain; |
|
528 return *this; |
|
529 } |
|
530 |
|
531 MidletSuiteInfo::MidletSuiteInfo() |
|
532 : iUid(L""), iName(L""), iVendor(L""), iVersion(L""), iProtectionDomain(L"") |
|
533 { |
|
534 } |
|
535 |
|
536 MidletSuiteSecuritySettings::MidletSuiteSecuritySettings(const int aCurrentInteractionMode, |
|
537 const int aAllowedInteractionModes) |
|
538 : iSettingsName(L""), iCurrentInteractionMode(aCurrentInteractionMode), iAllowedInteractionModes(aAllowedInteractionModes) |
|
539 { |
|
540 } |
|
541 |
|
542 MidletSuiteSecuritySettings::MidletSuiteSecuritySettings(const std::wstring& aSettingsName, |
|
543 const int aCurrentInteractionMode, |
|
544 const int aAllowedInteractionModes) |
|
545 : iSettingsName(aSettingsName), iCurrentInteractionMode(aCurrentInteractionMode), iAllowedInteractionModes(aAllowedInteractionModes) |
|
546 { |
|
547 } |
|
548 |
|
549 MidletSuiteSecuritySettings& MidletSuiteSecuritySettings::operator=(const MidletSuiteSecuritySettings& aMidletSuiteSecuritySettings) |
|
550 { |
|
551 iSettingsName = aMidletSuiteSecuritySettings.iSettingsName; |
|
552 iCurrentInteractionMode = aMidletSuiteSecuritySettings.iCurrentInteractionMode; |
|
553 iAllowedInteractionModes = aMidletSuiteSecuritySettings.iAllowedInteractionModes; |
|
554 return *this; |
|
555 } |
|
556 |
|
557 MidletSuiteSecuritySettings::MidletSuiteSecuritySettings(const MidletSuiteSecuritySettings& aMidletSuiteSecuritySettings) |
|
558 { |
|
559 iSettingsName = aMidletSuiteSecuritySettings.iSettingsName; |
|
560 iCurrentInteractionMode = aMidletSuiteSecuritySettings.iCurrentInteractionMode; |
|
561 iAllowedInteractionModes = aMidletSuiteSecuritySettings.iAllowedInteractionModes; |
|
562 } |
|
563 |
|
564 MidletSuiteSecuritySettings::MidletSuiteSecuritySettings() |
|
565 : iSettingsName(L""), iCurrentInteractionMode(-1), iAllowedInteractionModes(-1) |
|
566 { |
|
567 } |