uifw/AknGlobalUI/AknCapServer/src/AknCapServerEntry.cpp
branchRCL_3
changeset 15 08e69e956a8c
parent 4 8ca85d2f0db7
child 16 71dd06cfe933
equal deleted inserted replaced
10:9f56a4e1b8ab 15:08e69e956a8c
    31 #include <AknFepInternalPSKeys.h>    // KAknFepFnKeyState
    31 #include <AknFepInternalPSKeys.h>    // KAknFepFnKeyState
    32 #endif
    32 #endif
    33 #include "avkoninternalpskeys.h"     // KAknIdleAppWindowGroupId
    33 #include "avkoninternalpskeys.h"     // KAknIdleAppWindowGroupId
    34 #include <AknCapServerDefs.h>
    34 #include <AknCapServerDefs.h>
    35 #include <activeidle2domainpskeys.h>
    35 #include <activeidle2domainpskeys.h>
    36 #include <eikpriv.rsg>
    36 #include <EIKPRIV.rsg>
    37 #include <coedef.h>
    37 #include <coedef.h>
    38 #include <eiksvdef.h>
    38 #include <eiksvdef.h>
    39 #include <aknconsts.h>
    39 #include <aknconsts.h>
    40 #include <AknsConstants.h>
    40 #include <AknsConstants.h>
    41 #include <apgwgnam.h>
    41 #include <apgwgnam.h>
   105 
   105 
   106 const TInt KWgPriorityCoverEverything = 10000;
   106 const TInt KWgPriorityCoverEverything = 10000;
   107 const TInt KKeyEventICodeThreshold = 0x001f;
   107 const TInt KKeyEventICodeThreshold = 0x001f;
   108 const TInt KMaxLanguageCodeLength = 6; // 5 digits + separator
   108 const TInt KMaxLanguageCodeLength = 6; // 5 digits + separator
   109 
   109 
   110                 
   110 const TInt KRemoveBlankDelay = 200000; // 0.2s     
   111 
   111 
   112 _LIT(KEikSrvUIResFileName, "z:\\resource\\eiksrvui.rsc");
   112 _LIT(KEikSrvUIResFileName, "z:\\resource\\eiksrvui.rsc");
   113 _LIT_SECURITY_POLICY_PASS(KPassReadPolicy);
   113 _LIT_SECURITY_POLICY_PASS(KPassReadPolicy);
   114 _LIT_SECURITY_POLICY_C1(KWriteDDPolicy, ECapabilityWriteDeviceData);
   114 _LIT_SECURITY_POLICY_C1(KWriteDDPolicy, ECapabilityWriteDeviceData);
   115 _LIT_SECURITY_POLICY_C1(KReadPolicy,    ECapability_None);
   115 _LIT_SECURITY_POLICY_C1(KReadPolicy,    ECapability_None);
   170     
   170     
   171     delete iHiddenList;
   171     delete iHiddenList;
   172     delete iMMCUnlock;
   172     delete iMMCUnlock;
   173     delete iIdler;
   173     delete iIdler;
   174     iEikSrv.Close(); // this shouldn't be connected here anyway
   174     iEikSrv.Close(); // this shouldn't be connected here anyway
   175     delete iPtiEngine;          
   175     delete iPtiEngine;                          
       
   176     iAlfClient.Close();	
   176     }
   177     }
   177 
   178 
   178 _LIT(KProductSpecificHalFile, "z:\\system\\data\\ProductSpecificHalParams.txt");
   179 _LIT(KProductSpecificHalFile, "z:\\system\\data\\ProductSpecificHalParams.txt");
   179 
   180 
   180 void DoProductSpecificHalFunction()
   181 void DoProductSpecificHalFunction()
   854         {
   855         {
   855         iStatusPane->SwitchLayoutL(aLayoutResId);
   856         iStatusPane->SwitchLayoutL(aLayoutResId);
   856         }
   857         }
   857     }
   858     }
   858 
   859 
   859 void CAknCapAppServerAppUi::BlankScreenL(TBool aBlank, TBool aToForeground)
   860 TInt CAknCapAppServerAppUi::RemoveBlankCallBack( TAny* aThis )
       
   861     {
       
   862     static_cast<CAknCapAppServerAppUi*>( aThis )->DoRemoveBlank();
       
   863     return EFalse;
       
   864     }
       
   865 
       
   866 void CAknCapAppServerAppUi::BlankScreenL(TBool aBlank, TBool /* aToForeground */)
   860     {
   867     {
   861     if (aBlank)
   868     if (aBlank)
   862         {
   869         {
   863         if (++iBlankWinRefCount == 1)
   870         if (++iBlankWinRefCount == 1)
   864             {
   871             {
       
   872             delete iRemoveBlankCallBack;
       
   873             iRemoveBlankCallBack = NULL;
       
   874 
       
   875 		    // We are ignoring the foreground parameter because we only have one 
       
   876             // type of blanking behaviour in AlfClient. Act as if ETrue
       
   877             iAlfClient.BlankScreen(ETrue);	
       
   878             iForegroundBlankScreen = ETrue; // always as if foreground blanking
       
   879 /*
   865             ASSERT(!iBlankWin);
   880             ASSERT(!iBlankWin);
   866             if (aToForeground)
   881             if (aToForeground)
   867                 {
   882                 {
   868                 iBackdropWindowGroup.SetOrdinalPosition(0, KWgPriorityCoverEverything);
   883                 iBackdropWindowGroup.SetOrdinalPosition(0, KWgPriorityCoverEverything);
   869                 }
   884                 }
   871                 {
   886                 {
   872                 iBackdropWindowGroup.SetOrdinalPosition(1, ECoeWinPriorityNormal); 
   887                 iBackdropWindowGroup.SetOrdinalPosition(1, ECoeWinPriorityNormal); 
   873                 }
   888                 }
   874             iBlankWin = CAknServBlankWin::NewL(iBackdropWindowGroup, iStatusPane);
   889             iBlankWin = CAknServBlankWin::NewL(iBackdropWindowGroup, iStatusPane);
   875             iForegroundBlankScreen = aToForeground;
   890             iForegroundBlankScreen = aToForeground;
       
   891 */
   876             }
   892             }
   877         }
   893         }
   878     else if (--iBlankWinRefCount <= 0)
   894     else if (--iBlankWinRefCount <= 0)
   879         {
   895         {
   880         iBlankWinRefCount = 0;
   896         iBlankWinRefCount = 0;
   881         if (iForegroundBlankScreen)
   897 
   882             {
   898         // Blanking IPC is delayed or restarted
       
   899         delete iRemoveBlankCallBack;
       
   900         iRemoveBlankCallBack = NULL;
       
   901         iRemoveBlankCallBack = CPeriodic::NewL(CActive::EPriorityLow);     
       
   902         
       
   903         iRemoveBlankCallBack->Start(
       
   904             KRemoveBlankDelay,
       
   905             KRemoveBlankDelay,
       
   906             TCallBack(RemoveBlankCallBack, this));
       
   907         
       
   908 
       
   909 /*        if (iForegroundBlankScreen)
       
   910             {
       
   911             */
   883 #ifdef RD_UI_TRANSITION_EFFECTS_LAYOUT_SWITCH
   912 #ifdef RD_UI_TRANSITION_EFFECTS_LAYOUT_SWITCH
       
   913             /*
   884             CWsScreenDevice* screen = iEikonEnv->ScreenDevice();
   914             CWsScreenDevice* screen = iEikonEnv->ScreenDevice();
   885             /*
       
   886             RWsSession& ws = iEikonEnv->WsSession();
   915             RWsSession& ws = iEikonEnv->WsSession();
   887             TInt wgId = ws.GetFocusWindowGroup();
   916             TInt wgId = ws.GetFocusWindowGroup();
   888             CApaWindowGroupName* wgName = CApaWindowGroupName::NewL(ws, wgId);
   917             CApaWindowGroupName* wgName = CApaWindowGroupName::NewL(ws, wgId);
   889             CleanupStack::PushL( wgName );
   918             CleanupStack::PushL( wgName );
   890             TUid appUid = wgName->AppUid();
   919             TUid appUid = wgName->AppUid();
   894             //        TRect( screen->SizeInPixels() ),
   923             //        TRect( screen->SizeInPixels() ),
   895             //        AknTransEffect::EParameterType,
   924             //        AknTransEffect::EParameterType,
   896             //        AknTransEffect::GfxTransParam( KTfxServerUid )
   925             //        AknTransEffect::GfxTransParam( KTfxServerUid )
   897             //        );
   926             //        );
   898 
   927 
   899             GfxTransEffect::EndFullScreen();
   928 //            GfxTransEffect::EndFullScreen();
   900 #endif
   929 #endif
   901             iBackdropWindowGroup.SetOrdinalPosition(1, ECoeWinPriorityNormal);
   930 /*            iBackdropWindowGroup.SetOrdinalPosition(1, ECoeWinPriorityNormal);
   902             }
   931            }
   903         delete iBlankWin;
   932         delete iBlankWin;
   904         iBlankWin = 0;
   933         iBlankWin = 0;
       
   934 */
   905         iForegroundBlankScreen = EFalse;
   935         iForegroundBlankScreen = EFalse;
   906         } 
   936         } 
   907     }
   937     }
   908 
   938 
       
   939 void CAknCapAppServerAppUi::DoRemoveBlank()
       
   940     {
       
   941     RDebug::Print( _L("CAknCapAppServerAppUi::DoRemoveBlank"));
       
   942     iAlfClient.BlankScreen(EFalse); 
       
   943     delete iRemoveBlankCallBack;
       
   944     iRemoveBlankCallBack = NULL;
       
   945     }
       
   946 
   909 void CAknCapAppServerAppUi::SwapLayoutSwitchBlankScreenL()
   947 void CAknCapAppServerAppUi::SwapLayoutSwitchBlankScreenL()
   910     {
   948     {
       
   949     	/*
   911     if (iBlankWin)
   950     if (iBlankWin)
   912         {
   951         {
   913         if (!iForegroundBlankScreen)
   952         if (!iForegroundBlankScreen)
   914             {
   953             {
   915             iBackdropWindowGroup.SetOrdinalPosition(0, KWgPriorityCoverEverything);
   954             iBackdropWindowGroup.SetOrdinalPosition(0, KWgPriorityCoverEverything);
   918         CAknServBlankWin* newBlankWin = CAknServBlankWin::NewL(iBackdropWindowGroup, iStatusPane);
   957         CAknServBlankWin* newBlankWin = CAknServBlankWin::NewL(iBackdropWindowGroup, iStatusPane);
   919         newBlankWin->SetLayoutBlank(ETrue);
   958         newBlankWin->SetLayoutBlank(ETrue);
   920         delete iBlankWin;
   959         delete iBlankWin;
   921         iBlankWin = newBlankWin;
   960         iBlankWin = newBlankWin;
   922         }
   961         }
       
   962         */
   923     }
   963     }
   924 
   964 
   925 TBool CAknCapAppServerAppUi::IsDisplayingForegroundBlankScreen() const
   965 TBool CAknCapAppServerAppUi::IsDisplayingForegroundBlankScreen() const
   926     {
   966     {
   927     return iForegroundBlankScreen;
   967     return iForegroundBlankScreen;