coreapplicationuis/SysAp/Inc/SysApAppUi.h
changeset 65 8a530a83576a
parent 56 11a052f4b02e
equal deleted inserted replaced
56:11a052f4b02e 65:8a530a83576a
    15  *
    15  *
    16  */
    16  */
    17 
    17 
    18 #ifndef SYSAPAPPUI_H
    18 #ifndef SYSAPAPPUI_H
    19 #define SYSAPAPPUI_H
    19 #define SYSAPAPPUI_H
    20 //#include <QObject>
    20 
    21 //#include <aknappui.h>
       
    22 //#include <hbmessagebox.h>
       
    23 #include <aknappui.h>
    21 #include <aknappui.h>
    24 #include "SysAp.hrh"
    22 #include "SysAp.hrh"
    25 #include <f32file.h> 
    23 #include <f32file.h> 
    26 #include <W32STD.H>
    24 #include <W32STD.H>
    27 #include <coedef.h>
    25 #include <coedef.h>
    40 #include <hbindicatorsymbian.h>
    38 #include <hbindicatorsymbian.h>
    41 //For Powermenu--CHbDevicePowerMenuSymbian
    39 //For Powermenu--CHbDevicePowerMenuSymbian
    42 #include "hbdevicepowermenusymbian.h"
    40 #include "hbdevicepowermenusymbian.h"
    43 
    41 
    44 #include "sysappsmcontroller.h"
    42 #include "sysappsmcontroller.h"
    45 
    43 #include "SysApMMCObserver.h"
    46 //CLASS DECLARATION
    44 
    47 /**
    45 #ifdef RD_MULTIPLE_DRIVE
    48 *  CSysApAppUi class. This class serves as a link between the other
    46 #include "sysapdrivelist.h"
    49 *  SysAp classes and performs the most UI specific operations on SysAp's
    47 #endif // RD_MULTIPLE_DRIVE
    50 *  responsibility.
    48 
    51 *
       
    52 *  @lib   sysap
       
    53 *  @since 1.0
       
    54 */
       
    55 #include <eikappui.h>
    49 #include <eikappui.h>
    56 
    50 
    57 
    51 
    58 //class CAknAppUiBase;
       
    59 //class CSysApKeySndHandler;
       
    60 //class  CSysApWsClient;
       
    61 class CSysApFeatureManager;
    52 class CSysApFeatureManager;
    62 class CSysApNspsHandler;
    53 class CSysApNspsHandler;
    63 class CSysApPubSubObserver;
    54 class CSysApPubSubObserver;
    64 class CSysApStartupController;
    55 class CSysApStartupController;
    65 class CSysApDefaultKeyHandler;
    56 class CSysApDefaultKeyHandler;
    84 class CKeyguardAccessApi;
    75 class CKeyguardAccessApi;
    85 class CHbIndicatorSymbian;	
    76 class CHbIndicatorSymbian;	
    86 class CSysApShutdownAnimation;
    77 class CSysApShutdownAnimation;
    87 
    78 
    88 class CSysApDefaultKeyHandler;
    79 class CSysApDefaultKeyHandler;
       
    80 class CSysApDriveUnlockHandler;
       
    81 class CSysApDriveEjectHandler;
       
    82 class CHbDeviceInputDialogSymbian;
    89 class CSysApEtelConnector;
    83 class CSysApEtelConnector;
    90 
    84 
    91 const TInt KBluetoothModulePowerModeOn ( 1 );
    85 const TInt KBluetoothModulePowerModeOn ( 1 );
    92 const TInt KDummyReason( -1 );
    86 const TInt KDummyReason( -1 );
    93 
    87 
    94 //class HbMessageBox;
    88 
       
    89 //CLASS DECLARATION
       
    90 /**
       
    91 *  CSysApAppUi class. This class serves as a link between the other
       
    92 *  SysAp classes and performs the most UI specific operations on SysAp's
       
    93 *  responsibility.
       
    94 *
       
    95 *  @lib   sysap
       
    96 *  @since 1.0
       
    97 */
    95 
    98 
    96 class CSysApAppUi : public CAknAppUi,
    99 class CSysApAppUi : public CAknAppUi,
       
   100                     public MSysApMemoryCardObserver,
    97                     public MSysApTimerResponder,
   101                     public MSysApTimerResponder,
    98                     public MSysapCallback,
   102                     public MSysapCallback,
    99                     public MSysApPsmControllerNotifyCallback
   103                     public MSysApPsmControllerNotifyCallback
   100 	{
   104 	{
   101 		public:
   105 		public:
   326         void SetLightsOnUnlockNoteL();
   330         void SetLightsOnUnlockNoteL();
   327         void SetLightsOnEcsQueryL();
   331         void SetLightsOnEcsQueryL();
   328         void SetLightsOnSecurityQueryL();  
   332         void SetLightsOnSecurityQueryL();  
   329         TBool CheckLongPowerKeyPressed();
   333         TBool CheckLongPowerKeyPressed();
   330         TBool ReleasePowerMenuCustomDialogMemory();
   334         TBool ReleasePowerMenuCustomDialogMemory();
   331 //        TBool ReleaseMemoryCardCustomDialogMemory();
   335         TBool NotifiedDialogIfRequiredAndReleaseMemory();
   332         static TInt DoStopAnimTiming( TAny* aObject );
   336         static TInt DoStopAnimTiming( TAny* aObject );
   333         CEikStatusPane* StatusPane();
   337         CEikStatusPane* StatusPane();
   334         
   338         
       
   339         void EjectUsed( TInt aDrive );
       
   340         
       
   341         void EjectMMCL();
       
   342         
       
   343 #ifndef RD_MULTIPLE_DRIVE
       
   344         /**
       
   345         * Mounts MMC drive
       
   346         * @param None
       
   347         * @return TInt : error value from RFs::MountFileSystem()
       
   348         */
       
   349         TInt MountMMC();
       
   350 
       
   351         /**
       
   352         * Dismounts MMC drive
       
   353         * @param None
       
   354         * @return TInt : error value from RFs::MountFileSystem()
       
   355         */
       
   356         TInt DismountMMC();
       
   357 #endif // RD_MULTIPLE_DRIVE
       
   358         
       
   359 #ifndef RD_MULTIPLE_DRIVE
       
   360         /**
       
   361         * Unlocks MMC
       
   362         * @param None
       
   363         * @return void
       
   364         */
       
   365         void RunUnlockNotifierL( TSysApMemoryCardStatus aMemoryCardStatus = ESysApMemoryCardStatusNotKnown );
       
   366 
       
   367         /**
       
   368         * From MSysApMemoryCardObserver.
       
   369         * Gets called by CSysApMMCObserver when an MMC is inserted/removed
       
   370         * @return void
       
   371         */
       
   372         void MMCStatusChangedL();
       
   373 
       
   374         /**
       
   375         * Shows "MMC removed..." dialogs
       
   376         * @param None
       
   377         * @return void
       
   378         */
       
   379         void ShowMMCDismountedDialogL();
       
   380 #else // RD_MULTIPLE_DRIVE
       
   381 
       
   382         /**
       
   383         * Updates PS key during boot
       
   384         * @return void
       
   385         */
       
   386         void MMCInsertedL();
       
   387 
       
   388         /**
       
   389         * Unlocks MMC
       
   390         * @param None
       
   391         * @return void
       
   392         */
       
   393         void RunUnlockNotifierL();
       
   394 
       
   395         /**
       
   396         * From MSysApMemoryCardObserver.
       
   397         * Gets called by CSysApMMCObserver when an MMC is inserted/removed
       
   398         * @param aDrive Changed drive
       
   399         * @return void
       
   400         */
       
   401         void MMCStatusChangedL( TInt aDrive );
       
   402 
       
   403         /**
       
   404         * Shows "MMC removed..." dialogs
       
   405         * @param aDrive Drive to dismount
       
   406         * @param aEjectType Eject type used for the drive
       
   407         * @return void
       
   408         */
       
   409         TBool ShowMMCDismountedDialogL(
       
   410             TInt aDrive, CSysApDriveList::TDriveEjectType aEjectType );
       
   411 #endif // RD_MULTIPLE_DRIVE
       
   412         
       
   413 #ifdef RD_MULTIPLE_DRIVE
       
   414         /*
       
   415         * Starts wait note for eject
       
   416         */
       
   417         void ShowEjectWaitNoteL(  TInt aDriveToEject );
       
   418 
       
   419         /*
       
   420         * Checks is eject query visible
       
   421         */
       
   422         TBool IsEjectQueryVisible();
       
   423 #endif // RD_MULTIPLE_DRIVE
       
   424         
       
   425         
   335 #ifdef SYSAP_USE_STARTUP_UI_PHASE        
   426 #ifdef SYSAP_USE_STARTUP_UI_PHASE        
   336         /**
   427         /**
   337         * Called when UI is ready after boot.
   428         * Called when UI is ready after boot.
   338         */
   429         */
   339         void HandleUiReadyAfterBootL();
   430         void HandleUiReadyAfterBootL();
   340 
   431 
   341 #endif // SYSAP_USE_STARTUP_UI_PHASE
   432 #endif // SYSAP_USE_STARTUP_UI_PHASE
   342 
   433 
   343 
   434        
       
   435         void MMCDismountedDialogConfirmed();
       
   436         
       
   437         void EjectStarted( TBool ejectStarted );
       
   438         
       
   439         void EjectMMCCanceled();
   344         
   440         
   345         void HandleNspsRawKeyEventL();
   441         void HandleNspsRawKeyEventL();
   346 
   442 
   347         void HandleNetworkNspsNotification( RMmCustomAPI::TNspsStatus aNspsStatus );
   443         void HandleNetworkNspsNotification( RMmCustomAPI::TNspsStatus aNspsStatus );
   348         
   444         
   350         
   446         
   351         void HandleSmsStorageNotificationL( TBool aSimStoreFull );
   447         void HandleSmsStorageNotificationL( TBool aSimStoreFull );
   352         
   448         
   353         void UpdateSignalBarsL();
   449         void UpdateSignalBarsL();
   354         
   450         
   355 
   451         void ReleaseMemoryForMemoryCardDialog();
   356         
   452         
   357      private:
   453      private:
   358          /**
   454          /**
   359          * Frees SysAp's reserved memory, closes connections to servers etc.
   455          * Frees SysAp's reserved memory, closes connections to servers etc.
   360          * @param None
   456          * @param None
   379          TBool IsStateNormal() const;
   475          TBool IsStateNormal() const;
   380          void HandleAccessoryProfileInStartupL( );
   476          void HandleAccessoryProfileInStartupL( );
   381          
   477          
   382          CSysApCenRepLogsObserver& CSysApAppUi::LogsObserverL();
   478          CSysApCenRepLogsObserver& CSysApAppUi::LogsObserverL();
   383          void ContinueShutdown();
   479          void ContinueShutdown();
   384 
   480          
       
   481 #ifdef RD_MULTIPLE_DRIVE
       
   482         void UpdateInsertedMemoryCardsL();
       
   483 #endif // RD_MULTIPLE_DRIVE
   385         
   484         
   386      private:
   485      private:
   387 //          CSysApWsClient*                 iSysApWsClient;
   486 //          CSysApWsClient*                 iSysApWsClient;
   388           CSysApLightsController*         iSysApLightsController;
   487           CSysApLightsController*         iSysApLightsController;
   389           CSysApFeatureManager*           iSysApFeatureManager;
   488           CSysApFeatureManager*           iSysApFeatureManager;
   418           CSysApCenRepLogsObserver*                iSysApCenRepLogsObserver;
   517           CSysApCenRepLogsObserver*                iSysApCenRepLogsObserver;
   419 		  MSysApUsbIndicator*             iSysApUsbIndicatorController;
   518 		  MSysApUsbIndicator*             iSysApUsbIndicatorController;
   420 		  CKeyguardAccessApi*             iKeyguardController;
   519 		  CKeyguardAccessApi*             iKeyguardController;
   421 		  CHbDevicePowerMenuSymbian*            iPowerMenuDialog;
   520 		  CHbDevicePowerMenuSymbian*            iPowerMenuDialog;
   422 	      CSysApKeyManagement*            iSysApKeyManagement;
   521 	      CSysApKeyManagement*            iSysApKeyManagement;
   423 
   522 	      CSysApMMCObserver*              iSysApMMCObserver;
   424 	      CSysApEtelConnector*            iSysApEtelConnector;
   523 	      CSysApEtelConnector*            iSysApEtelConnector;
   425 		  
   524 		  
   426 	public:		  
   525 	public:		  
   427 		  CHbIndicatorSymbian* 			  iHbIndicatorSymbian;
   526 		  CHbIndicatorSymbian* 			  iHbIndicatorSymbian;
   428 		  
   527 		  
   464         TInt                            iCapturedAppskey;
   563         TInt                            iCapturedAppskey;
   465         TInt                            iCapturedAppskeyUpAndDowns;
   564         TInt                            iCapturedAppskeyUpAndDowns;
   466         TBool                           iShutdownContinued;
   565         TBool                           iShutdownContinued;
   467         TBool                           iNsps;
   566         TBool                           iNsps;
   468         
   567         
   469 //        friend class CSysApWsClient;
   568         
       
   569         //CPeriodic*                      iTimer;
       
   570 #ifndef RD_MULTIPLE_DRIVE
       
   571         TInt                            iPowerkeyMenuEjectSelection;
       
   572 #endif // RD_MULTIPLE_DRIVE
       
   573         
       
   574 #ifndef RD_MULTIPLE_DRIVE
       
   575         TBool                           iHideFirstBeep;
       
   576 #endif // RD_MULTIPLE_DRIVE
       
   577         
       
   578 #ifndef RD_MULTIPLE_DRIVE
       
   579         TBool                           iTimeToKill;                     // MMC Hot Swap
       
   580         TInt                            iApplicationScanningRoundNumber; // MMC Hot Swap
       
   581 #endif // RD_MULTIPLE_DRIVE
       
   582         
       
   583 #ifndef RD_MULTIPLE_DRIVE
       
   584         TBool                           iMMCPowerMenuEjectUsed;
       
   585         TBool                           iMMCInserted;
       
   586 #endif // RD_MULTIPLE_DRIVE
       
   587         
       
   588 #ifndef RD_MULTIPLE_DRIVE
       
   589         TBool iHideNextBeep; // Prevents double beep when USB file transfer gets activated
       
   590         TBool iFileManagerCloseDisabled; // Prevents File Manager to close on hotswap
       
   591 #endif // RD_MULTIPLE_DRIVE
       
   592         
       
   593 #ifdef RD_MULTIPLE_DRIVE
       
   594         // First power menu index used for eject
       
   595         TInt iPowerkeyMenuEjectSelectionBase;
       
   596 
       
   597         /**
       
   598         * Drive list container
       
   599         * Own.
       
   600         */
       
   601         CSysApDriveList* iSysApDriveList;
       
   602 
       
   603         /**
       
   604         * Drive unlock handler.
       
   605         * Own.
       
   606         */
       
   607         CSysApDriveUnlockHandler* iSysApDriveUnlockHandler;
       
   608 
       
   609         /**
       
   610         * Drive eject handler.
       
   611         * Own.
       
   612         */
       
   613         CSysApDriveEjectHandler* iSysApDriveEjectHandler;
       
   614 
       
   615         /**
       
   616         * Array for storing inserted memory cards.
       
   617         * Own.
       
   618         */
       
   619         RArray< CSysApDriveList::TMemoryCardEntry > iInsertedMemoryCards;
       
   620 
       
   621         // Stores drive for dismount query
       
   622         TInt iDriveToDismount;
       
   623 
       
   624         // Stores drive for eject query
       
   625         TInt iDriveToEject;
       
   626 #endif // RD_MULTIPLE_DRIVE
       
   627         
       
   628         TBool                           iMMCEjectUsed;
       
   629         CHbDeviceInputDialogSymbian* iMemCardPwdDialog;
       
   630         
   470 	};
   631 	};
   471 	
   632 	
   472 #endif
   633 #endif