42 // CLASS DECLARATION |
42 // CLASS DECLARATION |
43 |
43 |
44 class CMPXVideoPlaybackUserInputHandler : public CBase, |
44 class CMPXVideoPlaybackUserInputHandler : public CBase, |
45 public MRemConCoreApiTargetObserver |
45 public MRemConCoreApiTargetObserver |
46 { |
46 { |
47 |
|
48 public: // Constructors and destructor |
47 public: // Constructors and destructor |
49 |
48 |
50 /** |
49 /** |
51 * Two-phased constructor. |
50 * Two-phased constructor. |
52 */ |
51 */ |
53 IMPORT_C static CMPXVideoPlaybackUserInputHandler* NewL(CMPXVideoPlaybackContainer* iContainer ); |
52 IMPORT_C static CMPXVideoPlaybackUserInputHandler* NewL( CMPXVideoPlaybackContainer* iContainer ); |
54 |
53 |
55 /** |
54 /** |
56 * Destructor. |
55 * Destructor. |
57 */ |
56 */ |
58 IMPORT_C virtual ~CMPXVideoPlaybackUserInputHandler(); |
57 IMPORT_C virtual ~CMPXVideoPlaybackUserInputHandler(); |
75 const TPointerEvent& aPointerEvent, |
74 const TPointerEvent& aPointerEvent, |
76 TMPXVideoControlType aMPXControl ); |
75 TMPXVideoControlType aMPXControl ); |
77 |
76 |
78 void ProcessKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
77 void ProcessKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
79 |
78 |
80 void ProcessMediaKey(TRemConCoreApiOperationId aOperationId, |
79 void ProcessMediaKey( TRemConCoreApiOperationId aOperationId, |
81 TRemConCoreApiButtonAction aButtonAct); |
80 TRemConCoreApiButtonAction aButtonAct ); |
82 |
81 |
83 void DoHandleMediaKey(TRemConCoreApiOperationId aOperationId, |
82 void DoHandleMediaKey( TRemConCoreApiOperationId aOperationId, |
84 TRemConCoreApiButtonAction aButtonAct); |
83 TRemConCoreApiButtonAction aButtonAct ); |
85 |
84 |
86 // From MRemConCoreApiTargetObserver |
85 // From MRemConCoreApiTargetObserver |
87 /** |
86 /** |
88 * Side volume key API from MRemConCoreApiTargetObserver |
87 * Side volume key API from MRemConCoreApiTargetObserver |
89 * @since 3.2 |
88 * @since 3.2 |
90 * @see MRemConCoreApiTargetObserver |
89 * @see MRemConCoreApiTargetObserver |
91 */ |
90 */ |
92 virtual void MrccatoPlay( |
91 virtual void MrccatoPlay( |
93 TRemConCoreApiPlaybackSpeed aSpeed, |
92 TRemConCoreApiPlaybackSpeed aSpeed, |
94 TRemConCoreApiButtonAction aButtonAct); |
93 TRemConCoreApiButtonAction aButtonAct ); |
95 |
94 |
96 virtual void MrccatoCommand( |
95 virtual void MrccatoCommand( |
97 TRemConCoreApiOperationId aOperationId, |
96 TRemConCoreApiOperationId aOperationId, |
98 TRemConCoreApiButtonAction aButtonAct); |
97 TRemConCoreApiButtonAction aButtonAct ); |
99 |
98 |
100 /** |
99 /** |
101 * Setter method for iForeground |
100 * Setter method for iForeground |
102 * @param aForeground - the value to be set |
101 * @param aForeground - the value to be set |
103 * @return void |
102 * @return void |
104 */ |
103 */ |
105 void SetForeground(TBool aForeground); |
104 void SetForeground( TBool aForeground ); |
106 |
105 |
107 private: |
106 /* |
|
107 * Function will block all user inputs until the new PDL command is received |
|
108 * @param aBlockInputs - the value to be set |
|
109 */ |
|
110 void BlockPdlUserInputs( TBool aBlockInputs ); |
|
111 |
|
112 private: |
108 /** |
113 /** |
109 * Handles volume repeat timer timout |
114 * Handles volume repeat timer timout |
110 * @return TInt |
115 * @return TInt |
111 */ |
116 */ |
112 static TInt HandleVolumeRepeatTimeoutL( TAny* aPtr ); |
117 static TInt HandleVolumeRepeatTimeoutL( TAny* aPtr ); |
115 * Adjust volume(+1/-1) for media key |
120 * Adjust volume(+1/-1) for media key |
116 * @return void |
121 * @return void |
117 */ |
122 */ |
118 void HandleVolumeRepeatL(); |
123 void HandleVolumeRepeatL(); |
119 |
124 |
120 void HandleFastForward(TRemConCoreApiButtonAction aButtonAct); |
125 void HandleFastForward( TRemConCoreApiButtonAction aButtonAct ); |
121 |
126 |
122 void HandleRewind(TRemConCoreApiButtonAction aButtonAct); |
127 void HandleRewind( TRemConCoreApiButtonAction aButtonAct ); |
123 |
128 |
124 void HandleVolumeUp(TRemConCoreApiButtonAction aButtonAct); |
129 void HandleVolumeUp( TRemConCoreApiButtonAction aButtonAct ); |
125 |
130 |
126 void HandleVolumeDown(TRemConCoreApiButtonAction aButtonAct); |
131 void HandleVolumeDown( TRemConCoreApiButtonAction aButtonAct ); |
127 |
132 |
128 void ReRoutePointerEventL(CCoeControl* aControl, |
133 void ReRoutePointerEventL( CCoeControl* aControl, |
129 const TPointerEvent& aPointerEvent, |
134 const TPointerEvent& aPointerEvent, |
130 TMPXVideoControlType aMPXControl); |
135 TMPXVideoControlType aMPXControl ); |
|
136 |
|
137 TBool IsUserInputAllowed(); |
131 |
138 |
132 private: |
139 private: |
133 |
140 |
134 TMPXVideoUserInputType iProcessingInputType; // the type of input being processed |
141 TMPXVideoUserInputType iProcessingInputType; // the type of input being processed |
135 TUint iLastPressedKeyCode; // keycode of last key that sent EEventKeyDown |
142 TUint iLastPressedKeyCode; // keycode of last key that sent EEventKeyDown |
136 TInt iLastPressedKeyScanCode; // scancode of last key that sent EEventKeyDown |
143 TInt iLastPressedKeyScanCode; // scancode of last key that sent EEventKeyDown |
137 TRemConCoreApiOperationId iLastMediaKeyPressed; // Id of last mediakey thats sent a button-press |
144 TRemConCoreApiOperationId iLastMediaKeyPressed; // Id of last mediakey thats sent a button-press |
138 |
145 |
139 CRemConInterfaceSelector* iInterfaceSelector; // Side volume key, owned |
146 CRemConInterfaceSelector* iInterfaceSelector; // Side volume key, owned |
140 CRemConCoreApiTarget* iCoreTarget; // Owned by CRemConInterfaceSelector |
147 CRemConCoreApiTarget* iCoreTarget; // Owned by CRemConInterfaceSelector |
141 |
148 |
142 CPeriodic* iVolumeRepeatTimer; // owned |
149 CPeriodic* iVolumeRepeatTimer; // owned |
143 TBool iVolumeRepeatUp; |
150 TBool iVolumeRepeatUp; |
144 TBool iForeground; |
151 TBool iForeground; |
|
152 TBool iBlockPdlInputs; |
145 |
153 |
146 CMPXVideoPlaybackContainer* iContainer; // not owned |
154 CMPXVideoPlaybackContainer* iContainer; // not owned |
147 CCoeControl* iActiveControlPtr; // not owned |
155 CCoeControl* iActiveControlPtr; // not owned |
148 TMPXVideoControlType iActiveControlType; |
156 TMPXVideoControlType iActiveControlType; |
149 }; |
157 }; |
150 |
158 |
151 |
159 |