|
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 VideoPlaybackControlsController |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 3 % |
|
19 |
|
20 |
|
21 |
|
22 // INCLUDE FILES |
|
23 |
|
24 #include "videobaseplaybackview.h" |
|
25 #include "videoplaybackcontrolscontroller.h" |
|
26 |
|
27 // ================= MEMBER FUNCTIONS ============================================================== |
|
28 |
|
29 // ------------------------------------------------------------------------------------------------- |
|
30 // VideoPlaybackControlsController::VideoPlaybackControlsController() |
|
31 // ------------------------------------------------------------------------------------------------- |
|
32 // |
|
33 VideoPlaybackControlsController::VideoPlaybackControlsController( bool attachOperation ) |
|
34 : mViewMode( EFullScreenView ) |
|
35 , mIsAttachOperation( attachOperation ) |
|
36 , mAttachVideoDone( false ) |
|
37 , mSendVideoDone( false ) |
|
38 { |
|
39 MPX_ENTER_EXIT(_L("VideoPlaybackControlsController::VideoPlaybackControlsController()")); |
|
40 |
|
41 mFileDetails = new VideoPlaybackViewFileDetails(); |
|
42 mView = new VideoBasePlaybackView(); |
|
43 } |
|
44 |
|
45 // ------------------------------------------------------------------------------------------------- |
|
46 // VideoPlaybackControlsController::~VideoPlaybackControlsController |
|
47 // ------------------------------------------------------------------------------------------------- |
|
48 // |
|
49 VideoPlaybackControlsController::~VideoPlaybackControlsController() |
|
50 { |
|
51 MPX_DEBUG(_L("VideoPlaybackControlsController::~VideoPlaybackControlsController")); |
|
52 |
|
53 if ( mFileDetails ) |
|
54 { |
|
55 delete mFileDetails; |
|
56 mFileDetails = NULL; |
|
57 } |
|
58 |
|
59 if ( mView ) |
|
60 { |
|
61 delete mView; |
|
62 mView = NULL; |
|
63 } |
|
64 } |
|
65 |
|
66 // ------------------------------------------------------------------------------------------------- |
|
67 // VideoPlaybackControlsController::handleCommand() |
|
68 // ------------------------------------------------------------------------------------------------- |
|
69 // |
|
70 void VideoPlaybackControlsController::handleCommand( |
|
71 TMPXVideoPlaybackViewCommandIds command, int value ) |
|
72 { |
|
73 MPX_DEBUG(_L("VideoPlaybackControlsController::handleCommand(%d)"), command); |
|
74 |
|
75 mCommand = command; |
|
76 mCommandValue = value; |
|
77 } |
|
78 |
|
79 // ------------------------------------------------------------------------------------------------- |
|
80 // VideoPlaybackControlsController::changeViewMode |
|
81 // ------------------------------------------------------------------------------------------------- |
|
82 // |
|
83 void VideoPlaybackControlsController::changeViewMode( |
|
84 TPlaybackViewMode viewMode, bool transitionEffect ) |
|
85 { |
|
86 MPX_DEBUG(_L("VideoPlaybackControlsController::changeViewMode()")); |
|
87 |
|
88 Q_UNUSED( transitionEffect ); |
|
89 mViewMode = viewMode; |
|
90 } |
|
91 |
|
92 // ------------------------------------------------------------------------------------------------- |
|
93 // VideoPlaybackControlsController::resetDisappearingTimers() |
|
94 // ------------------------------------------------------------------------------------------------- |
|
95 // |
|
96 void VideoPlaybackControlsController::resetDisappearingTimers( TTimerAction timerAction ) |
|
97 { |
|
98 MPX_DEBUG(_L("VideoPlaybackControlsController::resetDisappearingTimers()")); |
|
99 |
|
100 mTimerAction = timerAction; |
|
101 } |
|
102 |
|
103 // ------------------------------------------------------------------------------------------------- |
|
104 // VideoPlaybackControlsController::isAttachOperation() |
|
105 // ------------------------------------------------------------------------------------------------- |
|
106 // |
|
107 bool VideoPlaybackControlsController::isAttachOperation() |
|
108 { |
|
109 MPX_DEBUG(_L("VideoPlaybackControlsController::isAttachOperation() ret %d"), |
|
110 mIsAttachOperation); |
|
111 |
|
112 return mIsAttachOperation; |
|
113 } |
|
114 |
|
115 // ------------------------------------------------------------------------------------------------- |
|
116 // VideoPlaybackControlsController::attachVideo() |
|
117 // ------------------------------------------------------------------------------------------------- |
|
118 // |
|
119 void VideoPlaybackControlsController::attachVideo() |
|
120 { |
|
121 MPX_ENTER_EXIT(_L("VideoPlaybackControlsController::attachVideo()")); |
|
122 |
|
123 handleCommand( EMPXPbvCmdClose ); |
|
124 mAttachVideoDone = true; |
|
125 } |
|
126 |
|
127 // ------------------------------------------------------------------------------------------------- |
|
128 // VideoPlaybackControlsController::sendVideo() |
|
129 // ------------------------------------------------------------------------------------------------- |
|
130 // |
|
131 void VideoPlaybackControlsController::sendVideo() |
|
132 { |
|
133 MPX_ENTER_EXIT(_L("VideoPlaybackControlsController::sendVideo()")); |
|
134 |
|
135 handleCommand( EMPXPbvCmdPause ); |
|
136 mSendVideoDone = true; |
|
137 } |
|
138 |
|
139 // End of File |