|
1 /* |
|
2 * Copyright (c) 2008 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: CAppMngr2MidletSettingsHandler implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <featmgr.h> |
|
21 #include <StringLoader.h> // StringLoader |
|
22 #include <cmmanagerext.h> // RCmManagerExt |
|
23 #include <cmdestinationext.h> // RCmDestinationExt |
|
24 #include "appmngr2midletsettingshandler.h" |
|
25 #include "appmngr2midletconstants.h" |
|
26 #include "securitystoragedatadefs.h" |
|
27 |
|
28 #include <javaapplicationsettings.rsg> // Midlet resource IDs |
|
29 |
|
30 #include "connectionmanager.h" // ConnectionManager. |
|
31 #include "javastoragenames.h" // Storage constants. |
|
32 #include "javasymbianoslayer.h" // STL <-- --> Symbian conv. |
|
33 #include "javauid.h" // Uid. |
|
34 #include "logger.h" // LOG. |
|
35 #include "appmngr2midletresourcehandler.h" // CAppMngr2MidletResourceHandler |
|
36 |
|
37 using namespace java::storage; |
|
38 using namespace std; |
|
39 using namespace java::util; |
|
40 |
|
41 // ================= MEMBER FUNCTIONS ======================= |
|
42 |
|
43 // ----------------------------------------------------------------------------- |
|
44 // CAppMngr2MidletSettingsHandler::NewL |
|
45 // |
|
46 // Two-phased constructor. |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 CAppMngr2MidletSettingsHandler* CAppMngr2MidletSettingsHandler::NewL(const TDesC& aMidletSuiteName,TUid aMidletSuiteUid, CAppMngr2MidletResourceHandler& aResourceHandler) |
|
50 { |
|
51 LOG(EJavaAppMngrPlugin, EInfo, " + CAppMngr2MidletSettingsHandler::NewL "); |
|
52 CAppMngr2MidletSettingsHandler* self |
|
53 = new(ELeave) CAppMngr2MidletSettingsHandler(aResourceHandler); |
|
54 CleanupStack::PushL(self); |
|
55 self->ConstructL(aMidletSuiteName,aMidletSuiteUid); |
|
56 CleanupStack::Pop(self); |
|
57 |
|
58 LOG(EJavaAppMngrPlugin, EInfo, " - CAppMngr2MidletSettingsHandler::NewL "); |
|
59 |
|
60 return self; |
|
61 } |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // Destructor |
|
65 // |
|
66 // Deletes database and ApUtils and cleans and deletes Midlet User Preferences. |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 CAppMngr2MidletSettingsHandler::~CAppMngr2MidletSettingsHandler() |
|
70 { |
|
71 LOG(EJavaAppMngrPlugin, EInfo, " + CAppMngr2MidletSettingsHandler::~CAppMngr2MidletSettingsHandler "); |
|
72 |
|
73 delete iMidletSuiteName; |
|
74 LOG(EJavaAppMngrPlugin, EInfo, " - CAppMngr2MidletSettingsHandler::~CAppMngr2MidletSettingsHandler "); |
|
75 } |
|
76 |
|
77 // --------------------------------------------------------------------------- |
|
78 // C++ constructor |
|
79 // --------------------------------------------------------------------------- |
|
80 CAppMngr2MidletSettingsHandler::CAppMngr2MidletSettingsHandler(CAppMngr2MidletResourceHandler& aResourceHandler) |
|
81 : iMidletSuiteName(NULL), iResourceHandler(aResourceHandler) |
|
82 { |
|
83 } |
|
84 |
|
85 // ----------------------------------------------------------------------------- |
|
86 // CAppMngr2MidletSettingsHandler::ConstructL |
|
87 // |
|
88 // Symbian OS two phased constructor |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 void CAppMngr2MidletSettingsHandler::ConstructL(const TDesC& aMidletSuiteName,TUid aMidletSuiteUid) |
|
92 { |
|
93 LOG(EJavaAppMngrPlugin, EInfo, " + CAppMngr2MidletSettingsHandler::ConstructL "); |
|
94 |
|
95 iStorage.reset(JavaStorage::createInstance()); |
|
96 |
|
97 try |
|
98 { |
|
99 iStorage->open(); |
|
100 } |
|
101 catch (JavaStorageException& aJse) |
|
102 { |
|
103 ELOG1(EJavaAppMngrPlugin, "SettingsHandler: Cannot open storage: %d", |
|
104 aJse.mStatus); |
|
105 User::Leave(aJse.mStatus); |
|
106 } |
|
107 iMidletSuiteName = aMidletSuiteName.AllocL(); |
|
108 TUidToUid(aMidletSuiteUid, iMidletSuiteUid); |
|
109 LOG(EJavaAppMngrPlugin, EInfo, " - CAppMngr2MidletSettingsHandler::ConstructL "); |
|
110 } |
|
111 |
|
112 // ----------------------------------------------------------------------------- |
|
113 // CAppMngr2MidletSettingsHandler::GetCurrentSuiteSnapL |
|
114 // |
|
115 // Reads the current Midlet destination network from DB. |
|
116 // ----------------------------------------------------------------------------- |
|
117 // |
|
118 CAppMngr2SuiteSnapItem* CAppMngr2MidletSettingsHandler::GetSnapL() |
|
119 { |
|
120 LOG(EJavaAppMngrPlugin, EInfo, " + CAppMngr2MidletSettingsHandler::GetCurrentSuiteSnapL "); |
|
121 |
|
122 CAppMngr2SuiteSnapItem* snap = new(ELeave) CAppMngr2SuiteSnapItem; |
|
123 unsigned int apnId = ConnectionManager::getDestinationNetworkIdL(iMidletSuiteUid); |
|
124 snap->iId = apnId; |
|
125 |
|
126 HBufC* name = NULL; |
|
127 TInt resourceOffset = iResourceHandler.AddResourceFileL(); |
|
128 switch (apnId) |
|
129 { |
|
130 case(TUint)KAlwaysAskId: |
|
131 { |
|
132 name = StringLoader::LoadL(R_JAVA_CONSET_SETT_ALWAYS_ASK); |
|
133 break; |
|
134 } |
|
135 case(TUint)KJavaNetworkAccessNotSpecified: |
|
136 case(TUint)KDefaultConnection: |
|
137 { |
|
138 name = StringLoader::LoadL(R_JAVA_CONSET_SETT_DEFAULT_CONNECTION); |
|
139 break; |
|
140 } |
|
141 default: |
|
142 { |
|
143 RCmManagerExt manager; |
|
144 manager.OpenLC(); |
|
145 RCmDestinationExt destination = manager.DestinationL(apnId); |
|
146 CleanupClosePushL(destination); |
|
147 name = destination.NameLC(); |
|
148 CleanupStack::Pop(name); |
|
149 CleanupStack::PopAndDestroy(&destination); |
|
150 CleanupStack::PopAndDestroy(&manager); |
|
151 } |
|
152 } |
|
153 if (resourceOffset > 0) |
|
154 { |
|
155 iResourceHandler.DeleteResourceFile(resourceOffset); |
|
156 } |
|
157 snap->iName = wstring((const wchar_t*)name->Ptr(), name->Length()); |
|
158 delete name; |
|
159 name = NULL; |
|
160 |
|
161 LOG(EJavaAppMngrPlugin, EInfo, " - CAppMngr2MidletSettingsHandler::GetCurrentSuiteSnapL "); |
|
162 |
|
163 return snap; |
|
164 } |
|
165 |
|
166 |
|
167 // --------------------------------------------------------------------------- |
|
168 // CAppMngr2MidletSettingsHandler::GetOnScreenKeyboardValueL() |
|
169 // |
|
170 // Reads custom attribute value KOnScreenKeyboardAttribute |
|
171 // --------------------------------------------------------------------------- |
|
172 // |
|
173 const std::wstring CAppMngr2MidletSettingsHandler::GetOnScreenKeypadValueL() |
|
174 { |
|
175 LOG(EJavaAppMngrPlugin, EInfo, " + CAppMngr2MidletSettingsHandler::GetOnScreenKeyboardValueL "); |
|
176 |
|
177 wstring value = L""; |
|
178 |
|
179 JavaStorageApplicationEntry_t query; |
|
180 JavaStorageApplicationList_t queryResult; |
|
181 JavaStorageEntry attr; |
|
182 attr.setEntry(ID, iMidletSuiteUid.toString()); |
|
183 query.insert(attr); |
|
184 attr.setEntry(ON_SCREEN_KEYPAD, L""); |
|
185 query.insert(attr); |
|
186 |
|
187 try |
|
188 { |
|
189 iStorage->search(MIDP_PACKAGE_TABLE, query, queryResult); |
|
190 } |
|
191 catch (JavaStorageException& aJse) |
|
192 { |
|
193 ELOG1(EJavaAppMngrPlugin, "ON_SCREEN_KEYPAD value read failed: %d", aJse.mStatus); |
|
194 // Don't leave. Set defaults. |
|
195 } |
|
196 |
|
197 findEntry(queryResult, ON_SCREEN_KEYPAD, value); |
|
198 |
|
199 if (value.size() <= 0) |
|
200 { |
|
201 // default is KValueGameactions if value is not defined |
|
202 value = ON_SCREEN_KEYPAD_VALUE_GAMEACTIONS; |
|
203 } |
|
204 LOG(EJavaAppMngrPlugin, EInfo, " - CAppMngr2MidletSettingsHandler::GetOnScreenKeyboardValueL "); |
|
205 |
|
206 return value; |
|
207 } |
|
208 |
|
209 bool CAppMngr2MidletSettingsHandler::OnScreenKeypadValuePreDefinedL() |
|
210 { |
|
211 LOG(EJavaAppMngrPlugin, EInfo, " + CAppMngr2MidletSettingsHandler::OnScreenKeypadValuePreDefinedL "); |
|
212 |
|
213 wstring value = L""; |
|
214 bool predefined = false; |
|
215 |
|
216 JavaStorageApplicationEntry_t query; |
|
217 JavaStorageApplicationList_t queryResult; |
|
218 JavaStorageEntry attr; |
|
219 attr.setEntry(ID, iMidletSuiteUid.toString()); |
|
220 query.insert(attr); |
|
221 attr.setEntry(NAME, L"Nokia-MIDlet-On-Screen-Keypad"); |
|
222 query.insert(attr); |
|
223 attr.setEntry(VALUE, L""); |
|
224 query.insert(attr); |
|
225 |
|
226 try |
|
227 { |
|
228 iStorage->search(APPLICATION_PACKAGE_ATTRIBUTES_TABLE, query, queryResult); |
|
229 } |
|
230 catch (JavaStorageException& aJse) |
|
231 { |
|
232 ELOG1(EJavaAppMngrPlugin, "Nokia-MIDlet-On-Screen-Keypad value read failed: %d", aJse.mStatus); |
|
233 // Don't leave. Set defaults. |
|
234 } |
|
235 |
|
236 findEntry(queryResult, VALUE, value); |
|
237 |
|
238 if (value.size() > 0) |
|
239 { |
|
240 // default is KValueGameactions if value is not defined |
|
241 predefined = true; |
|
242 } |
|
243 LOG(EJavaAppMngrPlugin, EInfo, " - CAppMngr2MidletSettingsHandler::OnScreenKeypadValuePreDefinedL "); |
|
244 |
|
245 return predefined; |
|
246 } |
|
247 |
|
248 // --------------------------------------------------------------------------- |
|
249 // CAppMngr2MidletSettingsHandler::SetOnScreenKeyboardValueL() |
|
250 // |
|
251 // Writes custom attribute value KOnScreenKeyboardAttribute |
|
252 // --------------------------------------------------------------------------- |
|
253 // |
|
254 int CAppMngr2MidletSettingsHandler::SetOnScreenKeypadValueL(const std::wstring& aValue) |
|
255 { |
|
256 LOG(EJavaAppMngrPlugin, EInfo, " + CAppMngr2MidletSettingsHandler::SetOnScreenKeyboardValueL "); |
|
257 |
|
258 JavaStorageApplicationEntry_t oldEntry; |
|
259 JavaStorageEntry attr; |
|
260 attr.setEntry(ID, iMidletSuiteUid.toString()); |
|
261 oldEntry.insert(attr); |
|
262 JavaStorageApplicationEntry_t entry; |
|
263 attr.setEntry(ON_SCREEN_KEYPAD, aValue); |
|
264 entry.insert(attr); |
|
265 |
|
266 try |
|
267 { |
|
268 iStorage->update(MIDP_PACKAGE_TABLE, entry, oldEntry); |
|
269 } |
|
270 catch (JavaStorageException& aJse) |
|
271 { |
|
272 ELOG1(EJavaAppMngrPlugin, "Failed to set ON_SCREEN_KEYPAD: %d", aJse.mStatus); |
|
273 return KErrNotFound; |
|
274 } |
|
275 |
|
276 LOG(EJavaAppMngrPlugin, EInfo, " - CAppMngr2MidletSettingsHandler::SetOnScreenKeyboardValueL "); |
|
277 |
|
278 return KErrNone; |
|
279 |
|
280 } |
|
281 |
|
282 |
|
283 // ----------------------------------------------------------------------------- |
|
284 // CAppMngr2MidletSettingsHandler::SetCurrentSuiteSnapL |
|
285 // |
|
286 // Set selected access point to DB |
|
287 // ----------------------------------------------------------------------------- |
|
288 // |
|
289 void CAppMngr2MidletSettingsHandler::SetSnapL(const CAppMngr2SuiteSnapItem& aSnap) |
|
290 { |
|
291 LOG(EJavaAppMngrPlugin, EInfo, " + CAppMngr2MidletSettingsHandler::SetCurrentSuiteSnapL "); |
|
292 |
|
293 ConnectionManager::setDestinationNetworkIdL(iMidletSuiteUid, aSnap.iId); |
|
294 |
|
295 LOG(EJavaAppMngrPlugin, EInfo, " - CAppMngr2MidletSettingsHandler::SetCurrentSuiteSnapL "); |
|
296 } |
|
297 |
|
298 const std::wstring CAppMngr2MidletSettingsHandler::GetSecurityDomainCategory() |
|
299 { |
|
300 wstring securityDomainCategory = L""; |
|
301 |
|
302 JavaStorageApplicationEntry_t query; |
|
303 JavaStorageApplicationList_t queryResult; |
|
304 JavaStorageEntry attr; |
|
305 attr.setEntry(ID, iMidletSuiteUid.toString()); |
|
306 query.insert(attr); |
|
307 attr.setEntry(SECURITY_DOMAIN_CATEGORY, L""); |
|
308 query.insert(attr); |
|
309 |
|
310 try |
|
311 { |
|
312 iStorage->search(MIDP_PACKAGE_TABLE, query, queryResult); |
|
313 } |
|
314 catch (JavaStorageException& aJse) |
|
315 { |
|
316 ELOG1(EJavaAppMngrPlugin, "SECURITY_DOMAIN_CATEGORY value read failed: %d", aJse.mStatus); |
|
317 } |
|
318 |
|
319 findEntry(queryResult, SECURITY_DOMAIN_CATEGORY, securityDomainCategory); |
|
320 |
|
321 return securityDomainCategory; |
|
322 |
|
323 } |
|
324 |
|
325 const std::wstring CAppMngr2MidletSettingsHandler::GetSecurityDomainName() |
|
326 { |
|
327 wstring securityDomainName = L""; |
|
328 |
|
329 JavaStorageApplicationEntry_t query; |
|
330 JavaStorageApplicationList_t queryResult; |
|
331 JavaStorageEntry attr; |
|
332 attr.setEntry(ID, iMidletSuiteUid.toString()); |
|
333 query.insert(attr); |
|
334 attr.setEntry(SECURITY_DOMAIN, L""); |
|
335 query.insert(attr); |
|
336 |
|
337 try |
|
338 { |
|
339 iStorage->search(MIDP_PACKAGE_TABLE, query, queryResult); |
|
340 } |
|
341 catch (JavaStorageException& aJse) |
|
342 { |
|
343 ELOG1(EJavaAppMngrPlugin, "SECURITY_DOMAIN value read failed: %d", aJse.mStatus); |
|
344 } |
|
345 |
|
346 findEntry(queryResult, SECURITY_DOMAIN, securityDomainName); |
|
347 |
|
348 return securityDomainName; |
|
349 |
|
350 } |
|
351 |
|
352 const wstring CAppMngr2MidletSettingsHandler::GetSecurityWarningsMode() |
|
353 { |
|
354 wstring warningsMode = L""; |
|
355 |
|
356 JavaStorageApplicationEntry_t query; |
|
357 JavaStorageApplicationList_t queryResult; |
|
358 JavaStorageEntry attr; |
|
359 attr.setEntry(ID, iMidletSuiteUid.toString()); |
|
360 query.insert(attr); |
|
361 attr.setEntry(SECURITY_WARNINGS, L""); |
|
362 query.insert(attr); |
|
363 |
|
364 try |
|
365 { |
|
366 iStorage->search(MIDP_PACKAGE_TABLE, query, queryResult); |
|
367 } |
|
368 catch (JavaStorageException& aJse) |
|
369 { |
|
370 ELOG1(EJavaAppMngrPlugin, "ON_SCREEN_KEYPAD value read failed: %d", aJse.mStatus); |
|
371 // Don't leave. Set defaults. |
|
372 } |
|
373 |
|
374 findEntry(queryResult, SECURITY_WARNINGS, warningsMode); |
|
375 if (warningsMode.size() == 0) |
|
376 { |
|
377 warningsMode = SECURITY_WARNINGS_DEFAULT_MODE; |
|
378 } |
|
379 |
|
380 return warningsMode; |
|
381 } |
|
382 |
|
383 int CAppMngr2MidletSettingsHandler::SetSecurityWarningsMode(const wstring& aSecurityWarningsMode) |
|
384 { |
|
385 JavaStorageApplicationEntry_t oldEntry; |
|
386 JavaStorageEntry attr; |
|
387 attr.setEntry(ID, iMidletSuiteUid.toString()); |
|
388 oldEntry.insert(attr); |
|
389 JavaStorageApplicationEntry_t entry; |
|
390 attr.setEntry(SECURITY_WARNINGS, aSecurityWarningsMode); |
|
391 entry.insert(attr); |
|
392 |
|
393 try |
|
394 { |
|
395 iStorage->update(MIDP_PACKAGE_TABLE, entry, oldEntry); |
|
396 } |
|
397 catch (JavaStorageException& aJse) |
|
398 { |
|
399 ELOG1(EJavaAppMngrPlugin, "Failed to set SECURITY_WARNINGS: %d", aJse.mStatus); |
|
400 return KErrNotFound; |
|
401 } |
|
402 return KErrNone; |
|
403 } |
|
404 |
|
405 void CAppMngr2MidletSettingsHandler::GetSecuritySettings(std::vector<MidletSuiteSecuritySettings>& aMidletSuiteSecuritySettings) |
|
406 { |
|
407 try |
|
408 { |
|
409 JavaStorageApplicationEntry_t query; |
|
410 JavaStorageApplicationList_t queryResult; |
|
411 JavaStorageEntry attr; |
|
412 attr.setEntry(ID, iMidletSuiteUid.toString()); |
|
413 query.insert(attr); |
|
414 attr.setEntry(FUNCTION_GROUP, L""); |
|
415 query.insert(attr); |
|
416 iStorage->search(MIDP_FUNC_GRP_SETTINGS_TABLE, query, queryResult); |
|
417 JavaStorageApplicationList_t::const_iterator iterator; |
|
418 JavaStorageApplicationList_t settingsQueryResult; |
|
419 MidletSuiteSecuritySettings settings; |
|
420 for (iterator = queryResult.begin(); iterator != queryResult.end(); iterator++) |
|
421 { |
|
422 std::wstring settingsName = L""; |
|
423 JavaStorageApplicationEntry_t entry = (*iterator); |
|
424 findColumn(entry, FUNCTION_GROUP, settingsName); |
|
425 entry.clear(); |
|
426 query.clear(); |
|
427 attr.setEntry(ID, iMidletSuiteUid.toString()); |
|
428 query.insert(attr); |
|
429 attr.setEntry(FUNCTION_GROUP, settingsName); |
|
430 query.insert(attr); |
|
431 attr.setEntry(CURRENT_SETTING, L""); |
|
432 query.insert(attr); |
|
433 attr.setEntry(ALLOWED_SETTINGS , L""); |
|
434 query.insert(attr); |
|
435 settingsQueryResult.clear(); |
|
436 iStorage->search(MIDP_FUNC_GRP_SETTINGS_TABLE, query, settingsQueryResult); |
|
437 if (settingsQueryResult.size() > 0) |
|
438 { |
|
439 wstring currentInteractionMode = L""; |
|
440 wstring allowedInteractionModes = L""; |
|
441 findEntry(settingsQueryResult,CURRENT_SETTING , currentInteractionMode); |
|
442 findEntry(settingsQueryResult,ALLOWED_SETTINGS , allowedInteractionModes); |
|
443 if (currentInteractionMode.size() > 0 && allowedInteractionModes.size() > 0) |
|
444 { |
|
445 settings = MidletSuiteSecuritySettings( |
|
446 settingsName, |
|
447 currentInteractionMode, |
|
448 allowedInteractionModes); |
|
449 } |
|
450 } |
|
451 aMidletSuiteSecuritySettings.push_back(settings); |
|
452 } |
|
453 } |
|
454 catch (JavaStorageException& aJse) |
|
455 { |
|
456 } |
|
457 } |
|
458 |
|
459 int CAppMngr2MidletSettingsHandler::SetSecuritySettings(const std::wstring& aSettingsName, const std::wstring& aCurrentInteractionMode) |
|
460 { |
|
461 try |
|
462 { |
|
463 JavaStorageApplicationEntry_t entry; |
|
464 JavaStorageApplicationEntry_t oldEntry; |
|
465 JavaStorageEntry attr; |
|
466 attr.setEntry(ID, iMidletSuiteUid.toString()); |
|
467 oldEntry.insert(attr); |
|
468 attr.setEntry(FUNCTION_GROUP, aSettingsName); |
|
469 oldEntry.insert(attr); |
|
470 attr.setEntry(CURRENT_SETTING, aCurrentInteractionMode); |
|
471 entry.insert(attr); |
|
472 iStorage->update(MIDP_FUNC_GRP_SETTINGS_TABLE, entry, oldEntry); |
|
473 } |
|
474 catch (JavaStorageException& aJse) |
|
475 { |
|
476 return KErrNotFound; |
|
477 } |
|
478 return KErrNone; |
|
479 } |
|
480 |
|
481 int CAppMngr2MidletSettingsHandler::SetUserSecuritySettingsPromptFlag(const std::wstring& aSettingsName, bool aPromptFlag) |
|
482 { |
|
483 try |
|
484 { |
|
485 JavaStorageApplicationEntry_t entry; |
|
486 JavaStorageApplicationEntry_t oldEntry; |
|
487 JavaStorageEntry attr; |
|
488 attr.setEntry(ID, iMidletSuiteUid.toString()); |
|
489 oldEntry.insert(attr); |
|
490 attr.setEntry(FUNCTION_GROUP, aSettingsName); |
|
491 oldEntry.insert(attr); |
|
492 std::wstring blanketPrompt; |
|
493 if (aPromptFlag) |
|
494 { |
|
495 blanketPrompt = L"1"; |
|
496 } |
|
497 else |
|
498 { |
|
499 blanketPrompt = L"0"; |
|
500 } |
|
501 attr.setEntry(BLANKET_PROMPT, blanketPrompt); |
|
502 entry.insert(attr); |
|
503 iStorage->update(MIDP_FUNC_GRP_SETTINGS_TABLE, entry, oldEntry); |
|
504 } |
|
505 catch (JavaStorageException& aJse) |
|
506 { |
|
507 return KErrNotFound; |
|
508 } |
|
509 return KErrNone; |
|
510 } |
|
511 |
|
512 void CAppMngr2MidletSettingsHandler::findColumn(const JavaStorageApplicationEntry_t& aEntry, |
|
513 const wstring& aColName, wstring& aColValue) |
|
514 { |
|
515 JavaStorageEntry findPattern; |
|
516 findPattern.setEntry(aColName, L""); |
|
517 JavaStorageApplicationEntry_t::const_iterator findIterator = |
|
518 aEntry.find(findPattern); |
|
519 if (findIterator != aEntry.end()) |
|
520 { |
|
521 aColValue = findIterator->entryValue(); |
|
522 } |
|
523 } |
|
524 |
|
525 void CAppMngr2MidletSettingsHandler::findEntry(const JavaStorageApplicationList_t& queryResult, |
|
526 const std::wstring& eName, |
|
527 std::wstring& eValue) |
|
528 { |
|
529 if (queryResult.size() > 0) |
|
530 { |
|
531 JavaStorageApplicationEntry_t entry = queryResult.front(); |
|
532 JavaStorageEntry findPattern; |
|
533 findPattern.setEntry(eName, L""); |
|
534 JavaStorageApplicationEntry_t::const_iterator findIterator = |
|
535 entry.find(findPattern); |
|
536 if (findIterator != entry.end()) |
|
537 { |
|
538 eValue = findIterator->entryValue(); |
|
539 } |
|
540 } |
|
541 } |
|
542 |
|
543 // End of file |