25 #include <widgetmanagerview.rsg> |
25 #include <widgetmanagerview.rsg> |
26 #include <widgetmanager.mbg> |
26 #include <widgetmanager.mbg> |
27 #include "wmconfiguration.h" |
27 #include "wmconfiguration.h" |
28 #include "wmresourceloader.h" |
28 #include "wmresourceloader.h" |
29 #include "wmcrkeys.h" |
29 #include "wmcrkeys.h" |
30 #include "wmstore.h" |
|
31 |
30 |
32 // some constants regarging the central repository localised section. |
31 // some constants regarging the central repository localised section. |
33 // these will ensure CR localisation section compatibility even if |
32 // these will ensure CR localisation section compatibility even if |
34 // new strings are added |
33 // new strings are added |
35 const TInt KLangOffsetStoreUrl = KUrl_0 - KLangId_0; |
34 const TInt KLangOffsetOperatorUrl = KOperatorButtonUrl0 - KLangId0; |
36 const TInt KLangOffsetStoreText = KTitle_0 - KLangId_0; |
35 const TInt KLangOffsetOperatorText = KOperatorButtonText0 - KLangId0; |
37 const TInt KLangGroupSize = KLangId_1 - KLangId_0; |
36 const TInt KLangGroupSize = KLangId1 - KLangId0; |
38 const TUint32 KLastLangId = KLangId_9; |
37 const TUint32 KLastLangId = KLangId9; |
39 |
38 |
40 _LIT( KOpAppTypeS60, "s60" ); |
39 _LIT( KOpAppTypeS60, "s60" ); |
41 _LIT( KOpAppTypeCwrt, "cwrt" ); |
40 _LIT( KOpAppTypeCwrt, "cwrt" ); |
42 _LIT( KOpAppTypeWrt, "wrt" ); |
41 _LIT( KOpAppTypeWrt, "wrt" ); |
43 _LIT( KOpAppTypeJava, "java" ); |
42 _LIT( KOpAppTypeJava, "java" ); |
44 _LIT( KOpAppTypeQt, "qt" ); |
43 _LIT( KOpAppTypeQt, "qt" ); |
45 _LIT( KSeparator, ":" ); |
44 _LIT( KSeparator, ":" ); |
46 _LIT( KStoreIconFormat, "uid(%d)"); |
45 _LIT( KOperatorIcon, "uid(%d)"); |
47 _LIT( KHexPrefix, "0x" ); |
46 _LIT( KHexPrefix, "0x" ); |
48 |
47 |
49 // --------------------------------------------------------- |
48 // --------------------------------------------------------- |
50 // CWmConfiguration::NewL |
49 // CWmConfiguration::NewL |
51 // --------------------------------------------------------- |
50 // --------------------------------------------------------- |
66 // |
65 // |
67 CWmConfiguration::CWmConfiguration( |
66 CWmConfiguration::CWmConfiguration( |
68 CWmResourceLoader& aResourceLoader ) |
67 CWmResourceLoader& aResourceLoader ) |
69 : iResourceLoader( aResourceLoader ) |
68 : iResourceLoader( aResourceLoader ) |
70 { |
69 { |
71 |
70 |
|
71 // ovi |
|
72 iOviStoreUid = KNullUid; |
|
73 |
|
74 // operator |
|
75 iOperatorAppIdUid = KNullUid; |
|
76 iOperatorAppType = EUnknown; |
|
77 iOperatorButtonEnabled = EFalse; |
|
78 iButtonsMirrored = EFalse; |
72 } |
79 } |
73 |
80 |
74 // --------------------------------------------------------- |
81 // --------------------------------------------------------- |
75 // CWmConfiguration::~CWmConfiguration() |
82 // CWmConfiguration::~CWmConfiguration() |
76 // --------------------------------------------------------- |
83 // --------------------------------------------------------- |
77 // |
84 // |
78 CWmConfiguration::~CWmConfiguration() |
85 CWmConfiguration::~CWmConfiguration() |
79 { |
86 { |
80 delete iRepository; |
87 delete iRepository; |
81 iConfItems.ResetAndDestroy(); |
88 // ovi |
|
89 delete iOviStoreClientParam; |
|
90 delete iOviButtonTitle; |
|
91 delete iOviButtonIcon; |
|
92 // operator |
|
93 delete iOperatorButtonTitle; |
|
94 delete iOperatorButtonIcon; |
|
95 delete iOperatorButtonUrl; |
|
96 delete iOperatorParam; |
|
97 delete iOperatorAppIdStr; |
82 } |
98 } |
83 |
99 |
84 // --------------------------------------------------------- |
100 // --------------------------------------------------------- |
85 // CWmConfiguration::ConstructL |
101 // CWmConfiguration::ConstructL |
86 // --------------------------------------------------------- |
102 // --------------------------------------------------------- |
87 // |
103 // |
88 void CWmConfiguration::ConstructL() |
104 void CWmConfiguration::ConstructL() |
89 { |
105 { |
|
106 // localised ovistore button text |
|
107 iOviButtonTitle = StringLoader::LoadL( R_QTN_WM_GO_TO_OVI_STORE ); |
|
108 |
|
109 // ovistore icon descriptor. It will look something like this: |
|
110 // skin( 0x101f86e3 0x23f6 ):mif( z:\resource\apps\widgetmanager.mif 16388 16389 ) |
|
111 _LIT( KSkinMifIconFormat, "skin( 0x%x 0x%x ):mif( %S %d %d )"); |
|
112 const TInt KMaxIconDescriptorLength = 256; |
|
113 TBuf<KMaxIconDescriptorLength> buf; |
|
114 buf.Format( KSkinMifIconFormat(), |
|
115 EAknsMajorGeneric, EAknsMinorGenericQgnMenuOviStore, |
|
116 &iResourceLoader.IconFilePath(), |
|
117 EMbmWidgetmanagerQgn_menu_ovistore, |
|
118 EMbmWidgetmanagerQgn_menu_ovistore_mask ); |
|
119 iOviButtonIcon = buf.AllocL(); |
|
120 |
90 // read data from repository |
121 // read data from repository |
91 TRAP_IGNORE( LoadConfigurationL(); ); |
122 TRAP_IGNORE( LoadConfigurationL(); ); |
|
123 |
92 } |
124 } |
93 |
125 |
94 // --------------------------------------------------------- |
126 // --------------------------------------------------------- |
95 // CWmConfiguration::LoadConfigurationL |
127 // CWmConfiguration::LoadConfigurationL |
96 // --------------------------------------------------------- |
128 // --------------------------------------------------------- |
97 // |
129 // |
98 void CWmConfiguration::LoadConfigurationL() |
130 void CWmConfiguration::LoadConfigurationL() |
99 { |
131 { |
100 iRepository = CRepository::NewL( |
132 iRepository = CRepository::NewL( |
101 TUid::Uid( KCrWidgetManager ) ); |
133 TUid::Uid( KCrWidgetManagerm ) ); |
|
134 |
|
135 // read Ovi parameters |
|
136 ReadInt32Parameter( KOviStoreUid, iOviStoreUid.iUid ); |
|
137 iOviStoreClientParam = ReadDescParameterL( KOviStoreClientParam ); |
102 |
138 |
103 TLinearOrder<CWmConfItem> order |
139 // read operator parameters if operator button enabled |
104 = CWmConfiguration::CompareStoreOrder; |
140 ReadIntParameter( KOperatorButtonEnabled, iOperatorButtonEnabled ); |
105 |
141 if ( iOperatorButtonEnabled ) |
106 // read Ovi parameters |
142 { |
107 TInt oviEnabled; |
143 // determine language and read localised parameters |
108 ReadIntParameter( KOviStoreEnabled, oviEnabled ); |
|
109 if ( oviEnabled ) |
|
110 { |
|
111 CWmConfItem* ovi = CWmConfItem::NewLC(); |
|
112 ovi->iId = CWmStore::EOvi; |
|
113 |
|
114 // localised ovistore text |
|
115 _LIT( KFormatStr, "%S\t%S"); |
|
116 HBufC* title = StringLoader::LoadLC( R_QTN_WM_OVI_STORE_TITLE ); |
|
117 HBufC* desc = StringLoader::LoadLC( R_QTN_WM_OVI_STORE_DESC ); |
|
118 |
|
119 ovi->iTitle = HBufC::NewL( title->Des().Length() + |
|
120 desc->Des().Length() + |
|
121 KFormatStr().Length() ); |
|
122 |
|
123 ovi->iTitle->Des().Format( KFormatStr(), title, desc ); |
|
124 |
|
125 CleanupStack::PopAndDestroy( desc ); |
|
126 CleanupStack::PopAndDestroy( title ); |
|
127 |
|
128 // ovistore icon descriptor. It will look something like this: |
|
129 // skin( 0x101f86e3 0x23f6 ):mif( z:\resource\apps\widgetmanager.mif 16388 16389 ) |
|
130 _LIT( KSkinMifIconFormat, "skin( 0x%x 0x%x ):mif( %S %d %d )"); |
|
131 const TInt KMaxIconDescriptorLength = 256; |
|
132 TBuf<KMaxIconDescriptorLength> buf; |
|
133 buf.Format( KSkinMifIconFormat(), |
|
134 EAknsMajorGeneric, EAknsMinorGenericQgnMenuOviStore, |
|
135 &iResourceLoader.IconFilePath(), |
|
136 EMbmWidgetmanagerQgn_menu_ovistore, |
|
137 EMbmWidgetmanagerQgn_menu_ovistore_mask ); |
|
138 ovi->iIcon = buf.AllocL(); |
|
139 |
|
140 ReadIntParameter( KOviOrder, ovi->iOrder ); |
|
141 ReadInt32Parameter( KOviUid, ovi->iAppUid.iUid ); |
|
142 ovi->iAppParam = ReadDescParameterL( KOviAppParam ); |
|
143 |
|
144 // Item to Array |
|
145 iConfItems.InsertInOrderL( ovi, order ); |
|
146 CleanupStack::Pop( ovi ); |
|
147 } |
|
148 |
|
149 // read Store parameters if Store enabled |
|
150 TInt storeEnabled = 0; |
|
151 ReadIntParameter( KStoreEnabled, storeEnabled ); |
|
152 if ( storeEnabled ) |
|
153 { |
|
154 iLanguageIndex = FindCorrectLanguageId(); |
144 iLanguageIndex = FindCorrectLanguageId(); |
155 |
145 iOperatorButtonTitle = ReadLocalisedParameterL( KLangOffsetOperatorText ); |
156 CWmConfItem* op = CWmConfItem::NewLC(); |
146 iOperatorButtonUrl = ReadLocalisedParameterL( KLangOffsetOperatorUrl ); |
157 op->iId = CWmStore::EStore1; |
|
158 |
|
159 op->iTitle = ReadLocalisedParameterL( KLangOffsetStoreText ); |
|
160 op->iUrl = ReadLocalisedParameterL( KLangOffsetStoreUrl ); |
|
161 // read non-localised parameters |
147 // read non-localised parameters |
162 op->iIcon = ReadDescParameterL( KIcon ); |
148 iOperatorButtonIcon = ReadDescParameterL( KOperatorButtonIcon ); |
163 ReadApplicationInfoL( KAppTypeAndId, *op ); |
149 ReadOperatorApplicationInfoL(); |
164 op->iAppParam = ReadDescParameterL( KAppParam ); |
150 iOperatorParam = ReadDescParameterL( KOperatorParam ); |
165 ReadIntParameter( KOrder, op->iOrder ); |
151 ReadIntParameter( KOperatorButtonHigherPriority, iButtonsMirrored ); |
166 |
|
167 // Item to Array |
|
168 iConfItems.InsertInOrderL( op, order ); |
|
169 CleanupStack::Pop( op ); |
|
170 } |
152 } |
171 |
153 |
172 delete iRepository; |
154 delete iRepository; |
173 iRepository = NULL; |
155 iRepository = NULL; |
174 } |
156 } |
297 TPtrC appId = applicationInfo->Des().Mid( |
278 TPtrC appId = applicationInfo->Des().Mid( |
298 separator + KSeparator().Length() ); |
279 separator + KSeparator().Length() ); |
299 |
280 |
300 if ( !type.Compare( KOpAppTypeS60 ) ) |
281 if ( !type.Compare( KOpAppTypeS60 ) ) |
301 { |
282 { |
302 aConfItem.iAppType = ES60; |
283 iOperatorAppType = ES60; |
303 aConfItem.iAppUid = StringToUid( appId ); |
284 iOperatorAppIdUid = StringToUid( appId ); |
304 SetStoreIconL( aConfItem ); |
285 SetOperatorIconL( iOperatorAppIdUid ); |
305 } |
286 } |
306 else if ( !type.Compare( KOpAppTypeCwrt ) ) |
287 else if ( !type.Compare( KOpAppTypeCwrt ) ) |
307 { |
288 { |
308 aConfItem.iAppType = ECwrt; |
289 iOperatorAppType = ECwrt; |
309 aConfItem.iAppUid = FetchWidgetUidFromRegistryL( appId ); |
290 iOperatorAppIdUid = FetchWidgetUidFromRegistryL( appId ); |
310 SetStoreIconL( aConfItem ); |
291 SetOperatorIconL( iOperatorAppIdUid ); |
311 } |
292 } |
312 else if ( !type.Compare( KOpAppTypeWrt ) ) |
293 else if ( !type.Compare( KOpAppTypeWrt ) ) |
313 { |
294 { |
314 aConfItem.iAppType = EWrt; |
295 iOperatorAppType = EWrt; |
315 aConfItem.iAppUid = FetchWidgetUidFromRegistryL( appId ); |
296 iOperatorAppIdUid = FetchWidgetUidFromRegistryL( appId ); |
316 SetStoreIconL( aConfItem ); |
297 SetOperatorIconL( iOperatorAppIdUid ); |
317 } |
298 } |
318 else if ( !type.Compare( KOpAppTypeJava ) ) |
299 else if ( !type.Compare( KOpAppTypeJava ) ) |
319 { |
300 { |
320 // java support is not fully implemented |
301 //TODO: java support is not fully implemented |
321 User::Leave( KErrGeneral ); |
302 User::Leave( KErrGeneral ); |
|
303 iOperatorAppType = EJava; |
|
304 iOperatorAppIdStr = appId.AllocL(); |
322 } |
305 } |
323 else if ( !type.Compare( KOpAppTypeQt ) ) |
306 else if ( !type.Compare( KOpAppTypeQt ) ) |
324 { |
307 { |
325 aConfItem.iAppType = EQt; |
308 iOperatorAppType = EQt; |
326 aConfItem.iAppUid = StringToUid( appId ); |
309 iOperatorAppIdUid = StringToUid( appId ); |
327 SetStoreIconL( aConfItem ); |
310 SetOperatorIconL( iOperatorAppIdUid ); |
328 } |
311 } |
329 } |
312 } |
330 CleanupStack::PopAndDestroy( applicationInfo ); |
313 CleanupStack::PopAndDestroy( applicationInfo ); |
331 } |
314 } |
332 } |
315 } |
333 |
316 |
334 // --------------------------------------------------------- |
317 // --------------------------------------------------------- |
335 // CWmConfiguration::SetStoreIcon |
318 // CWmConfiguration::SetOperatorIcon |
336 // --------------------------------------------------------- |
319 // --------------------------------------------------------- |
337 // |
320 // |
338 void CWmConfiguration::SetStoreIconL( CWmConfItem& aConfItem ) |
321 void CWmConfiguration::SetOperatorIconL( TUid aUid ) |
339 { |
322 { |
340 if ( aConfItem.iIcon && |
323 if ( iOperatorButtonIcon && |
341 !aConfItem.iIcon->Des().Length() ) |
324 !iOperatorButtonIcon->Des().Length() ) |
342 { |
325 { |
343 delete aConfItem.iIcon; |
326 delete iOperatorButtonIcon; |
344 aConfItem.iIcon = NULL; |
327 iOperatorButtonIcon = NULL; |
345 |
328 iOperatorButtonIcon = HBufC::NewL( |
346 aConfItem.iIcon = HBufC::NewL( |
329 KMaxUidName + KOperatorIcon().Length() ); |
347 KMaxUidName + KStoreIconFormat().Length() ); |
330 iOperatorButtonIcon->Des().Format( |
348 aConfItem.iIcon->Des().Format( |
331 KOperatorIcon(), aUid ); |
349 KStoreIconFormat(), aConfItem.iAppUid ); |
|
350 } |
332 } |
351 } |
333 } |
352 |
334 |
353 // --------------------------------------------------------- |
335 // --------------------------------------------------------- |
354 // CWmConfiguration::FetchWidgetUidFromRegistryL |
336 // CWmConfiguration::FetchWidgetUidFromRegistryL |
363 TInt ret = clientSession.GetWidgetUidL( aBundleId ); |
345 TInt ret = clientSession.GetWidgetUidL( aBundleId ); |
364 clientSession.Disconnect(); |
346 clientSession.Disconnect(); |
365 CleanupStack::PopAndDestroy( &clientSession ); |
347 CleanupStack::PopAndDestroy( &clientSession ); |
366 return TUid::Uid( ret ); |
348 return TUid::Uid( ret ); |
367 } |
349 } |
|
350 |
|
351 // --------------------------------------------------------- |
|
352 // CWmConfiguration::PortalButtonCount |
|
353 // --------------------------------------------------------- |
|
354 // |
|
355 TInt CWmConfiguration::PortalButtonCount() |
|
356 { |
|
357 return ( iOperatorButtonEnabled ? 2 : 1 ); |
|
358 } |
|
359 |
|
360 // --------------------------------------------------------- |
|
361 // CWmConfiguration::PortalButtonText |
|
362 // --------------------------------------------------------- |
|
363 // |
|
364 const TDesC& CWmConfiguration::PortalButtonText( TInt aIndex ) |
|
365 { |
|
366 if ( aIndex == 0 && iOviButtonTitle ) |
|
367 return *iOviButtonTitle; |
|
368 if ( aIndex == 1 && iOperatorButtonTitle && iOperatorButtonEnabled ) |
|
369 return *iOperatorButtonTitle; |
|
370 return KNullDesC; |
|
371 } |
|
372 |
|
373 // --------------------------------------------------------- |
|
374 // CWmConfiguration::PortalButtonIcon |
|
375 // --------------------------------------------------------- |
|
376 // |
|
377 const TDesC& CWmConfiguration::PortalButtonIcon( TInt aIndex ) |
|
378 { |
|
379 if ( aIndex == 0 && iOviButtonIcon ) |
|
380 return *iOviButtonIcon; |
|
381 if ( aIndex == 1 && iOperatorButtonIcon && iOperatorButtonEnabled ) |
|
382 return *iOperatorButtonIcon; |
|
383 return KNullDesC; |
|
384 } |
|
385 |
|
386 // --------------------------------------------------------- |
|
387 // CWmConfiguration::PortalButtonBrowserUrl |
|
388 // --------------------------------------------------------- |
|
389 // |
|
390 const TDesC& CWmConfiguration::PortalButtonBrowserUrl( TInt aIndex ) |
|
391 { |
|
392 // No support for ovi here |
|
393 if ( aIndex == 1 && iOperatorButtonUrl && iOperatorButtonEnabled ) |
|
394 return *iOperatorButtonUrl; |
|
395 return KNullDesC; |
|
396 } |
|
397 |
|
398 // --------------------------------------------------------- |
|
399 // CWmConfiguration::PortalButtonClientUid |
|
400 // --------------------------------------------------------- |
|
401 // |
|
402 TUid CWmConfiguration::PortalButtonClientUid( TInt aIndex ) |
|
403 { |
|
404 if ( aIndex == 0 ) |
|
405 { |
|
406 return iOviStoreUid; |
|
407 } |
|
408 // operator not supported. Get operator data using |
|
409 // PortalButtonApplicationInfoL |
|
410 return KNullUid; |
|
411 } |
|
412 |
|
413 // --------------------------------------------------------- |
|
414 // CWmConfiguration::PortalButtonClientParam |
|
415 // --------------------------------------------------------- |
|
416 // |
|
417 const TDesC& CWmConfiguration::PortalButtonClientParam( TInt aIndex ) |
|
418 { |
|
419 if ( aIndex == 0 && iOviStoreClientParam ) |
|
420 { |
|
421 return *iOviStoreClientParam; |
|
422 } |
|
423 if ( aIndex == 1 && iOperatorParam && iOperatorButtonEnabled ) |
|
424 { |
|
425 return *iOperatorParam; |
|
426 } |
|
427 return KNullDesC; |
|
428 } |
|
429 |
|
430 // --------------------------------------------------------- |
|
431 // CWmConfiguration::PortalButtonsMirrored |
|
432 // --------------------------------------------------------- |
|
433 // |
|
434 TBool CWmConfiguration::PortalButtonsMirrored() |
|
435 { |
|
436 return iButtonsMirrored; |
|
437 } |
|
438 |
|
439 // --------------------------------------------------------- |
|
440 // CWmConfiguration::PortalButtonApplicationType |
|
441 // --------------------------------------------------------- |
|
442 // |
|
443 CWmConfiguration::TOpAppType CWmConfiguration::PortalButtonApplicationType( |
|
444 TInt aIndex ) |
|
445 { |
|
446 if ( aIndex == 1 ) |
|
447 { |
|
448 return iOperatorAppType; |
|
449 } |
|
450 // no support for ovi |
|
451 return EUnknown; |
|
452 } |
|
453 |
|
454 // --------------------------------------------------------- |
|
455 // CWmConfiguration::PortalButtonApplicationId |
|
456 // --------------------------------------------------------- |
|
457 // |
|
458 void CWmConfiguration::PortalButtonApplicationId( |
|
459 TInt aIndex, TDes& aOperatorAppId ) |
|
460 { |
|
461 if ( aIndex == 1 ) |
|
462 { |
|
463 aOperatorAppId.Copy( *iOperatorAppIdStr ); |
|
464 } |
|
465 // no support for ovi |
|
466 } |
|
467 |
|
468 // --------------------------------------------------------- |
|
469 // CWmConfiguration::PortalButtonApplicationId |
|
470 // --------------------------------------------------------- |
|
471 // |
|
472 void CWmConfiguration::PortalButtonApplicationId( |
|
473 TInt aIndex, TUid& aOperatorAppId ) |
|
474 { |
|
475 if ( aIndex == 1 ) |
|
476 { |
|
477 aOperatorAppId = iOperatorAppIdUid; |
|
478 } |
|
479 // no support for ovi |
|
480 } |
368 |
481 |
369 // --------------------------------------------------------- |
482 // --------------------------------------------------------- |
370 // CWmConfiguration::StringToUid |
483 // CWmConfiguration::StringToUid |
371 // --------------------------------------------------------- |
484 // --------------------------------------------------------- |
372 // |
485 // |
392 } |
505 } |
393 } |
506 } |
394 return KNullUid; |
507 return KNullUid; |
395 } |
508 } |
396 |
509 |
397 // --------------------------------------------------------- |
|
398 // CWmConfiguration::CompareStoreOrder |
|
399 // --------------------------------------------------------- |
|
400 // |
|
401 TInt CWmConfiguration::CompareStoreOrder( |
|
402 const CWmConfItem& aItemOne, const CWmConfItem& aItemTwo ) |
|
403 { |
|
404 // 1. zero, if the two objects are equal. |
|
405 // 2. a negative value, if the first object is less than the second. |
|
406 // 3. a positive value, if the first object is greater than the second. |
|
407 TInt ret = 0; |
|
408 if ( aItemOne.iOrder < aItemTwo.iOrder ) |
|
409 { |
|
410 ret = -1; |
|
411 } |
|
412 if ( aItemOne.iOrder > aItemTwo.iOrder ) |
|
413 { |
|
414 ret = 1; |
|
415 } |
|
416 return ret; |
|
417 } |
|
418 |
|
419 // --------------------------------------------------------- |
|
420 // CWmConfiguration::StoreConfArray |
|
421 // --------------------------------------------------------- |
|
422 // |
|
423 const RPointerArray<CWmConfItem>& CWmConfiguration::StoreConfArray() |
|
424 { |
|
425 return iConfItems; |
|
426 } |
|
427 |
|
428 // --------------------------------------------------------- |
|
429 // CWmConfiguration::StoreCount |
|
430 // --------------------------------------------------------- |
|
431 // |
|
432 TInt CWmConfiguration::StoreCount() |
|
433 { |
|
434 return iConfItems.Count(); |
|
435 } |
|
436 |
|
437 // --------------------------------------------------------- |
|
438 // CWmConfItem::NewL |
|
439 // --------------------------------------------------------- |
|
440 // |
|
441 CWmConfItem* CWmConfItem::NewL() |
|
442 { |
|
443 CWmConfItem* self = CWmConfItem::NewLC(); |
|
444 CleanupStack::Pop(); // self; |
|
445 return self; |
|
446 } |
|
447 |
|
448 // --------------------------------------------------------- |
|
449 // CWmConfItem::NewLC |
|
450 // --------------------------------------------------------- |
|
451 // |
|
452 CWmConfItem* CWmConfItem::NewLC() |
|
453 { |
|
454 CWmConfItem* self = new ( ELeave ) CWmConfItem(); |
|
455 CleanupStack::PushL(self); |
|
456 self->ConstructL(); |
|
457 return self; |
|
458 } |
|
459 |
|
460 // --------------------------------------------------------- |
|
461 // CWmConfItem::~CWmConfItem |
|
462 // --------------------------------------------------------- |
|
463 // |
|
464 CWmConfItem::~CWmConfItem() |
|
465 { |
|
466 delete iTitle; |
|
467 delete iIcon; |
|
468 delete iUrl; |
|
469 delete iAppParam; |
|
470 } |
|
471 |
|
472 // --------------------------------------------------------- |
|
473 // CWmConfItem::CWmConfItem |
|
474 // --------------------------------------------------------- |
|
475 // |
|
476 CWmConfItem::CWmConfItem() |
|
477 { |
|
478 } |
|
479 |
|
480 // --------------------------------------------------------- |
|
481 // CWmConfItem::ConstructL |
|
482 // --------------------------------------------------------- |
|
483 // |
|
484 void CWmConfItem::ConstructL() |
|
485 { |
|
486 } |
|
487 |
|
488 // --------------------------------------------------------- |
|
489 // CWmConfItem::Id |
|
490 // --------------------------------------------------------- |
|
491 // |
|
492 CWmStore::TStoreId CWmConfItem::Id() |
|
493 { |
|
494 return iId; |
|
495 } |
|
496 |
|
497 // --------------------------------------------------------- |
|
498 // CWmConfItem::Title |
|
499 // --------------------------------------------------------- |
|
500 // |
|
501 const TDesC& CWmConfItem::Title() |
|
502 { |
|
503 return ( iTitle ? *iTitle : KNullDesC() ); |
|
504 } |
|
505 |
|
506 // --------------------------------------------------------- |
|
507 // CWmConfItem::Icon |
|
508 // --------------------------------------------------------- |
|
509 // |
|
510 const TDesC& CWmConfItem::Icon() |
|
511 { |
|
512 return ( iIcon ? *iIcon : KNullDesC() ); |
|
513 } |
|
514 |
|
515 // --------------------------------------------------------- |
|
516 // CWmConfItem::Order |
|
517 // --------------------------------------------------------- |
|
518 // |
|
519 TInt CWmConfItem::Order() |
|
520 { |
|
521 return iOrder; |
|
522 } |
|
523 |
|
524 // --------------------------------------------------------- |
|
525 // CWmConfItem::BrowserUrl |
|
526 // --------------------------------------------------------- |
|
527 // |
|
528 const TDesC& CWmConfItem::BrowserUrl() |
|
529 { |
|
530 return ( iUrl ? *iUrl : KNullDesC() ); |
|
531 } |
|
532 |
|
533 // --------------------------------------------------------- |
|
534 // CWmConfItem::AppType |
|
535 // --------------------------------------------------------- |
|
536 // |
|
537 CWmConfiguration::TStoreAppType CWmConfItem::AppType() |
|
538 { |
|
539 return iAppType; |
|
540 } |
|
541 |
|
542 // --------------------------------------------------------- |
|
543 // CWmConfItem::AppUid |
|
544 // --------------------------------------------------------- |
|
545 // |
|
546 TUid CWmConfItem::AppUid() |
|
547 { |
|
548 return iAppUid; |
|
549 } |
|
550 |
|
551 // --------------------------------------------------------- |
|
552 // CWmConfItem::AppParam |
|
553 // --------------------------------------------------------- |
|
554 // |
|
555 const TDesC& CWmConfItem::AppParam() |
|
556 { |
|
557 return ( iAppParam ? *iAppParam : KNullDesC() ); |
|
558 } |
|
559 |
510 |
560 // End of File |
511 // End of File |
561 |
512 |