122 |
122 |
123 #include "AknNotifierControllerPlugin.h" |
123 #include "AknNotifierControllerPlugin.h" |
124 #include <AknCustomCursorSupport.h> |
124 #include <AknCustomCursorSupport.h> |
125 #include "AknEikSrv.pan" |
125 #include "AknEikSrv.pan" |
126 |
126 |
127 #include <hb/hbcore/hbsymbianvariant.h> |
|
128 #include <hb/hbcore/hbdevicedialogsymbian.h> |
|
129 |
|
130 #if defined(__WINS__) |
127 #if defined(__WINS__) |
131 const TInt KEikServSideBarWidth = 35; |
128 const TInt KEikServSideBarWidth = 35; |
132 const TInt KEikServAppbarHeight = 50; |
129 const TInt KEikServAppbarHeight = 50; |
133 #endif |
130 #endif |
134 |
131 |
585 R_EIK_SYSTEM_VIEW_SERVER_CLIENT_REQUEST_TIME_OUT, iEikonEnv); |
582 R_EIK_SYSTEM_VIEW_SERVER_CLIENT_REQUEST_TIME_OUT, iEikonEnv); |
586 |
583 |
587 iVwsSession->SetClientRequestTimeOut( TTimeIntervalMicroSeconds32(clientRequestTimeOutDuration) ); |
584 iVwsSession->SetClientRequestTimeOut( TTimeIntervalMicroSeconds32(clientRequestTimeOutDuration) ); |
588 |
585 |
589 iVwsSession->EnableServerBlankScreen(EFalse); |
586 iVwsSession->EnableServerBlankScreen(EFalse); |
590 iVwsSession->EnableServerEventTimeOut(EFalse); |
|
591 |
587 |
592 // Start Comms |
588 // Start Comms |
593 TInt err = StartC32(); |
589 TInt err = StartC32(); |
594 if (err != KErrNone && err != KErrAlreadyExists) |
590 if (err != KErrNone && err != KErrAlreadyExists) |
595 { |
591 { |
626 iEikServExtra->iServerRestarter = CPeriodic::NewL(CActive::EPriorityStandard); |
622 iEikServExtra->iServerRestarter = CPeriodic::NewL(CActive::EPriorityStandard); |
627 } |
623 } |
628 |
624 |
629 EXPORT_C void CEikServAppUiBase::HandleThreadExitL(RThread& aThread) |
625 EXPORT_C void CEikServAppUiBase::HandleThreadExitL(RThread& aThread) |
630 { |
626 { |
631 _LIT(KAppArcServerThread, "AppArcServerThread"); |
|
632 if (aThread.Name() == ASCliDefinitions::ServerAndThreadName()) // alarm server died |
627 if (aThread.Name() == ASCliDefinitions::ServerAndThreadName()) // alarm server died |
633 { |
628 { |
634 aThread.Close(); // need to Close() before restarting with same name |
629 aThread.Close(); // need to Close() before restarting with same name |
635 iServerToRestart |= EAlwlSvr; // restarted under active object |
630 iServerToRestart |= EAlwlSvr; // restarted under active object |
636 } |
631 } |
637 else if (aThread.Name() == KAppArcServerThread) // AppArc server died |
632 else if (aThread.Name()==NameApaServServerThread()) // AppArc server died |
638 { |
633 { |
639 aThread.Close(); |
634 aThread.Close(); |
640 iServerToRestart|=EApaSvr; |
635 iServerToRestart|=EApaSvr; |
641 } |
636 } |
642 |
637 |
1062 // Invented new API. |
1057 // Invented new API. |
1063 ReplaceKeySoundsL(0x100053D0); |
1058 ReplaceKeySoundsL(0x100053D0); |
1064 KeySounds()->BringToForeground(); |
1059 KeySounds()->BringToForeground(); |
1065 } |
1060 } |
1066 |
1061 |
1067 LOCAL_C void ShowNotificationDialog(const TDesC& aNoteText) |
|
1068 { |
|
1069 _LIT(KNotificationDialogPlugin, "com.nokia.hb.devicenotificationdialog/1.0"); |
|
1070 _LIT(KTimeout, "timeout"); |
|
1071 _LIT(KTitle, "title"); |
|
1072 |
|
1073 //@TODO replace the hardcoded parameter after enum EASyncServerStartup |
|
1074 // is defined(after MCL wk26). |
|
1075 //CHbDeviceDialogSymbian* dlg = CHbDeviceDialogSymbian::NewL( |
|
1076 // CHbDeviceDialogSymbian::EASyncServerStartup); |
|
1077 CHbDeviceDialogSymbian* dlg = CHbDeviceDialogSymbian::NewL(2); |
|
1078 CleanupStack::PushL(dlg); |
|
1079 |
|
1080 TInt timeout = 0; |
|
1081 |
|
1082 CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL(); |
|
1083 CleanupStack::PushL(map); |
|
1084 |
|
1085 map->Add(KTimeout, CHbSymbianVariant::NewL(&timeout, CHbSymbianVariant::EInt)); |
|
1086 map->Add(KTitle, CHbSymbianVariant::NewL(&aNoteText, CHbSymbianVariant::EDes)); |
|
1087 |
|
1088 dlg->Show(KNotificationDialogPlugin, *map); |
|
1089 |
|
1090 CleanupStack::PopAndDestroy(2); |
|
1091 } |
|
1092 |
1062 |
1093 void CEikServAppUi::HandleThreadExitL(RThread& aThread) |
1063 void CEikServAppUi::HandleThreadExitL(RThread& aThread) |
1094 { |
1064 { |
1095 if(aThread.Name().CompareF(_L("aknnfysrv")) == 0) |
1065 if(aThread.Name().CompareF(_L("aknnfysrv")) == 0) |
1096 { |
1066 { |
1122 KFeatureIdShowPanics )) ) |
1092 KFeatureIdShowPanics )) ) |
1123 { |
1093 { |
1124 // Construct text for a panic note. |
1094 // Construct text for a panic note. |
1125 HBufC* panicText = ConstructPanicTextLC( aThread, rdSupport ); |
1095 HBufC* panicText = ConstructPanicTextLC( aThread, rdSupport ); |
1126 |
1096 |
1127 /* iAknCapServerClient.ShowGlobalNoteL(panicText->Des(), EAknGlobalErrorNote); */ |
1097 iAknCapServerClient.ShowGlobalNoteL(panicText->Des(), EAknGlobalErrorNote); |
1128 |
|
1129 ShowNotificationDialog( panicText->Des() ); |
|
1130 |
|
1131 CleanupStack::PopAndDestroy(); // panicText |
1098 CleanupStack::PopAndDestroy(); // panicText |
1132 } |
1099 } |
1133 |
1100 |
1134 CEikServAppUiBase::HandleThreadExitL(aThread); |
1101 CEikServAppUiBase::HandleThreadExitL(aThread); |
1135 } |
1102 } |
1464 } |
1431 } |
1465 else |
1432 else |
1466 { |
1433 { |
1467 spriteMember.iBitmap = AknIconUtils::CreateIconL( *bmpFile, bmpId ); |
1434 spriteMember.iBitmap = AknIconUtils::CreateIconL( *bmpFile, bmpId ); |
1468 CleanupStack::PushL( spriteMember.iBitmap ); |
1435 CleanupStack::PushL( spriteMember.iBitmap ); |
|
1436 |
|
1437 // set color for the cursor |
|
1438 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
|
1439 if ( skin ) |
|
1440 { |
|
1441 TRgb color = KRgbBlack; |
|
1442 AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnIconColors, EAknsCIQsnIconColorsCG10 ); |
|
1443 AknIconUtils::SetIconColor( spriteMember.iBitmap, color ); |
|
1444 } |
|
1445 |
1469 } |
1446 } |
1470 |
1447 |
1471 TAknWindowLineLayout l; |
1448 TAknWindowLineLayout l; |
1472 |
1449 |
1473 switch( id ) |
1450 switch( id ) |