62
|
1 |
/*
|
|
2 |
* Copyright (c) 2002 - 2007 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: Scripted Tests for MPX Playback Plugin
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef PLAYBACKPLUGINTEST_H
|
|
19 |
#define PLAYBACKPLUGINTEST_H
|
|
20 |
|
|
21 |
#include <StifLogger.h>
|
|
22 |
#include <TestScripterInternal.h>
|
|
23 |
#include <StifTestModule.h>
|
|
24 |
#include <TestclassAssert.h>
|
|
25 |
#include <mpxplaybackobserver.h>
|
|
26 |
#include "basetest.h"
|
|
27 |
|
|
28 |
// CONSTANTS
|
|
29 |
const TInt KTestPlayback1Seconds = 1000;
|
|
30 |
|
|
31 |
// MACROS
|
|
32 |
#define TEST_CLASS_VERSION_MAJOR 0
|
|
33 |
#define TEST_CLASS_VERSION_MINOR 0
|
|
34 |
#define TEST_CLASS_VERSION_BUILD 0
|
|
35 |
|
|
36 |
// Logging path
|
|
37 |
#ifdef __WINSCW__
|
|
38 |
_LIT( KPlaybackPluginTestLogPath, "\\logs\\testframework\\playbackplugintest\\" );
|
|
39 |
#else
|
|
40 |
_LIT( KPlaybackPluginTestLogPath, "e:\\logs\\testframework\\playbackplugintest\\" );
|
|
41 |
#endif
|
|
42 |
|
|
43 |
// Log file
|
|
44 |
_LIT( KPlaybackPluginTestLogFile, "playbackplugintest.txt" );
|
|
45 |
_LIT( KPlaybackPluginTestLogFileWithTitle, "playbackplugintest_[%S].txt" );
|
|
46 |
|
|
47 |
// Other strings
|
|
48 |
_LIT( KPlaybackPluginTest_digitalPath, "\\testing\\data\\" );
|
|
49 |
_LIT(KTextHandlePlaybackMessage2, "HandlePlaybackMessage(CMpxMessage)");
|
|
50 |
|
|
51 |
|
|
52 |
// FORWARD DECLARATIONS
|
|
53 |
class MMPXPlaybackUtility;
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Cplaybackplugintest test class for STIF Test Framework TestScripter.
|
|
57 |
*
|
|
58 |
*/
|
|
59 |
NONSHARABLE_CLASS(CPlaybackPluginTest) : public CBaseTest,
|
|
60 |
public MMPXPlaybackObserver
|
|
61 |
{
|
|
62 |
public: // Constructors and destructor
|
|
63 |
|
|
64 |
/**
|
|
65 |
* Two-phased constructor.
|
|
66 |
*/
|
|
67 |
static CPlaybackPluginTest* NewL( CTestModuleIf& aTestModuleIf );
|
|
68 |
|
|
69 |
/**
|
|
70 |
* Destructor.
|
|
71 |
*/
|
|
72 |
virtual ~CPlaybackPluginTest();
|
|
73 |
|
|
74 |
public: // Functions from base classes
|
|
75 |
|
|
76 |
/**
|
|
77 |
* From CScriptBase Runs a script line.
|
|
78 |
* @since ?Series60_version
|
|
79 |
* @param aItem Script line containing method name and parameters
|
|
80 |
* @return Symbian OS error code
|
|
81 |
*/
|
|
82 |
virtual TInt RunMethodL( CStifItemParser& aItem );
|
|
83 |
|
|
84 |
// From MMPXPlaybackObserver
|
|
85 |
|
|
86 |
/**
|
|
87 |
* Handle playback message.
|
|
88 |
* Note: only one of HandlePlaybackMessage callback can be implemented.
|
|
89 |
* Note: change into pure virtual when all clients updated.
|
|
90 |
*
|
|
91 |
* @since S60 3.2.3
|
|
92 |
* @param aMsg playback message, ownership not transferred.
|
|
93 |
* Please check aMsg is not NULL before using it. If aErr is not
|
|
94 |
* KErrNone, plugin might still call back with more info in the aMsg.
|
|
95 |
* @param aErr system error code.
|
|
96 |
*/
|
|
97 |
void HandlePlaybackMessage(
|
|
98 |
CMPXMessage* aMessage, TInt aError );
|
|
99 |
|
|
100 |
private:
|
|
101 |
|
|
102 |
/**
|
|
103 |
* C++ default constructor.
|
|
104 |
*/
|
|
105 |
CPlaybackPluginTest( CTestModuleIf& aTestModuleIf );
|
|
106 |
|
|
107 |
/**
|
|
108 |
* By default Symbian 2nd phase constructor is private.
|
|
109 |
*/
|
|
110 |
void ConstructL();
|
|
111 |
|
|
112 |
// Prohibit copy constructor if not deriving from CBase.
|
|
113 |
// ?classname( const ?classname& );
|
|
114 |
// Prohibit assigment operator if not deriving from CBase.
|
|
115 |
// ?classname& operator=( const ?classname& );
|
|
116 |
|
|
117 |
/**
|
|
118 |
* Frees all resources allocated from test methods.
|
|
119 |
* @since ?Series60_version
|
|
120 |
*/
|
|
121 |
void Delete();
|
|
122 |
|
|
123 |
/**
|
|
124 |
* Test methods are listed below.
|
|
125 |
*/
|
|
126 |
TInt MMPXPlaybackUtilityNewL(CStifItemParser& /*aItem*/);
|
|
127 |
TInt MMPXPlaybackUtilityNewLHelixVideoPlugin(CStifItemParser& /*aItem*/);
|
|
128 |
TInt MMPXPlaybackUtilityNewLLocalAudioPlugin(CStifItemParser& /*aItem*/);
|
|
129 |
TInt MMPXPlaybackUtilityUtilityL(CStifItemParser& /*aItem*/);
|
|
130 |
|
|
131 |
//to test virtual void InitStreamingL(const TDesC& aUri,
|
|
132 |
// const TDesC8* aType,
|
|
133 |
// const TInt aAccessPoint)=0;
|
|
134 |
TInt InitStreamingL( CStifItemParser& aItem );
|
|
135 |
//to test virtual void Close()=0;
|
|
136 |
TInt Close( CStifItemParser& aItem );
|
|
137 |
//to test virtual void InitStreamingL(RFile& aShareableFile, const TInt aAccessPoint)=0;
|
|
138 |
TInt InitStreaming2L( CStifItemParser& aItem );
|
|
139 |
|
|
140 |
TInt InitRFileL( CStifItemParser& aItem );
|
|
141 |
TInt InitURIL( CStifItemParser& aItem );
|
|
142 |
|
|
143 |
/**
|
|
144 |
* Method used to log version of test class
|
|
145 |
*/
|
|
146 |
void SendTestClassVersion();
|
|
147 |
|
|
148 |
//ADD NEW METHOD DEC HERE
|
|
149 |
//[TestMethods] - Do not remove
|
|
150 |
|
|
151 |
private:
|
|
152 |
|
|
153 |
MMPXPlaybackUtility* iPlaybackUtility;
|
|
154 |
};
|
|
155 |
|
|
156 |
#endif // PLAYBACKPLUGINTEST_H
|
|
157 |
|
|
158 |
// End of File
|