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