void CHUDMissionObjective::SetStatus(HUDMissionStatus status) { if (status == m_eStatus) return; if(m_eStatus == COMPLETED && status == FAILED) { CryLog("Changing mission objective status from COMPLETED to FAILED; This change will be ignored."); return; } m_eStatus = status; NotifyStatusChange(); }
void CAknKeyLockNotifierSubject::DoAllowNotifications() { TBool lastvalue = iAllowNotifications; iAllowNotifications = ETrue; NotifyStatusChange(EKeyLockAllowNotifications); if (!lastvalue) { CEikonEnv* env = CEikonEnv::Static(); // To prevent this being called more than once env->SetAutoForwarding(ETrue); while (iActiveWindowCount) { env->BringForwards(ETrue); iActiveWindowCount--; } env->RootWin().SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront); env->BringForwards(ETrue); env->BringForwards(EFalse); // Enable FSW STATIC_CAST(CEikServAppUi*,env->AppUi())->SuppressAppSwitching(EFalse); }
void CAknKeyLockNotifierSubject::StartL(const TDesC8& aBuffer, TInt /*aReplySlot*/, const RMessagePtr2& aMessage) { SAknNotifierPackage<SAknKeyLockNotifierParams>* params = ( SAknNotifierPackage<SAknKeyLockNotifierParams>*)aBuffer.Ptr(); if ( aBuffer.Length() < 0 || (TUint)aBuffer.Length() < sizeof(SAknNotifierPackage<SAknKeyLockNotifierParams>) || params->iSignature != KAKNNOTIFIERSIGNATURE ) { User::Leave( KErrArgument ); } switch (params->iParamData.iReason) { case ELockEnabled: DoEnableKeyLock(); break; case ELockDisabled: DoDisableKeyLock(); break; case EAllowNotifications: DoAllowNotifications(); break; case EStopNotifications: DoStopNotifications(); break; case EOfferKeylock: DoOfferKeyLock(); break; case ECancelAllNotifications: DoCancelAllNotificatons(); break; case EEnableAutoLockEmulation: NotifyStatusChange(EShowSoftNotifications); LockKeys(ETrue); break; case EDisableWithoutNote: UnlockKeys(); break; case EEnableWithoutNote: if (!IsKeyLockEnabled()) { iKeyLockControl->EnableKeylock(EFalse); } break; case ECommandFSWToHideApplication: { TInt uid(0); TBool disable(EFalse); RDesReadStream readStream(aBuffer); readStream.ReadInt32L(); // signature readStream.ReadInt32L(); // op uid = readStream.ReadInt32L(); // uid disable = readStream.ReadInt32L(); // enable / disable STATIC_CAST(CEikServAppUi*,CEikonEnv::Static()->AppUi())->HideApplicationFromFswL(uid,disable); } break; default: break; }; aMessage.Complete(KErrNone); }