23
|
1 |
/*
|
|
2 |
* Copyright (c) 2008 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: Test Harness for VideoPlaybackControls
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
// Version : %version: e003sa33#11 %
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
#ifndef VIDEOPLAYBACKTESTCONTAINER_H
|
|
24 |
#define VIDEOPLAYBACKTESTCONTAINER_H
|
|
25 |
|
|
26 |
// INCLUDES
|
|
27 |
#include <coecntrl.h>
|
|
28 |
|
|
29 |
// CLASS DECLARATION
|
|
30 |
class CMPXVideoPlaybackControlsController;
|
|
31 |
class CVideoPlaybackControlsTest;
|
|
32 |
class CMPXVideoPlaybackViewFileDetails;
|
|
33 |
class CMPXVideoPlaybackUserInputHandler;
|
|
34 |
|
|
35 |
class CMPXVideoPlaybackContainer: public CCoeControl
|
|
36 |
{
|
|
37 |
public: // Constructors and destructor
|
|
38 |
|
|
39 |
/**
|
|
40 |
* Two-phased constructor.
|
|
41 |
*/
|
|
42 |
static CMPXVideoPlaybackContainer* NewL( const TDesC& aFileName );
|
|
43 |
|
|
44 |
/**
|
|
45 |
* Destructor.
|
|
46 |
*/
|
|
47 |
virtual ~CMPXVideoPlaybackContainer();
|
|
48 |
|
|
49 |
void HandlePointerEventL( const TPointerEvent& aPointerEvent );
|
|
50 |
|
|
51 |
|
|
52 |
private:
|
|
53 |
|
|
54 |
/**
|
|
55 |
* C++ default constructor.
|
|
56 |
*/
|
|
57 |
CMPXVideoPlaybackContainer();
|
|
58 |
|
|
59 |
/**
|
|
60 |
* Symbian 2nd phase constructor.
|
|
61 |
*/
|
|
62 |
void ConstructL( const TDesC& aFileName );
|
|
63 |
|
|
64 |
private:
|
|
65 |
|
|
66 |
virtual TInt CountComponentControls() const;
|
|
67 |
|
|
68 |
protected:
|
|
69 |
|
|
70 |
/**
|
|
71 |
* From CCoeControl,Draw.
|
|
72 |
* @param aRect drawable area.
|
|
73 |
*/
|
|
74 |
void Draw(const TRect& aRect) const;
|
|
75 |
|
|
76 |
TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
|
|
77 |
|
|
78 |
public:
|
|
79 |
/**
|
|
80 |
* Handle commands from control controller
|
|
81 |
* @return void
|
|
82 |
*/
|
|
83 |
void HandleCommandL( TInt aCommand, TInt aValue = 0 );
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Expected Values
|
|
87 |
*/
|
|
88 |
void ExpectedResultL( TInt aCommand, TInt aValue );
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Set a control's controller
|
|
92 |
*/
|
|
93 |
void SetController( CMPXVideoPlaybackControlsController* aControlsController );
|
|
94 |
|
|
95 |
/**
|
|
96 |
* add default file details
|
|
97 |
*/
|
|
98 |
void AddFileDetailsL( TBool aHasVideoTrack = ETrue );
|
|
99 |
|
|
100 |
void DoHandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
|
|
101 |
|
|
102 |
/**
|
|
103 |
* Return default file details
|
|
104 |
*/
|
|
105 |
CMPXVideoPlaybackViewFileDetails* FileDetails( TInt aMode );
|
|
106 |
|
|
107 |
CMPXVideoPlaybackUserInputHandler* UserInputHandler();
|
|
108 |
|
|
109 |
/**
|
|
110 |
* add long file details
|
|
111 |
*/
|
|
112 |
void AddLongFileDetailsL( TBool aHasVideoTrack = ETrue );
|
|
113 |
|
|
114 |
/**
|
|
115 |
* Add file details
|
|
116 |
* and make sure aspect ratio equal to screen aspect ratio
|
|
117 |
*/
|
|
118 |
void AddSameARFileDetailsL( TBool aHasVideoTrack = ETrue );
|
|
119 |
|
|
120 |
/**
|
|
121 |
* Add file details with empty title
|
|
122 |
* and make sure aspect ratio equal to screen aspect ratio
|
|
123 |
*/
|
|
124 |
void AddEmptyTitleFileDetailsL( TBool aHasVideoTrack = ETrue );
|
|
125 |
|
|
126 |
private:
|
|
127 |
// Data
|
|
128 |
TInt iCommand;
|
|
129 |
TInt iValue;
|
|
130 |
CMPXVideoPlaybackControlsController* iControlsController;
|
|
131 |
CMPXVideoPlaybackViewFileDetails* iFileDetails;
|
|
132 |
TKeyResponse iKeyResponse;
|
|
133 |
|
|
134 |
CMPXVideoPlaybackUserInputHandler* iUserInputHandler; // owned
|
|
135 |
|
|
136 |
};
|
|
137 |
|
|
138 |
#endif // VIDEOPLAYBACKTESTCONTAINER_H
|
|
139 |
|
|
140 |
// End of File
|