|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of MPXVideoPlaybackControlsController |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 1 % |
|
19 |
|
20 |
|
21 |
|
22 #ifndef MPXVIDEOPLAYBACKCONTROLSCONTROLLER_H_ |
|
23 #define MPXVIDEOPLAYBACKCONTROLSCONTROLLER_H_ |
|
24 |
|
25 // INCLUDES |
|
26 #include <qobject> |
|
27 #include <mpxplaybackframeworkdefs.h> |
|
28 |
|
29 #include "mpxvideo_debug.h" |
|
30 #include "mpxcommonvideoplaybackview.hrh" |
|
31 #include "mpxvideoplaybackviewfiledetails.h" |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 |
|
35 |
|
36 // DATA TYPES |
|
37 |
|
38 enum TMPXTimerAction |
|
39 { |
|
40 EMPXTimerCancel, |
|
41 EMPXTimerReset |
|
42 }; |
|
43 |
|
44 enum TPlaybackViewMode |
|
45 { |
|
46 EFullScreenView, |
|
47 EDetailsView, |
|
48 EAudioOnlyView |
|
49 }; |
|
50 |
|
51 // CLASS DECLARATION |
|
52 class HbVideoBasePlaybackView; |
|
53 |
|
54 class QMPXVideoPlaybackControlsController : public QObject |
|
55 { |
|
56 Q_OBJECT |
|
57 |
|
58 public: |
|
59 |
|
60 /** |
|
61 * constructor. |
|
62 */ |
|
63 QMPXVideoPlaybackControlsController( bool attachOperation ); |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 virtual ~QMPXVideoPlaybackControlsController(); |
|
69 |
|
70 public: |
|
71 |
|
72 /** |
|
73 * Command handling function. |
|
74 * Call HandleCommandL() of container |
|
75 */ |
|
76 void handleCommand( TMPXVideoPlaybackViewCommandIds command, int value = 0 ); |
|
77 |
|
78 /** |
|
79 * Reset or cancel timers for the controls |
|
80 */ |
|
81 void resetDisappearingTimers( TMPXTimerAction timerAction ); |
|
82 |
|
83 /** |
|
84 * Return state |
|
85 */ |
|
86 inline TMPXPlaybackState state(); |
|
87 |
|
88 inline HbVideoBasePlaybackView* view(); |
|
89 |
|
90 /** |
|
91 * Return file details |
|
92 */ |
|
93 inline QMPXVideoPlaybackViewFileDetails* fileDetails(); |
|
94 |
|
95 TPlaybackViewMode viewMode(); |
|
96 |
|
97 void changeViewMode( TPlaybackViewMode viewMode, bool transitionEffect = true ); |
|
98 |
|
99 bool isAttachOperation(); |
|
100 |
|
101 private slots: |
|
102 void attachVideo(); |
|
103 void sendVideo(); |
|
104 |
|
105 public: |
|
106 QMPXVideoPlaybackViewFileDetails *mFileDetails; |
|
107 HbVideoBasePlaybackView *mView; |
|
108 |
|
109 TMPXPlaybackState mState; |
|
110 TPlaybackViewMode mViewMode; |
|
111 TMPXTimerAction mTimerAction; |
|
112 TMPXVideoPlaybackViewCommandIds mCommand; |
|
113 int mCommandValue; |
|
114 bool mIsAttachOperation; |
|
115 bool mAttachVideoDone; |
|
116 bool mSendVideoDone; |
|
117 }; |
|
118 |
|
119 // INLINE METHODS |
|
120 // ------------------------------------------------------------------------------------------------- |
|
121 // QMPXVideoPlaybackControlsController::state |
|
122 // ------------------------------------------------------------------------------------------------- |
|
123 // |
|
124 inline |
|
125 TMPXPlaybackState QMPXVideoPlaybackControlsController::state() |
|
126 { |
|
127 return mState; |
|
128 } |
|
129 |
|
130 // ------------------------------------------------------------------------------------------------- |
|
131 // QMPXVideoPlaybackControlsController::fileDetails |
|
132 // ------------------------------------------------------------------------------------------------- |
|
133 // |
|
134 inline |
|
135 QMPXVideoPlaybackViewFileDetails* QMPXVideoPlaybackControlsController::fileDetails() |
|
136 { |
|
137 return mFileDetails; |
|
138 } |
|
139 |
|
140 // ------------------------------------------------------------------------------------------------- |
|
141 // QMPXVideoPlaybackControlsController::viewMode |
|
142 // ------------------------------------------------------------------------------------------------- |
|
143 // |
|
144 inline |
|
145 TPlaybackViewMode QMPXVideoPlaybackControlsController::viewMode() |
|
146 { |
|
147 return mViewMode; |
|
148 } |
|
149 |
|
150 // ------------------------------------------------------------------------------------------------- |
|
151 // QMPXVideoPlaybackControlsController::view |
|
152 // ------------------------------------------------------------------------------------------------- |
|
153 // |
|
154 inline |
|
155 HbVideoBasePlaybackView* QMPXVideoPlaybackControlsController::view() |
|
156 { |
|
157 return mView; |
|
158 } |
|
159 |
|
160 #endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/ |
|
161 |
|
162 // End of File |