videoplayback/inc/mpxvideoplaybackuserinputhandler.h
branchRCL_3
changeset 9 5294c000a26d
parent 8 ce5ada96ab30
child 12 7f2b2a65da29
equal deleted inserted replaced
8:ce5ada96ab30 9:5294c000a26d
    13 *
    13 *
    14 * Description:  Implementation of MPXVideoPlaybackUserInputHandler
    14 * Description:  Implementation of MPXVideoPlaybackUserInputHandler
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version:  6 %
    18 // Version : %version:  ou1cpsw#7 %
    19 
    19 
    20 
    20 
    21 
    21 
    22 #ifndef MPXVIDEOPLAYBACKUSERINPUTHANDLER_H_
    22 #ifndef MPXVIDEOPLAYBACKUSERINPUTHANDLER_H_
    23 #define MPXVIDEOPLAYBACKUSERINPUTHANDLER_H_
    23 #define MPXVIDEOPLAYBACKUSERINPUTHANDLER_H_
    35 class CMPXVideoPlaybackControl;
    35 class CMPXVideoPlaybackControl;
    36 class CMPXVideoPlaybackControlsController;
    36 class CMPXVideoPlaybackControlsController;
    37 class CRemConInterfaceSelector; // Side volume key
    37 class CRemConInterfaceSelector; // Side volume key
    38 class CRemConCoreApiTarget;
    38 class CRemConCoreApiTarget;
    39 class CMPXVideoPlaybackContainer;
    39 class CMPXVideoPlaybackContainer;
    40 class CHWRMLight;
    40 
    41 
    41 
    42 // CLASS DECLARATION
    42 // CLASS DECLARATION
    43 
    43 
    44 class CMPXVideoPlaybackUserInputHandler : public CBase,
    44 class CMPXVideoPlaybackUserInputHandler : public CBase,
    45                                           public MRemConCoreApiTargetObserver
    45                                           public MRemConCoreApiTargetObserver
    48     public: // Constructors and destructor
    48     public: // Constructors and destructor
    49 
    49 
    50         /**
    50         /**
    51         * Two-phased constructor.
    51         * Two-phased constructor.
    52         */
    52         */
    53         IMPORT_C static CMPXVideoPlaybackUserInputHandler* NewL(CMPXVideoPlaybackContainer* iContainer, TBool aTvOutConnected);
    53         IMPORT_C static CMPXVideoPlaybackUserInputHandler* NewL(CMPXVideoPlaybackContainer* iContainer );
    54 
    54 
    55         /**
    55         /**
    56         * Destructor.
    56         * Destructor.
    57         */
    57         */
    58         IMPORT_C virtual ~CMPXVideoPlaybackUserInputHandler();
    58         IMPORT_C virtual ~CMPXVideoPlaybackUserInputHandler();
    65         CMPXVideoPlaybackUserInputHandler(CMPXVideoPlaybackContainer* iContainer);
    65         CMPXVideoPlaybackUserInputHandler(CMPXVideoPlaybackContainer* iContainer);
    66 
    66 
    67         /**
    67         /**
    68         * Symbian 2nd phase constructor.
    68         * Symbian 2nd phase constructor.
    69         */
    69         */
    70         void ConstructL( TBool aTvOutConnected );
    70         void ConstructL( );
    71 
    71 
    72     public:
    72     public:
    73 
    73 
    74         IMPORT_C void ProcessPointerEventL( CCoeControl* aControl,
    74         IMPORT_C void ProcessPointerEventL( CCoeControl* aControl,
    75                                             const TPointerEvent& aPointerEvent,
    75                                             const TPointerEvent& aPointerEvent,
   102         * @param aForeground - the value to be set
   102         * @param aForeground - the value to be set
   103         * @return void
   103         * @return void
   104         */
   104         */
   105         void SetForeground(TBool aForeground);
   105         void SetForeground(TBool aForeground);
   106  
   106  
   107         void HandleTVOutEvent(TBool aTVOutConnected);
   107   
   108                 
   108                 
   109 	private:
   109 	private:
   110         /**
   110         /**
   111         * Handles volume repeat timer timout
   111         * Handles volume repeat timer timout
   112         * @return TInt
   112         * @return TInt
   129 
   129 
   130         void ReRoutePointerEventL(CCoeControl* aControl,
   130         void ReRoutePointerEventL(CCoeControl* aControl,
   131                                   const TPointerEvent& aPointerEvent,
   131                                   const TPointerEvent& aPointerEvent,
   132                                   TMPXVideoControlType aMPXControl);
   132                                   TMPXVideoControlType aMPXControl);
   133         
   133         
   134         // Handles the Display light timer timeout
   134        
   135         static TInt  HandleDisplayTimeout( TAny* aPtr );
       
   136         
       
   137         // Disable the display backlight
       
   138         void DisableBacklight();
       
   139         
       
   140         // Enable the display backlight
       
   141         void EnableBacklight();
       
   142         
       
   143         // Restarts the timer for display light time-out
       
   144         void RestartDisplayTimer();
       
   145 
       
   146     private:
   135     private:
   147 
   136 
   148         TMPXVideoUserInputType                  iProcessingInputType; 	// the type of input being processed
   137         TMPXVideoUserInputType                  iProcessingInputType; 	// the type of input being processed
   149         TUint                                   iLastPressedKeyCode;     // keycode of last key that sent EEventKeyDown
   138         TUint                                   iLastPressedKeyCode;     // keycode of last key that sent EEventKeyDown
   150         TInt                                    iLastPressedKeyScanCode; // scancode of last key that sent EEventKeyDown
   139         TInt                                    iLastPressedKeyScanCode; // scancode of last key that sent EEventKeyDown
   154         CRemConCoreApiTarget*                   iCoreTarget;            // Owned by CRemConInterfaceSelector
   143         CRemConCoreApiTarget*                   iCoreTarget;            // Owned by CRemConInterfaceSelector
   155 
   144 
   156         CPeriodic*                              iVolumeRepeatTimer;     // owned
   145         CPeriodic*                              iVolumeRepeatTimer;     // owned
   157         TBool                                   iVolumeRepeatUp;
   146         TBool                                   iVolumeRepeatUp;
   158         TBool                                   iForeground;
   147         TBool                                   iForeground;
   159         TBool                                   iTVOutConnected;        // Flag to indicate if TV is connected
   148         
   160         CPeriodic*                              iDisplayTimer;          // Timer to timeout the lights time-out
       
   161         TInt                                    iDisplayTimeOut;        // Value of the lights time-out
       
   162 
       
   163         CHWRMLight*                             iLight;
       
   164         CMPXVideoPlaybackContainer*             iContainer;	  // not owned
   149         CMPXVideoPlaybackContainer*             iContainer;	  // not owned
   165 
   150 
   166 
   151 
   167 };
   152 };
   168 
   153