115 // Symbian 2nd phase constructor can leave. |
115 // Symbian 2nd phase constructor can leave. |
116 // ----------------------------------------------------------------------------- |
116 // ----------------------------------------------------------------------------- |
117 // |
117 // |
118 void CHsLaunch::ConstructL() |
118 void CHsLaunch::ConstructL() |
119 { |
119 { |
120 iRepository = CRepository::NewL(TUid::Uid(0x2002b3aa)); |
120 // iRepository = CRepository::NewL(TUid::Uid(0x2002b3aa)); |
121 |
121 |
122 iShutdownMonitor = CHsShutdownMonitor::NewL( *this ); |
122 iShutdownMonitor = CHsShutdownMonitor::NewL( *this ); |
123 iShutdownMonitor->StartMonitor(); |
123 iShutdownMonitor->StartMonitor(); |
124 |
124 |
125 // Create property to pub/sub. |
125 // Create property to pub/sub. |
418 // Checks if the language is selected. |
418 // Checks if the language is selected. |
419 // ----------------------------------------------------------------------------- |
419 // ----------------------------------------------------------------------------- |
420 // |
420 // |
421 TBool CHsLaunch::IsLanguageSelectedL() |
421 TBool CHsLaunch::IsLanguageSelectedL() |
422 { |
422 { |
423 TInt value; |
423 TInt value = 1; // yes? |
424 User::LeaveIfError(iRepository->Get(0x00000007, value)); |
424 // User::LeaveIfError(iRepository->Get(0x00000007, value)); |
425 return value; |
425 return value; |
426 } |
426 } |
427 |
427 |
428 // ----------------------------------------------------------------------------- |
428 // ----------------------------------------------------------------------------- |
429 // CHsLaunch::StartListeningLanguageSelection() |
429 // CHsLaunch::StartListeningLanguageSelection() |
430 // Starts to listen repository notifications. |
430 // Starts to listen repository notifications. |
431 // ----------------------------------------------------------------------------- |
431 // ----------------------------------------------------------------------------- |
432 // |
432 // |
433 void CHsLaunch::StartListeningLanguageSelectionL() |
433 void CHsLaunch::StartListeningLanguageSelectionL() |
434 { |
434 { |
435 iCenRepNotifyHandler = CCenRepNotifyHandler::NewL( |
435 if (iRepository) |
|
436 { |
|
437 iCenRepNotifyHandler = CCenRepNotifyHandler::NewL( |
436 *this, *iRepository, CCenRepNotifyHandler::EIntKey, 0x00000007); |
438 *this, *iRepository, CCenRepNotifyHandler::EIntKey, 0x00000007); |
437 iCenRepNotifyHandler->StartListeningL(); |
439 iCenRepNotifyHandler->StartListeningL(); |
|
440 } |
438 } |
441 } |
439 |
442 |
440 // ----------------------------------------------------------------------------- |
443 // ----------------------------------------------------------------------------- |
441 // CHsLaunch::StopListeningLanguageSelection() |
444 // CHsLaunch::StopListeningLanguageSelection() |
442 // Stops to listen repository notifications. |
445 // Stops to listen repository notifications. |
443 // ----------------------------------------------------------------------------- |
446 // ----------------------------------------------------------------------------- |
444 // |
447 // |
445 void CHsLaunch::StopListeningLanguageSelection() |
448 void CHsLaunch::StopListeningLanguageSelection() |
446 { |
449 { |
447 iCenRepNotifyHandler->StopListening(); |
450 if (iCenRepNotifyHandler) |
448 delete iCenRepNotifyHandler; |
451 { |
449 iCenRepNotifyHandler = NULL; |
452 iCenRepNotifyHandler->StopListening(); |
|
453 delete iCenRepNotifyHandler; |
|
454 iCenRepNotifyHandler = NULL; |
|
455 } |
450 } |
456 } |
451 |
457 |
452 // End of File |
458 // End of File |