changeset 34 | bbb98528c666 |
parent 0 | 96612d01cf9f |
child 35 | 3738fe97f027 |
33:48e74db5d516 | 34:bbb98528c666 |
---|---|
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: ?Description* |
14 * Description: |
15 */ |
15 */ |
16 |
|
17 |
16 |
18 // INCLUDE FILES |
17 // INCLUDE FILES |
19 #include <mmf/common/mmfcontrollerpluginresolver.h> // CleanupResetAndDestroyPushL |
18 #include <mmf/common/mmfcontrollerpluginresolver.h> // CleanupResetAndDestroyPushL |
20 #include <e32svr.h> |
19 #include <e32svr.h> |
21 #include <StifParser.h> |
20 #include <StifParser.h> |
22 #include <Stiftestinterface.h> |
21 #include <Stiftestinterface.h> |
23 #include <centralrepository.h> |
22 #include <centralrepository.h> |
24 #include <collate.h> |
23 #include <collate.h> |
25 |
24 |
26 #include "VCXTestLog.h" |
25 #include "VCXTestLog.h" |
27 #include "VCXTestCommon.h" |
26 #include "VCXMyVideosTestUtils.h" |
28 #include "CIptvTestActiveWait.h" |
27 #include "CVcxTestActiveWait.h" |
29 #include "CIptvTestTimer.h" |
28 #include "CVcxTestTimer.h" |
30 #include "VCXTestStatsKeeper.h" |
|
31 |
29 |
32 #include "VCXMyVideosCollectionPluginTest.h" |
30 #include "VCXMyVideosCollectionPluginTest.h" |
33 #include "VCXMyVideosCollectionPluginTester.h" |
31 #include "VCXMyVideosCollectionPluginTester.h" |
32 #include "VCXMyVideosTestUtils.h" |
|
33 #include "VCXTestMdsDbModifier.h" |
|
34 #include "VCXMyVideosTestCommon.h" |
34 #include "VCXMyVideosTestCommon.h" |
35 #include "VCXMyVideosTestDlWatcher.h" |
|
36 #include "VCXMyVideosTestServiceEmu.h" |
|
37 #include "VCXTestMdsDbModifier.h" |
|
38 |
35 |
39 #include <mpxmedia.h> |
36 #include <mpxmedia.h> |
40 #include <mpxmediageneraldefs.h> |
37 #include <mpxmediageneraldefs.h> |
41 #include <mpxmediageneralextdefs.h> |
38 #include <mpxmediageneralextdefs.h> |
42 |
39 |
40 #include "vcxmyvideosdefs.h" |
|
43 #include "vcxmyvideosuids.h" |
41 #include "vcxmyvideosuids.h" |
44 |
42 |
45 // CONSTANTS |
43 // CONSTANTS |
46 |
44 |
47 const TInt KVcxTestFileSize3GB = -999; |
45 const TInt KVcxTestFileSize3GB = -999; |
48 |
46 |
47 _LIT(KAbout2050CharsString, "asdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjaiasdfiajsdfasdfiasdjfijasdifjisdfjisdjfiasdjfidjai"); |
|
48 _LIT(KVcxTestEmptyString, ""); |
|
49 |
|
50 _LIT(KStifScriptInvalidRequest, "InvalidRequest"); |
|
51 _LIT(KStifScriptEmptyString, "EmptyString"); |
|
52 _LIT(KStifScript2KString, "2KString"); |
|
53 |
|
49 // MACROS |
54 // MACROS |
50 #define VCXMVTEST_ERR(err) ( iStatsEnabled ) ? KErrNone : err |
|
51 |
55 |
52 // MODULE DATA STRUCTURES |
56 // MODULE DATA STRUCTURES |
53 |
57 |
54 // ============================ MEMBER FUNCTIONS =============================== |
58 // ============================ MEMBER FUNCTIONS =============================== |
55 |
59 |
104 } |
108 } |
105 } |
109 } |
106 |
110 |
107 iSideloadFolders.ResetAndDestroy(); |
111 iSideloadFolders.ResetAndDestroy(); |
108 |
112 |
109 delete iTestCommon; |
113 delete iTestUtils; |
110 iTestCommon = NULL; |
114 iTestUtils = NULL; |
111 |
115 |
112 #ifdef __WINSCW__ |
116 #ifdef __WINSCW__ |
113 iClient.Close(); |
117 iClient.Close(); |
114 #endif // __WINSCW__ |
118 #endif // __WINSCW__ |
115 |
119 |
142 } |
146 } |
143 |
147 |
144 delete iMpxMedia; |
148 delete iMpxMedia; |
145 iMpxMedia = NULL; |
149 iMpxMedia = NULL; |
146 |
150 |
147 delete iServiceEmu; |
|
148 iServiceEmu = NULL; |
|
149 |
|
150 delete iMdsDbModifier; |
151 delete iMdsDbModifier; |
151 iMdsDbModifier = NULL; |
152 iMdsDbModifier = NULL; |
152 |
153 |
153 delete iFileMan; |
154 delete iFileMan; |
154 iFileMan = NULL; |
155 iFileMan = NULL; |
155 |
156 |
156 iFs.Close(); |
157 iFs.Close(); |
157 |
|
158 delete iStats; |
|
159 iStats = NULL; |
|
160 |
158 |
161 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::Delete <----------"); |
159 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::Delete <----------"); |
162 } |
160 } |
163 |
161 |
164 // ----------------------------------------------------------------------------- |
162 // ----------------------------------------------------------------------------- |
175 // Copy this line for every implemented function. |
173 // Copy this line for every implemented function. |
176 // First string is the function name used in TestScripter script file. |
174 // First string is the function name used in TestScripter script file. |
177 // Second is the actual implementation member function. |
175 // Second is the actual implementation member function. |
178 ENTRY( "Create", CVCXMyVideosCollectionPluginTest::CreateL ), |
176 ENTRY( "Create", CVCXMyVideosCollectionPluginTest::CreateL ), |
179 |
177 |
180 ENTRY( "EnableStats", CVCXMyVideosCollectionPluginTest::EnableStatsL ), |
|
181 ENTRY( "SetPreferredMemory", CVCXMyVideosCollectionPluginTest::SetPreferredMemoryL ), |
|
182 ENTRY( "SetSortingOrder", CVCXMyVideosCollectionPluginTest::SetSortingOrderL ), |
178 ENTRY( "SetSortingOrder", CVCXMyVideosCollectionPluginTest::SetSortingOrderL ), |
183 ENTRY( "SetAutomaticRefresh", CVCXMyVideosCollectionPluginTest::SetAutomaticRefresh ), |
179 ENTRY( "SetAutomaticRefresh", CVCXMyVideosCollectionPluginTest::SetAutomaticRefresh ), |
184 ENTRY( "SetQuietMode", CVCXMyVideosCollectionPluginTest::SetQuietMode ), |
180 ENTRY( "SetQuietMode", CVCXMyVideosCollectionPluginTest::SetQuietMode ), |
185 ENTRY( "CoolDown", CVCXMyVideosCollectionPluginTest::CoolDownL ), |
181 ENTRY( "CoolDown", CVCXMyVideosCollectionPluginTest::CoolDownL ), |
186 ENTRY( "DisableDownloadCheck", CVCXMyVideosCollectionPluginTest::DisableDownloadCheckL ), |
|
187 ENTRY( "SetFileCheck", CVCXMyVideosCollectionPluginTest::SetFileCheckL ), |
182 ENTRY( "SetFileCheck", CVCXMyVideosCollectionPluginTest::SetFileCheckL ), |
188 ENTRY( "SetAutoResume", CVCXMyVideosCollectionPluginTest::SetAutoResumeL ), |
183 ENTRY( "SetUseCopiedMedias", CVCXMyVideosCollectionPluginTest::SetUseCopiedMediasL ), |
189 |
184 |
190 ENTRY( "OpenCollection", CVCXMyVideosCollectionPluginTest::OpenCollectionL ), |
185 ENTRY( "OpenCollection", CVCXMyVideosCollectionPluginTest::OpenCollectionL ), |
191 ENTRY( "OpenLevel", CVCXMyVideosCollectionPluginTest::OpenLevelL ), |
186 ENTRY( "OpenLevel", CVCXMyVideosCollectionPluginTest::OpenLevelL ), |
187 ENTRY( "OpenLevelByIndex", CVCXMyVideosCollectionPluginTest::OpenLevelByIndexL ), |
|
192 ENTRY( "RefreshContents", CVCXMyVideosCollectionPluginTest::RefreshContentsL ), |
188 ENTRY( "RefreshContents", CVCXMyVideosCollectionPluginTest::RefreshContentsL ), |
193 ENTRY( "GetMediasByMpxId", CVCXMyVideosCollectionPluginTest::GetMediasByMpxIdL ), |
189 ENTRY( "GetMediasByMpxId", CVCXMyVideosCollectionPluginTest::GetMediasByMpxIdL ), |
194 ENTRY( "CloseLevel", CVCXMyVideosCollectionPluginTest::CloseLevelL ), |
190 ENTRY( "CloseLevel", CVCXMyVideosCollectionPluginTest::CloseLevelL ), |
195 |
191 |
196 ENTRY( "GetMediaFullDetails", CVCXMyVideosCollectionPluginTest::GetMediaFullDetailsL ), |
192 ENTRY( "GetMediaFullDetails", CVCXMyVideosCollectionPluginTest::GetMediaFullDetailsL ), |
197 ENTRY( "GetMediaFullDetailsByMpxId", CVCXMyVideosCollectionPluginTest::GetMediaFullDetailsByMpxIdL ), |
193 ENTRY( "GetMediaFullDetailsByMpxId", CVCXMyVideosCollectionPluginTest::GetMediaFullDetailsByMpxIdL ), |
198 ENTRY( "GetAllMediaFullDetails", CVCXMyVideosCollectionPluginTest::GetAllMediaFullDetailsL ), |
194 ENTRY( "GetAllMediaFullDetails", CVCXMyVideosCollectionPluginTest::GetAllMediaFullDetailsL ), |
199 ENTRY( "SetMediaDetail", CVCXMyVideosCollectionPluginTest::SetMediaDetailL ), |
195 ENTRY( "SetMediaDetail", CVCXMyVideosCollectionPluginTest::SetMediaDetailL ), |
200 ENTRY( "CheckMediaDetail", CVCXMyVideosCollectionPluginTest::CheckMediaDetailL ), |
196 ENTRY( "CheckMediaDetail", CVCXMyVideosCollectionPluginTest::CheckMediaDetailL ), |
197 ENTRY( "CheckAlbumCount", CVCXMyVideosCollectionPluginTest::CheckAlbumCountL ), |
|
201 ENTRY( "CheckMediaCount", CVCXMyVideosCollectionPluginTest::CheckMediaCountL ), |
198 ENTRY( "CheckMediaCount", CVCXMyVideosCollectionPluginTest::CheckMediaCountL ), |
202 ENTRY( "CheckMinimumMediaCount", CVCXMyVideosCollectionPluginTest::CheckMinimumMediaCountL ), |
199 ENTRY( "CheckMinimumMediaCount", CVCXMyVideosCollectionPluginTest::CheckMinimumMediaCountL ), |
203 ENTRY( "CheckMaximumMediaCount", CVCXMyVideosCollectionPluginTest::CheckMaximumMediaCountL ), |
200 ENTRY( "CheckMaximumMediaCount", CVCXMyVideosCollectionPluginTest::CheckMaximumMediaCountL ), |
204 ENTRY( "CheckDownloadCount", CVCXMyVideosCollectionPluginTest::CheckDownloadCountL ), |
|
205 |
201 |
206 ENTRY( "CreateCopyOfMedia", CVCXMyVideosCollectionPluginTest::CreateCopyOfMediaL ), |
202 ENTRY( "CreateCopyOfMedia", CVCXMyVideosCollectionPluginTest::CreateCopyOfMediaL ), |
207 ENTRY( "CreateEmptyMedia", CVCXMyVideosCollectionPluginTest::CreateEmptyMediaL ), |
203 ENTRY( "CreateEmptyMedia", CVCXMyVideosCollectionPluginTest::CreateEmptyMediaL ), |
208 ENTRY( "AddMedia", CVCXMyVideosCollectionPluginTest::AddMediaL ), |
204 ENTRY( "AddMedia", CVCXMyVideosCollectionPluginTest::AddMediaL ), |
209 ENTRY( "SetMedia", CVCXMyVideosCollectionPluginTest::SetMediaL ), |
205 ENTRY( "SetMedia", CVCXMyVideosCollectionPluginTest::SetMediaL ), |
210 ENTRY( "OutsideMediaUpdate", CVCXMyVideosCollectionPluginTest::OutsideMediaUpdateL ), |
206 ENTRY( "OutsideMediaUpdate", CVCXMyVideosCollectionPluginTest::OutsideMediaUpdateL ), |
211 ENTRY( "CancelNextOperation", CVCXMyVideosCollectionPluginTest::CancelNextOperationL ), |
207 ENTRY( "CancelNextOperation", CVCXMyVideosCollectionPluginTest::CancelNextOperationL ), |
212 |
208 |
213 ENTRY( "DeleteFileOfMedia", CVCXMyVideosCollectionPluginTest::DeleteFileOfMediaL ), |
209 ENTRY( "DeleteFileOfMedia", CVCXMyVideosCollectionPluginTest::DeleteFileOfMediaL ), |
214 ENTRY( "DeleteFilesOfAllMedias", CVCXMyVideosCollectionPluginTest::DeleteFilesOfAllMediasL ), |
210 ENTRY( "DeleteFilesOfAllMedias", CVCXMyVideosCollectionPluginTest::DeleteFilesOfAllMediasL ), |
211 ENTRY( "CreateAlbum", CVCXMyVideosCollectionPluginTest::CreateAlbumL ), |
|
215 ENTRY( "RemoveMedia", CVCXMyVideosCollectionPluginTest::RemoveMediaL ), |
212 ENTRY( "RemoveMedia", CVCXMyVideosCollectionPluginTest::RemoveMediaL ), |
216 ENTRY( "RemoveAllMedia", CVCXMyVideosCollectionPluginTest::RemoveAllMediaL ), |
213 ENTRY( "RemoveAllMedia", CVCXMyVideosCollectionPluginTest::RemoveAllMediaL ), |
217 ENTRY( "MoveMedia", CVCXMyVideosCollectionPluginTest::MoveMediaL ), |
214 ENTRY( "MoveMedia", CVCXMyVideosCollectionPluginTest::MoveMediaL ), |
218 ENTRY( "MoveMedias", CVCXMyVideosCollectionPluginTest::MoveMediasL ), |
215 ENTRY( "MoveMedias", CVCXMyVideosCollectionPluginTest::MoveMediasL ), |
219 ENTRY( "CancelMove", CVCXMyVideosCollectionPluginTest::CancelMoveL ), |
216 ENTRY( "CancelMove", CVCXMyVideosCollectionPluginTest::CancelMoveL ), |
222 ENTRY( "CancelCopy", CVCXMyVideosCollectionPluginTest::CancelCopyL ), |
219 ENTRY( "CancelCopy", CVCXMyVideosCollectionPluginTest::CancelCopyL ), |
223 ENTRY( "DeleteMedia", CVCXMyVideosCollectionPluginTest::DeleteMediaL ), |
220 ENTRY( "DeleteMedia", CVCXMyVideosCollectionPluginTest::DeleteMediaL ), |
224 ENTRY( "DeleteMedias", CVCXMyVideosCollectionPluginTest::DeleteMediasL ), |
221 ENTRY( "DeleteMedias", CVCXMyVideosCollectionPluginTest::DeleteMediasL ), |
225 ENTRY( "CancelDelete", CVCXMyVideosCollectionPluginTest::CancelDeleteL ), |
222 ENTRY( "CancelDelete", CVCXMyVideosCollectionPluginTest::CancelDeleteL ), |
226 |
223 |
224 ENTRY( "CreateAlbum", CVCXMyVideosCollectionPluginTest::CreateAlbumL ), |
|
225 ENTRY( "DeleteAlbums", CVCXMyVideosCollectionPluginTest::DeleteAlbumsL ), |
|
226 ENTRY( "DeleteAllAlbums", CVCXMyVideosCollectionPluginTest::DeleteAllAlbumsL ), |
|
227 ENTRY( "AddMediasToAlbum", CVCXMyVideosCollectionPluginTest::AddMediasToAlbumL ), |
|
228 ENTRY( "RemoveMediasFromAlbum", CVCXMyVideosCollectionPluginTest::RemoveMediasFromAlbumL ), |
|
229 ENTRY( "CheckAlbumCount", CVCXMyVideosCollectionPluginTest::CheckAlbumCount ), |
|
230 |
|
227 ENTRY( "CreateVideoFile", CVCXMyVideosCollectionPluginTest::CreateVideoFileL ), |
231 ENTRY( "CreateVideoFile", CVCXMyVideosCollectionPluginTest::CreateVideoFileL ), |
228 ENTRY( "CreateVideoFileNoWait", CVCXMyVideosCollectionPluginTest::CreateVideoFileNoWaitL ), |
232 ENTRY( "CreateVideoFileNoWait", CVCXMyVideosCollectionPluginTest::CreateVideoFileNoWaitL ), |
229 ENTRY( "EnsureDriveForVideos", CVCXMyVideosCollectionPluginTest::EnsureDriveForVideosL ), |
233 ENTRY( "EnsureDriveForVideos", CVCXMyVideosCollectionPluginTest::EnsureDriveForVideosL ), |
230 ENTRY( "EmptySideloadFolders", CVCXMyVideosCollectionPluginTest::EmptySideloadFoldersL ), |
234 ENTRY( "EmptySideloadFolders", CVCXMyVideosCollectionPluginTest::EmptySideloadFoldersL ), |
231 ENTRY( "SetDeleteSideloadedVideos", CVCXMyVideosCollectionPluginTest::SetDeleteSideloadedVideos ), |
235 ENTRY( "SetDeleteSideloadedVideos", CVCXMyVideosCollectionPluginTest::SetDeleteSideloadedVideos ), |
232 |
236 |
233 ENTRY( "Download", CVCXMyVideosCollectionPluginTest::DownloadL ), |
|
234 ENTRY( "ResumeDownload", CVCXMyVideosCollectionPluginTest::ResumeDownloadL ), |
|
235 ENTRY( "ResumeAllDownloads", CVCXMyVideosCollectionPluginTest::ResumeAllDownloadsL ), |
|
236 ENTRY( "DownloadUsingMedia", CVCXMyVideosCollectionPluginTest::DownloadUsingMediaL ), |
|
237 ENTRY( "ResumeDownloadUsingMedia", CVCXMyVideosCollectionPluginTest::ResumeDownloadUsingMediaL ), |
|
238 ENTRY( "DownloadUrl", CVCXMyVideosCollectionPluginTest::DownloadUrlL ), |
|
239 ENTRY( "CancelDownload", CVCXMyVideosCollectionPluginTest::CancelDownloadL ), |
|
240 ENTRY( "CancelDownloadById", CVCXMyVideosCollectionPluginTest::CancelDownloadByIdL ), |
|
241 ENTRY( "PauseDownload", CVCXMyVideosCollectionPluginTest::PauseDownloadL ), |
|
242 ENTRY( "PauseDownloadByUrl", CVCXMyVideosCollectionPluginTest::PauseDownloadByUrlL ), |
|
243 ENTRY( "CheckDownloadProgress", CVCXMyVideosCollectionPluginTest::CheckDownloadProgressL ), |
|
244 |
|
245 ENTRY( "WaitAllDownloads", CVCXMyVideosCollectionPluginTest::WaitAllDownloadsL ), |
|
246 ENTRY( "WaitForMessage", CVCXMyVideosCollectionPluginTest::WaitForMessageL ), |
237 ENTRY( "WaitForMessage", CVCXMyVideosCollectionPluginTest::WaitForMessageL ), |
247 ENTRY( "WaitForAnyMessage", CVCXMyVideosCollectionPluginTest::WaitForAnyMessageL ), |
238 ENTRY( "WaitForAnyMessage", CVCXMyVideosCollectionPluginTest::WaitForAnyMessageL ), |
248 ENTRY( "WaitForMessages", CVCXMyVideosCollectionPluginTest::WaitForMessagesL ), |
239 ENTRY( "WaitForMessages", CVCXMyVideosCollectionPluginTest::WaitForMessagesL ), |
249 |
240 |
250 }; |
241 }; |
255 return RunInternalL( KFunctions, count, aItem ); |
246 return RunInternalL( KFunctions, count, aItem ); |
256 |
247 |
257 } |
248 } |
258 |
249 |
259 // ----------------------------------------------------------------------------- |
250 // ----------------------------------------------------------------------------- |
260 // CVCXMyVideosCollectionPluginTest::EnableStatsL |
|
261 // ----------------------------------------------------------------------------- |
|
262 // |
|
263 TInt CVCXMyVideosCollectionPluginTest::EnableStatsL( CStifItemParser& aItem ) |
|
264 { |
|
265 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::EnableStatsL ---------->"); |
|
266 // Print to UI |
|
267 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
268 _LIT( KWhere, "In EnableStatsL" ); |
|
269 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
270 // Print to log file |
|
271 iLog->Log( KWhere ); |
|
272 |
|
273 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
274 |
|
275 TPtrC statsName; |
|
276 TPtrC fileName; |
|
277 User::LeaveIfError( aItem.GetNextString( statsName) ); |
|
278 User::LeaveIfError( aItem.GetNextString( fileName) ); |
|
279 |
|
280 TRAP_IGNORE( iStats->StartStatsKeepingL( statsName, fileName ) ); |
|
281 iStatsEnabled = ETrue; |
|
282 |
|
283 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::EnableStatsL <----------"); |
|
284 return KErrNone; |
|
285 } |
|
286 |
|
287 // ----------------------------------------------------------------------------- |
|
288 // CVCXMyVideosCollectionPluginTest::CreateL |
251 // CVCXMyVideosCollectionPluginTest::CreateL |
289 // ----------------------------------------------------------------------------- |
252 // ----------------------------------------------------------------------------- |
290 // |
253 // |
291 TInt CVCXMyVideosCollectionPluginTest::CreateL( CStifItemParser& aItem ) |
254 TInt CVCXMyVideosCollectionPluginTest::CreateL( CStifItemParser& aItem ) |
292 { |
255 { |
301 User::LeaveIfError( iFs.Connect() ); |
264 User::LeaveIfError( iFs.Connect() ); |
302 iFileMan = CFileMan::NewL( iFs ); |
265 iFileMan = CFileMan::NewL( iFs ); |
303 |
266 |
304 aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing); |
267 aItem.SetParsingType(CStifItemParser::EQuoteStyleParsing); |
305 |
268 |
306 iTestCommon = CVCXTestCommon::NewL(); |
269 iTestUtils = CVCXMyVideosTestUtils::NewL(); |
307 iStats = CVCXTestStatsKeeper::NewL(); |
270 iTester = CVCXMyVideosCollectionPluginTester::NewL( this, iTestUtils ); |
308 iTester = CVCXMyVideosCollectionPluginTester::NewL( this, iTestCommon, iStats ); |
271 iActiveWait = CVcxTestActiveWait::NewL(); |
309 iActiveWait = CIptvTestActiveWait::NewL(); |
272 iActiveWaitBlocking = CVcxTestActiveWait::NewL(); |
310 iActiveWaitBlocking = CIptvTestActiveWait::NewL(); |
273 iTimeoutTimer = CVcxTestTimer::NewL(*this, 0); |
311 iTimeoutTimer = CIptvTestTimer::NewL(*this, 0); |
274 iCoolDownTimer = CVcxTestTimer::NewL(*this, 1); |
312 iCoolDownTimer = CIptvTestTimer::NewL(*this, 1); |
|
313 |
275 |
314 #ifdef __WINSCW__ |
276 #ifdef __WINSCW__ |
315 TInt err = iClient.Connect(); |
277 TInt err = iClient.Connect(); |
316 if( KErrNone != err ) |
278 if( KErrNone != err ) |
317 { |
279 { |
318 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: Could not start MDS server session! Err: %d", err); |
280 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: Could not start MDS server session! Err: %d", err); |
319 } |
281 } |
320 #endif // __WINSCW__ |
282 #endif // __WINSCW__ |
321 |
283 |
322 iAutoResume = ETrue; |
|
323 |
|
324 iTester->SetAutoResume( iAutoResume ); |
|
325 |
|
326 iServiceEmu = CVCXMyVideosTestServiceEmu::NewL(); |
|
327 |
|
328 iMdsDbModifier = CVCXTestMdsDbModifier::NewL(); |
284 iMdsDbModifier = CVCXTestMdsDbModifier::NewL(); |
329 |
285 |
330 iCurrentSortOrder = EVcxMyVideosSortingNone; |
286 iCurrentSortOrder = EVcxMyVideosSortingNone; |
331 |
287 |
332 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CreateL <----------"); |
288 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CreateL <----------"); |
333 return KErrNone; |
|
334 } |
|
335 |
|
336 // ----------------------------------------------------------------------------- |
|
337 // CVCXMyVideosCollectionPluginTest::SetPreferredMemoryL |
|
338 // ----------------------------------------------------------------------------- |
|
339 // |
|
340 TInt CVCXMyVideosCollectionPluginTest::SetPreferredMemoryL( CStifItemParser& aItem ) |
|
341 { |
|
342 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::SetPreferredMemoryL ---------->"); |
|
343 // Print to UI |
|
344 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
345 _LIT( KWhere, "In SetPreferredMemoryL" ); |
|
346 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
347 // Print to log file |
|
348 iLog->Log( KWhere ); |
|
349 |
|
350 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
351 |
|
352 TInt drive(0); |
|
353 User::LeaveIfError( GetDriveParam( aItem, drive ) ); |
|
354 |
|
355 // These were defined in CVcxMyVideosDownloadUtil::PreferredMemoryDesL() |
|
356 const TInt KVcxCenRepUid = 0x102750E2; // same as KIptvCenRepUid in CIptvUtil.h |
|
357 const TInt KVcxCenRepPreferredMemoryKey = 0x01; // same as KIptvCenRepPreferredMemoryKey in CIptvUtil.h |
|
358 |
|
359 TUid uid; |
|
360 uid.iUid = KVcxCenRepUid; |
|
361 |
|
362 CRepository* cenRep = CRepository::NewLC( uid ); |
|
363 User::LeaveIfError( cenRep->Set( KVcxCenRepPreferredMemoryKey, drive ) ); |
|
364 CleanupStack::PopAndDestroy( cenRep ); |
|
365 |
|
366 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetPreferredMemoryL <----------"); |
|
367 return KErrNone; |
289 return KErrNone; |
368 } |
290 } |
369 |
291 |
370 // ----------------------------------------------------------------------------- |
292 // ----------------------------------------------------------------------------- |
371 // CVCXMyVideosCollectionPluginTest::SetSortingOrderL |
293 // CVCXMyVideosCollectionPluginTest::SetSortingOrderL |
395 TRAP( err, DoTotalRefreshL() ); |
317 TRAP( err, DoTotalRefreshL() ); |
396 |
318 |
397 iCurrentSortOrder = value; |
319 iCurrentSortOrder = value; |
398 |
320 |
399 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetSortingOrderL <----------"); |
321 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetSortingOrderL <----------"); |
400 return VCXMVTEST_ERR( err ); |
322 return err; |
401 } |
323 } |
402 |
324 |
403 // ----------------------------------------------------------------------------- |
325 // ----------------------------------------------------------------------------- |
404 // CVCXMyVideosCollectionPluginTest::SetAutomaticRefresh |
326 // CVCXMyVideosCollectionPluginTest::SetAutomaticRefresh |
405 // ----------------------------------------------------------------------------- |
327 // ----------------------------------------------------------------------------- |
421 { |
343 { |
422 iTester->SetAutomaticRefresh( static_cast<TBool>(value) ); |
344 iTester->SetAutomaticRefresh( static_cast<TBool>(value) ); |
423 } |
345 } |
424 |
346 |
425 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetAutomaticRefresh <----------"); |
347 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetAutomaticRefresh <----------"); |
426 return VCXMVTEST_ERR( err ); |
348 return err; |
427 } |
349 } |
428 |
350 |
429 // ----------------------------------------------------------------------------- |
351 // ----------------------------------------------------------------------------- |
430 // CVCXMyVideosCollectionPluginTest::SetQuietMode |
352 // CVCXMyVideosCollectionPluginTest::SetQuietMode |
431 // ----------------------------------------------------------------------------- |
353 // ----------------------------------------------------------------------------- |
447 { |
369 { |
448 iTester->SetQuietMode( static_cast<TBool>(value) ); |
370 iTester->SetQuietMode( static_cast<TBool>(value) ); |
449 } |
371 } |
450 |
372 |
451 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetQuietMode <----------"); |
373 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetQuietMode <----------"); |
452 return VCXMVTEST_ERR( err ); |
374 return err; |
453 } |
375 } |
454 |
376 |
455 // ----------------------------------------------------------------------------- |
377 // ----------------------------------------------------------------------------- |
456 // CIptvMyVideosApiTest::CoolDownL |
378 // CVcxMyVideosApiTest::CoolDownL |
457 // ----------------------------------------------------------------------------- |
379 // ----------------------------------------------------------------------------- |
458 // |
380 // |
459 TInt CVCXMyVideosCollectionPluginTest::CoolDownL( CStifItemParser& /* aItem */ ) |
381 TInt CVCXMyVideosCollectionPluginTest::CoolDownL( CStifItemParser& /* aItem */ ) |
460 { |
382 { |
461 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CoolDownL ---------->"); |
383 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CoolDownL ---------->"); |
480 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CoolDownL <----------"); |
402 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CoolDownL <----------"); |
481 return KErrNone; |
403 return KErrNone; |
482 } |
404 } |
483 |
405 |
484 // ----------------------------------------------------------------------------- |
406 // ----------------------------------------------------------------------------- |
485 // CIptvMyVideosApiTest::DisableDownloadCheckL |
407 // CVcxMyVideosApiTest::SetFileCheckL |
486 // ----------------------------------------------------------------------------- |
|
487 // |
|
488 TInt CVCXMyVideosCollectionPluginTest::DisableDownloadCheckL( CStifItemParser& /* aItem */ ) |
|
489 { |
|
490 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DisableDownloadCheckL"); |
|
491 if( iTester ) |
|
492 { |
|
493 iTester->GetDownloadWatcher()->DisableDownloadCheck(); |
|
494 } |
|
495 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DisableDownloadCheckL"); |
|
496 return KErrNone; |
|
497 } |
|
498 |
|
499 // ----------------------------------------------------------------------------- |
|
500 // CIptvMyVideosApiTest::SetFileCheckL |
|
501 // ----------------------------------------------------------------------------- |
408 // ----------------------------------------------------------------------------- |
502 // |
409 // |
503 TInt CVCXMyVideosCollectionPluginTest::SetFileCheckL( CStifItemParser& aItem ) |
410 TInt CVCXMyVideosCollectionPluginTest::SetFileCheckL( CStifItemParser& aItem ) |
504 { |
411 { |
505 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::SetFileCheckL"); |
412 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::SetFileCheckL"); |
511 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetFileCheckL"); |
418 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetFileCheckL"); |
512 return KErrNone; |
419 return KErrNone; |
513 } |
420 } |
514 |
421 |
515 // ----------------------------------------------------------------------------- |
422 // ----------------------------------------------------------------------------- |
516 // CIptvMyVideosApiTest::SetAutoResumeL |
423 // CVcxMyVideosApiTest::SetUseCopiedMediasL |
517 // ----------------------------------------------------------------------------- |
424 // ----------------------------------------------------------------------------- |
518 // |
425 // |
519 TInt CVCXMyVideosCollectionPluginTest::SetAutoResumeL( CStifItemParser& aItem ) |
426 TInt CVCXMyVideosCollectionPluginTest::SetUseCopiedMediasL( CStifItemParser& aItem ) |
520 { |
427 { |
521 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::SetAutoResumeL ---------->"); |
428 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::SetUseCopiedMediasL"); |
522 // Print to UI |
429 |
523 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
430 TInt value(0); |
524 _LIT( KWhere, "In SetAutoResumeL" ); |
431 User::LeaveIfError( aItem.GetNextInt( value ) ); |
525 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
432 TBool set = static_cast<TBool>(value); |
526 // Print to log file |
433 iTester->SetUseCopiedMediasL( set ); |
527 iLog->Log( KWhere ); |
434 |
528 |
435 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetUseCopiedMediasL"); |
529 TInt autoResume(0); |
|
530 User::LeaveIfError( aItem.GetNextInt( autoResume ) ); |
|
531 iAutoResume = autoResume; |
|
532 if( iTester ) |
|
533 { |
|
534 iTester->SetAutoResume( iAutoResume ); |
|
535 } |
|
536 |
|
537 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetAutoResumeL <----------"); |
|
538 return KErrNone; |
436 return KErrNone; |
539 } |
437 } |
540 |
438 |
541 // ----------------------------------------------------------------------------- |
439 // ----------------------------------------------------------------------------- |
542 // CVCXMyVideosCollectionPluginTest::OpenCollectionL |
440 // CVCXMyVideosCollectionPluginTest::OpenCollectionL |
577 |
475 |
578 if( err != KErrNone ) |
476 if( err != KErrNone ) |
579 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
477 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
580 |
478 |
581 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::OpenCollectionL <----------"); |
479 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::OpenCollectionL <----------"); |
582 return VCXMVTEST_ERR( err ); |
480 return err; |
583 } |
481 } |
584 |
482 |
585 // ----------------------------------------------------------------------------- |
483 // ----------------------------------------------------------------------------- |
586 // CVCXMyVideosCollectionPluginTest::OpenLevelL |
484 // CVCXMyVideosCollectionPluginTest::OpenLevelL |
587 // ----------------------------------------------------------------------------- |
485 // ----------------------------------------------------------------------------- |
588 // |
486 // |
589 TInt CVCXMyVideosCollectionPluginTest::OpenLevelL( CStifItemParser& aItem ) |
487 TInt CVCXMyVideosCollectionPluginTest::OpenLevelL( CStifItemParser& aItem ) |
590 { |
488 { |
591 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::OpenLevelL ---------->"); |
489 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::OpenLevelL ---------->"); |
490 // Print to UI |
|
491 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
492 _LIT( KWhere, "In OpenLevelL" ); |
|
493 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
494 // Print to log file |
|
495 iLog->Log( KWhere ); |
|
496 |
|
497 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
498 |
|
499 TPtrC name; |
|
500 User::LeaveIfError( aItem.GetNextString( name ) ); |
|
501 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: levelName: %S", &name); |
|
502 |
|
503 iLastReceivedMessage = -1; |
|
504 |
|
505 TInt err( KErrNotReady ); |
|
506 if( iTester ) |
|
507 { |
|
508 TRAP( err, iTester->OpenLevelL( name ) ); |
|
509 } |
|
510 |
|
511 if( err != KErrNone ) |
|
512 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
|
513 |
|
514 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::OpenLevelL <----------"); |
|
515 return err; |
|
516 } |
|
517 |
|
518 // ----------------------------------------------------------------------------- |
|
519 // CVCXMyVideosCollectionPluginTest::OpenLevelByIndexL |
|
520 // ----------------------------------------------------------------------------- |
|
521 // |
|
522 TInt CVCXMyVideosCollectionPluginTest::OpenLevelByIndexL( CStifItemParser& aItem ) |
|
523 { |
|
524 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::OpenLevelByIndexL ---------->"); |
|
592 // Print to UI |
525 // Print to UI |
593 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
526 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
594 _LIT( KWhere, "In OpenLevelL" ); |
527 _LIT( KWhere, "In OpenLevelL" ); |
595 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
528 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
596 // Print to log file |
529 // Print to log file |
610 } |
543 } |
611 |
544 |
612 if( err != KErrNone ) |
545 if( err != KErrNone ) |
613 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
546 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
614 |
547 |
615 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::OpenLevelL <----------"); |
548 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::OpenLevelByIndexL <----------"); |
616 return VCXMVTEST_ERR( err ); |
549 return err; |
617 } |
550 } |
618 |
551 |
619 // ----------------------------------------------------------------------------- |
552 // ----------------------------------------------------------------------------- |
620 // CVCXMyVideosCollectionPluginTest::CloseLevelL |
553 // CVCXMyVideosCollectionPluginTest::CloseLevelL |
621 // ----------------------------------------------------------------------------- |
554 // ----------------------------------------------------------------------------- |
640 |
573 |
641 if( err != KErrNone ) |
574 if( err != KErrNone ) |
642 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
575 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
643 |
576 |
644 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CloseLevelL <----------"); |
577 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CloseLevelL <----------"); |
645 return VCXMVTEST_ERR( err ); |
578 return err; |
646 } |
579 } |
647 |
580 |
648 // ----------------------------------------------------------------------------- |
581 // ----------------------------------------------------------------------------- |
649 // CVCXMyVideosCollectionPluginTest::RefreshContentsL |
582 // CVCXMyVideosCollectionPluginTest::RefreshContentsL |
650 // ----------------------------------------------------------------------------- |
583 // ----------------------------------------------------------------------------- |
671 |
604 |
672 if( err != KErrNone ) |
605 if( err != KErrNone ) |
673 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
606 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
674 |
607 |
675 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::RefreshContentsL <----------"); |
608 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::RefreshContentsL <----------"); |
676 return VCXMVTEST_ERR( err ); |
609 return err; |
677 } |
610 } |
678 |
611 |
679 // ----------------------------------------------------------------------------- |
612 // ----------------------------------------------------------------------------- |
680 // CVCXMyVideosCollectionPluginTest::RefreshContentsL |
613 // CVCXMyVideosCollectionPluginTest::RefreshContentsL |
681 // ----------------------------------------------------------------------------- |
614 // ----------------------------------------------------------------------------- |
718 |
651 |
719 if( err != KErrNone ) |
652 if( err != KErrNone ) |
720 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
653 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
721 |
654 |
722 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::GetMediasByMpxIdL <----------"); |
655 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::GetMediasByMpxIdL <----------"); |
723 return VCXMVTEST_ERR( err ); |
656 return err; |
724 } |
657 } |
725 |
658 |
726 // ----------------------------------------------------------------------------- |
659 // ----------------------------------------------------------------------------- |
727 // CVCXMyVideosCollectionPluginTest::GetMediaFullDetailsL |
660 // CVCXMyVideosCollectionPluginTest::GetMediaFullDetailsL |
728 // ----------------------------------------------------------------------------- |
661 // ----------------------------------------------------------------------------- |
774 } |
707 } |
775 |
708 |
776 messages.Reset(); |
709 messages.Reset(); |
777 |
710 |
778 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::GetMediaFullDetailsL <----------"); |
711 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::GetMediaFullDetailsL <----------"); |
779 return VCXMVTEST_ERR( err ); |
712 return err; |
780 } |
713 } |
781 |
714 |
782 // ----------------------------------------------------------------------------- |
715 // ----------------------------------------------------------------------------- |
783 // CVCXMyVideosCollectionPluginTest::GetMediaFullDetailsByMpxIdL |
716 // CVCXMyVideosCollectionPluginTest::GetMediaFullDetailsByMpxIdL |
784 // ----------------------------------------------------------------------------- |
717 // ----------------------------------------------------------------------------- |
841 } |
774 } |
842 |
775 |
843 messages.Reset(); |
776 messages.Reset(); |
844 |
777 |
845 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::GetMediaFullDetailsByMpxIdL <----------"); |
778 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::GetMediaFullDetailsByMpxIdL <----------"); |
846 return VCXMVTEST_ERR( err ); |
779 return err; |
847 } |
780 } |
848 |
781 |
849 // ----------------------------------------------------------------------------- |
782 // ----------------------------------------------------------------------------- |
850 // CVCXMyVideosCollectionPluginTest::GetAllMediaFullDetailsL |
783 // CVCXMyVideosCollectionPluginTest::GetAllMediaFullDetailsL |
851 // ----------------------------------------------------------------------------- |
784 // ----------------------------------------------------------------------------- |
874 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
807 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
875 |
808 |
876 iLastReceivedMessage = -1; |
809 iLastReceivedMessage = -1; |
877 |
810 |
878 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::GetAllMediaFullDetailsL <----------"); |
811 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::GetAllMediaFullDetailsL <----------"); |
879 return VCXMVTEST_ERR( err ); |
812 return err; |
880 } |
813 } |
881 |
814 |
882 // ----------------------------------------------------------------------------- |
815 // ----------------------------------------------------------------------------- |
883 // CVCXMyVideosCollectionPluginTest::CheckMediaDetailL |
816 // CVCXMyVideosCollectionPluginTest::CheckMediaDetailL |
884 // ----------------------------------------------------------------------------- |
817 // ----------------------------------------------------------------------------- |
901 |
834 |
902 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
835 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
903 |
836 |
904 TInt drive(0); |
837 TInt drive(0); |
905 User::LeaveIfError( GetDriveParam( aItem, drive ) ); |
838 User::LeaveIfError( GetDriveParam( aItem, drive ) ); |
906 |
839 |
907 TInt itemIndex(0); |
840 // Get the media object to be checked. |
908 User::LeaveIfError( aItem.GetNextInt( itemIndex ) ); |
841 |
909 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: item index: %d", itemIndex); |
842 TPtrC itemIndexOrName; |
910 |
843 User::LeaveIfError( aItem.GetNextString( itemIndexOrName ) ); |
911 if( itemIndex < 0 || itemIndex >= iTester->GetMediaCount() ) |
844 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: item index or name: %S", &itemIndexOrName); |
912 { |
845 |
913 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: Error. Index (%d) out of bounds.", itemIndex); |
846 TLex lex( itemIndexOrName ); |
847 TInt itemIndex( -1 ); |
|
848 if( lex.Val( itemIndex ) == KErrNone ) |
|
849 { |
|
850 if( itemIndex < 0 || itemIndex >= iTester->GetMediaCount() ) |
|
851 { |
|
852 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: Error. Index (%d) out of bounds.", itemIndex); |
|
853 User::Leave( KErrArgument ); |
|
854 } |
|
855 } |
|
856 else |
|
857 { |
|
858 itemIndex = iTester->GetIndexOfMediaWithNameL( itemIndexOrName ); |
|
859 } |
|
860 |
|
861 if( itemIndex == KErrNotFound ) |
|
862 { |
|
914 User::Leave( KErrArgument ); |
863 User::Leave( KErrArgument ); |
915 } |
864 } |
916 |
865 |
866 // Attribute to be checked |
|
867 |
|
917 TInt mpxAttributeMappingId(0); |
868 TInt mpxAttributeMappingId(0); |
918 User::LeaveIfError( aItem.GetNextInt( mpxAttributeMappingId ) ); |
869 User::LeaveIfError( aItem.GetNextInt( mpxAttributeMappingId ) ); |
919 |
870 |
871 // It's type. |
|
872 |
|
920 TVcxTestMediaAttributeType type; |
873 TVcxTestMediaAttributeType type; |
921 TMPXAttributeData mpxMediaAttribute; |
874 TMPXAttributeData mpxMediaAttribute; |
922 User::LeaveIfError( MapMpxMediaAttribute( |
875 User::LeaveIfError( MapMpxMediaAttribute( |
923 static_cast<TVcxTestMediaAttributeIdMapping>(mpxAttributeMappingId), |
876 static_cast<TVcxTestMediaAttributeIdMapping>(mpxAttributeMappingId), |
924 mpxMediaAttribute, type ) ); |
877 mpxMediaAttribute, type ) ); |
925 |
878 |
926 |
879 // Get the media to be checked. |
927 CMPXMedia* media( NULL ); |
880 |
881 CMPXMedia* media( NULL ); |
|
928 TRAP( err, media = iTester->GetMediaL( drive, itemIndex ) ); |
882 TRAP( err, media = iTester->GetMediaL( drive, itemIndex ) ); |
929 |
883 |
930 // If attribute is not supported, fetch full media details. |
884 // If attribute is not supported, fetch full media details. |
931 if( media && !media->IsSupported( mpxMediaAttribute ) ) |
885 if( media && !media->IsSupported( mpxMediaAttribute ) ) |
932 { |
886 { |
943 } |
897 } |
944 |
898 |
945 if( err != KErrNone ) |
899 if( err != KErrNone ) |
946 { |
900 { |
947 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMediaDetailL <----------"); |
901 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMediaDetailL <----------"); |
948 return VCXMVTEST_ERR( err ); |
902 return err; |
949 } |
903 } |
950 |
904 |
951 if( !media->IsSupported( mpxMediaAttribute ) ) |
905 if( !media->IsSupported( mpxMediaAttribute ) ) |
952 { |
906 { |
953 VCXLOGLO3("CVCXMyVideosCollectionPluginTest:: error: iAttributeId: %d, iContentId: %d is not supported.", |
907 VCXLOGLO3("CVCXMyVideosCollectionPluginTest:: error: iAttributeId: %d, iContentId: %d is not supported.", |
954 mpxMediaAttribute.iAttributeId == 0, mpxMediaAttribute.iContentId); |
908 mpxMediaAttribute.iAttributeId == 0, mpxMediaAttribute.iContentId); |
955 |
909 |
956 iTester->PrintMPXMediaL( *media, ETrue ); |
910 iTester->PrintMPXMediaL( *media, ETrue ); |
957 |
911 |
958 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMediaDetailL <---------"); |
912 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMediaDetailL <---------"); |
959 return VCXMVTEST_ERR( KErrNotSupported ); |
913 return KErrNotSupported; |
960 } |
914 } |
961 |
915 |
962 if( type == EVcxTestMediaAttributeTypeString ) |
916 if( type == EVcxTestMediaAttributeTypeString ) |
963 { |
917 { |
964 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: Getting attribute of type text"); |
918 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: Getting attribute of type text"); |
1244 { |
1198 { |
1245 TRAP_IGNORE( iTester->PrintMediasL( NULL, EFalse, _L("Videos") ) ); |
1199 TRAP_IGNORE( iTester->PrintMediasL( NULL, EFalse, _L("Videos") ) ); |
1246 } |
1200 } |
1247 |
1201 |
1248 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMediaDetailL <----------"); |
1202 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMediaDetailL <----------"); |
1249 return VCXMVTEST_ERR( err ); |
1203 return err; |
1250 } |
1204 } |
1251 |
1205 |
1252 // ----------------------------------------------------------------------------- |
1206 // ----------------------------------------------------------------------------- |
1253 // CVCXMyVideosCollectionPluginTest::SetItemDetailsL |
1207 // CVCXMyVideosCollectionPluginTest::SetItemDetailsL |
1254 // ----------------------------------------------------------------------------- |
1208 // ----------------------------------------------------------------------------- |
1444 iMpxMedia->SetTObjectValueL<TUint32>( mpxMediaAttribute, value ); |
1398 iMpxMedia->SetTObjectValueL<TUint32>( mpxMediaAttribute, value ); |
1445 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: Set to %d", value); |
1399 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: Set to %d", value); |
1446 } |
1400 } |
1447 |
1401 |
1448 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetMediaDetailL <----------"); |
1402 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetMediaDetailL <----------"); |
1449 return VCXMVTEST_ERR( err ); |
1403 return err; |
1450 } |
1404 } |
1451 |
1405 |
1452 // ----------------------------------------------------------------------------- |
1406 |
1453 // CIptvMyVideosApiTest::CheckMediaCountL |
1407 // ----------------------------------------------------------------------------- |
1408 // CVcxMyVideosApiTest::CheckAlbumCountL |
|
1409 // ----------------------------------------------------------------------------- |
|
1410 // |
|
1411 TInt CVCXMyVideosCollectionPluginTest::CheckAlbumCountL( CStifItemParser& aItem ) |
|
1412 { |
|
1413 |
|
1414 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CheckAlbumCountL ---------->"); |
|
1415 // Print to UI |
|
1416 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
1417 _LIT( KWhere, "In CheckAlbumCountL" ); |
|
1418 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
1419 // Print to log file |
|
1420 iLog->Log( KWhere ); |
|
1421 |
|
1422 WaitForRefreshL( EFalse ); // Wait for possible refresh to finish. |
|
1423 |
|
1424 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
1425 |
|
1426 TInt expectedCount(0); |
|
1427 User::LeaveIfError(aItem.GetNextInt(expectedCount)); |
|
1428 |
|
1429 // File check |
|
1430 TInt videoCount = iTester->GetMediaCount(); |
|
1431 |
|
1432 // attribute check that they are in allowed values |
|
1433 |
|
1434 int err(KErrNone); |
|
1435 int actualCount(0); |
|
1436 |
|
1437 for( TInt i = videoCount-1; i >= 0; i-- ) |
|
1438 { |
|
1439 CMPXMedia* media = iTester->GetMediaL( -1, i ); |
|
1440 |
|
1441 // Skip categories with empty names, they are for photos. |
|
1442 if( !media->IsSupported( KMPXMediaGeneralTitle ) ) |
|
1443 { |
|
1444 continue; |
|
1445 } |
|
1446 |
|
1447 TMPXItemId itemId = *( media->Value<TMPXItemId>( KMPXMediaGeneralId ) ); |
|
1448 |
|
1449 if(itemId.iId2 == KVcxMvcMediaTypeAlbum) |
|
1450 { |
|
1451 actualCount++; |
|
1452 } |
|
1453 } |
|
1454 |
|
1455 if ( actualCount != expectedCount ) |
|
1456 { |
|
1457 VCXLOGLO2("CVCXMyVideosCollectionPluginTest: Error! Count of albums is wrong: %d", actualCount ); |
|
1458 err = KErrCorrupt; |
|
1459 } |
|
1460 |
|
1461 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckAlbumCountL <----------"); |
|
1462 return err; |
|
1463 } |
|
1464 |
|
1465 // ----------------------------------------------------------------------------- |
|
1466 // CVcxMyVideosApiTest::CheckMediaCountL |
|
1454 // ----------------------------------------------------------------------------- |
1467 // ----------------------------------------------------------------------------- |
1455 // |
1468 // |
1456 TInt CVCXMyVideosCollectionPluginTest::CheckMediaCountL( CStifItemParser& aItem ) |
1469 TInt CVCXMyVideosCollectionPluginTest::CheckMediaCountL( CStifItemParser& aItem ) |
1457 { |
1470 { |
1458 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CheckMediaCountL ---------->"); |
1471 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CheckMediaCountL ---------->"); |
1479 { |
1492 { |
1480 iTester->PrintMediasL( NULL, EFalse, _L("Videos") ); |
1493 iTester->PrintMediasL( NULL, EFalse, _L("Videos") ); |
1481 } |
1494 } |
1482 |
1495 |
1483 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMediaCountL <----------"); |
1496 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMediaCountL <----------"); |
1484 return VCXMVTEST_ERR( err ); |
1497 return err; |
1485 } |
1498 } |
1486 |
1499 |
1487 // ----------------------------------------------------------------------------- |
1500 // ----------------------------------------------------------------------------- |
1488 // CIptvMyVideosApiTest::CheckMinimumMediaCountL |
1501 // CVcxMyVideosApiTest::CheckMinimumMediaCountL |
1489 // ----------------------------------------------------------------------------- |
1502 // ----------------------------------------------------------------------------- |
1490 // |
1503 // |
1491 TInt CVCXMyVideosCollectionPluginTest::CheckMinimumMediaCountL( CStifItemParser& aItem ) |
1504 TInt CVCXMyVideosCollectionPluginTest::CheckMinimumMediaCountL( CStifItemParser& aItem ) |
1492 { |
1505 { |
1493 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CheckMinimumMediaCountL ---------->"); |
1506 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CheckMinimumMediaCountL ---------->"); |
1511 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: drive: %d", drive); |
1524 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: drive: %d", drive); |
1512 |
1525 |
1513 TRAPD( err, CheckMediasL( expectedCount, drive, -1 ) ); |
1526 TRAPD( err, CheckMediasL( expectedCount, drive, -1 ) ); |
1514 |
1527 |
1515 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMinimumMediaCountL <----------"); |
1528 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMinimumMediaCountL <----------"); |
1516 return VCXMVTEST_ERR( err ); |
1529 return err; |
1517 } |
1530 } |
1518 |
1531 |
1519 // ----------------------------------------------------------------------------- |
1532 // ----------------------------------------------------------------------------- |
1520 // CIptvMyVideosApiTest::CheckMaximumMediaCountL |
1533 // CVcxMyVideosApiTest::CheckMaximumMediaCountL |
1521 // ----------------------------------------------------------------------------- |
1534 // ----------------------------------------------------------------------------- |
1522 // |
1535 // |
1523 TInt CVCXMyVideosCollectionPluginTest::CheckMaximumMediaCountL( CStifItemParser& aItem ) |
1536 TInt CVCXMyVideosCollectionPluginTest::CheckMaximumMediaCountL( CStifItemParser& aItem ) |
1524 { |
1537 { |
1525 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CheckMaximumMediaCountL ---------->"); |
1538 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CheckMaximumMediaCountL ---------->"); |
1543 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: drive: %d", drive); |
1556 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: drive: %d", drive); |
1544 |
1557 |
1545 TRAPD( err, CheckMediasL( expectedCount, drive, 1 ) ); |
1558 TRAPD( err, CheckMediasL( expectedCount, drive, 1 ) ); |
1546 |
1559 |
1547 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMaximumMediaCountL <----------"); |
1560 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMaximumMediaCountL <----------"); |
1548 return VCXMVTEST_ERR( err ); |
1561 return err; |
1549 } |
|
1550 |
|
1551 // ----------------------------------------------------------------------------- |
|
1552 // CIptvMyVideosApiTest::CheckDownloadCountL |
|
1553 // ----------------------------------------------------------------------------- |
|
1554 // |
|
1555 TInt CVCXMyVideosCollectionPluginTest::CheckDownloadCountL( CStifItemParser& aItem ) |
|
1556 { |
|
1557 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CheckDownloadCountL ---------->"); |
|
1558 // Print to UI |
|
1559 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
1560 _LIT( KWhere, "In CheckMediaCountL" ); |
|
1561 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
1562 // Print to log file |
|
1563 iLog->Log( KWhere ); |
|
1564 |
|
1565 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
1566 |
|
1567 WaitForRefreshL( EFalse ); // Wait for possible refresh to finish. |
|
1568 |
|
1569 TInt expectedCount(0); |
|
1570 User::LeaveIfError(aItem.GetNextInt(expectedCount)); |
|
1571 |
|
1572 TInt err( KErrNotReady ); |
|
1573 if( iTester ) |
|
1574 { |
|
1575 err = KErrNone; |
|
1576 if( iTester->GetDownloadWatcher()->GetDownloadCount() != expectedCount ) |
|
1577 { |
|
1578 err = KErrCorrupt; |
|
1579 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: ERROR: Not expected count of downloads!"); |
|
1580 } |
|
1581 } |
|
1582 |
|
1583 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckDownloadCountL <----------"); |
|
1584 return VCXMVTEST_ERR( err ); |
|
1585 } |
1562 } |
1586 |
1563 |
1587 // ----------------------------------------------------------------------------- |
1564 // ----------------------------------------------------------------------------- |
1588 // CVCXMyVideosCollectionPluginTest::CreateCopyOfMediaL |
1565 // CVCXMyVideosCollectionPluginTest::CreateCopyOfMediaL |
1589 // ----------------------------------------------------------------------------- |
1566 // ----------------------------------------------------------------------------- |
1620 |
1597 |
1621 if( iTester->GetMediaCount() <= 0 ) |
1598 if( iTester->GetMediaCount() <= 0 ) |
1622 { |
1599 { |
1623 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: ERROR: There's zero medias!"); |
1600 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: ERROR: There's zero medias!"); |
1624 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CreateCopyOfMediaL <----------"); |
1601 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CreateCopyOfMediaL <----------"); |
1625 return VCXMVTEST_ERR( KErrArgument ); |
1602 return KErrArgument; |
1626 } |
1603 } |
1627 |
1604 |
1628 if( iMpxMedia ) |
1605 if( iMpxMedia ) |
1629 { |
1606 { |
1630 delete iMpxMedia; |
1607 delete iMpxMedia; |
1677 { |
1654 { |
1678 VCXLOGLO2("<<<CVCXMyVideosCollectionPluginTest:: err: %d", err); |
1655 VCXLOGLO2("<<<CVCXMyVideosCollectionPluginTest:: err: %d", err); |
1679 } |
1656 } |
1680 |
1657 |
1681 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CreateCopyOfMediaL <----------"); |
1658 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CreateCopyOfMediaL <----------"); |
1682 return VCXMVTEST_ERR( err ); |
1659 return err; |
1683 } |
1660 } |
1684 |
1661 |
1685 // ----------------------------------------------------------------------------- |
1662 // ----------------------------------------------------------------------------- |
1686 // CVCXMyVideosCollectionPluginTest::CreateEmptyMediaL |
1663 // CVCXMyVideosCollectionPluginTest::CreateEmptyMediaL |
1687 // ----------------------------------------------------------------------------- |
1664 // ----------------------------------------------------------------------------- |
1783 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: Open plugin binary failed: %d", err2); |
1760 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: Open plugin binary failed: %d", err2); |
1784 } |
1761 } |
1785 } |
1762 } |
1786 #endif // __WINSCW__ |
1763 #endif // __WINSCW__ |
1787 |
1764 |
1788 |
|
1789 if( err != KErrNone ) |
1765 if( err != KErrNone ) |
1790 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
1766 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
1791 |
1767 |
1792 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::AddMediaL <----------"); |
1768 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::AddMediaL <----------"); |
1793 return VCXMVTEST_ERR( err ); |
1769 return err; |
1794 } |
1770 } |
1795 |
1771 |
1796 // ----------------------------------------------------------------------------- |
1772 // ----------------------------------------------------------------------------- |
1797 // CVCXMyVideosCollectionPluginTest::SetMediaL |
1773 // CVCXMyVideosCollectionPluginTest::SetMediaL |
1798 // ----------------------------------------------------------------------------- |
1774 // ----------------------------------------------------------------------------- |
1830 |
1806 |
1831 if( err != KErrNone ) |
1807 if( err != KErrNone ) |
1832 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
1808 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
1833 |
1809 |
1834 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetMediaL <----------"); |
1810 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetMediaL <----------"); |
1835 return VCXMVTEST_ERR( err ); |
1811 return err; |
1836 } |
1812 } |
1837 |
1813 |
1838 // ----------------------------------------------------------------------------- |
1814 // ----------------------------------------------------------------------------- |
1839 // CVCXMyVideosCollectionPluginTest::OutsideMediaUpdateL |
1815 // CVCXMyVideosCollectionPluginTest::OutsideMediaUpdateL |
1840 // ----------------------------------------------------------------------------- |
1816 // ----------------------------------------------------------------------------- |
1863 |
1839 |
1864 if( err != KErrNone ) |
1840 if( err != KErrNone ) |
1865 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
1841 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
1866 |
1842 |
1867 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::OutsideMediaUpdateL <----------"); |
1843 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::OutsideMediaUpdateL <----------"); |
1868 return VCXMVTEST_ERR( err ); |
1844 return err; |
1869 } |
1845 } |
1870 |
1846 |
1871 // ----------------------------------------------------------------------------- |
1847 // ----------------------------------------------------------------------------- |
1872 // CIptvMyVideosApiTest::RemoveMediaL |
1848 // CVcxMyVideosApiTest::RemoveMediaL |
1873 // ----------------------------------------------------------------------------- |
1849 // ----------------------------------------------------------------------------- |
1874 // |
1850 // |
1875 TInt CVCXMyVideosCollectionPluginTest::RemoveMediaL( CStifItemParser& aItem ) |
1851 TInt CVCXMyVideosCollectionPluginTest::RemoveMediaL( CStifItemParser& aItem ) |
1876 { |
1852 { |
1877 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::RemoveMediaL ---------->"); |
1853 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::RemoveMediaL ---------->"); |
1905 { |
1881 { |
1906 TRAP( err, iTester->RemoveMediaL( drive, index, syncCall ) ); |
1882 TRAP( err, iTester->RemoveMediaL( drive, index, syncCall ) ); |
1907 } |
1883 } |
1908 |
1884 |
1909 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::RemoveMediaL <----------"); |
1885 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::RemoveMediaL <----------"); |
1910 return VCXMVTEST_ERR( err ); |
1886 return err; |
1911 } |
1887 } |
1912 |
1888 |
1913 // ----------------------------------------------------------------------------- |
1889 // ----------------------------------------------------------------------------- |
1914 // CIptvMyVideosApiTest::RemoveAllMediaL |
1890 // CVcxMyVideosApiTest::RemoveAllMediaL |
1915 // ----------------------------------------------------------------------------- |
1891 // ----------------------------------------------------------------------------- |
1916 // |
1892 // |
1917 TInt CVCXMyVideosCollectionPluginTest::RemoveAllMediaL( CStifItemParser& aItem ) |
1893 TInt CVCXMyVideosCollectionPluginTest::RemoveAllMediaL( CStifItemParser& aItem ) |
1918 { |
1894 { |
1919 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::RemoveAllMediaL ---------->"); |
1895 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::RemoveAllMediaL ---------->"); |
1929 iLastReceivedMessage = -1; |
1905 iLastReceivedMessage = -1; |
1930 |
1906 |
1931 TRAP_IGNORE( iTester->EnsureMediaFilesAreNotInUseL() ); |
1907 TRAP_IGNORE( iTester->EnsureMediaFilesAreNotInUseL() ); |
1932 |
1908 |
1933 TInt error( KErrNone ); |
1909 TInt error( KErrNone ); |
1934 |
|
1935 TInt mediaCount = iTester->GetMediaCount(); |
|
1936 |
|
1937 // Store info about the mpx items. |
|
1938 RArray<TUint> mpxIds; |
|
1939 CleanupClosePushL( mpxIds ); |
|
1940 |
|
1941 RArray<TUint> downloadIds; |
|
1942 CleanupClosePushL( downloadIds ); |
|
1943 |
|
1944 RArray<TInt> downloadStates; |
|
1945 CleanupClosePushL( downloadStates ); |
|
1946 |
|
1947 RPointerArray<HBufC> filePaths; |
|
1948 CleanupResetAndDestroyPushL( filePaths ); |
|
1949 |
|
1950 // Get ids and other needed details. |
|
1951 |
|
1952 for( TInt i=0; i<mediaCount; i++ ) |
|
1953 { |
|
1954 CMPXMedia* media( NULL ); |
|
1955 VCXLOGLO2("CVCXMyVideosCollectionPluginTest::RemoveAllMediaL: GetMedia %d", i); |
|
1956 TRAP( error, media = iTester->GetMediaL( -1, i ) ); |
|
1957 |
|
1958 if( error != KErrNone ) |
|
1959 { |
|
1960 CleanupStack::PopAndDestroy( &filePaths ); |
|
1961 CleanupStack::PopAndDestroy( &downloadStates ); |
|
1962 CleanupStack::PopAndDestroy( &downloadIds ); |
|
1963 CleanupStack::PopAndDestroy( &mpxIds ); |
|
1964 |
|
1965 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::RemoveAllMediaL <----------"); |
|
1966 return VCXMVTEST_ERR( error ); |
|
1967 } |
|
1968 |
|
1969 if( media && media->IsSupported( KMPXMediaGeneralUri ) ) |
|
1970 { |
|
1971 TUint32 downloadId = 0; |
|
1972 if( media->IsSupported( KVcxMediaMyVideosDownloadId ) ) |
|
1973 { |
|
1974 downloadId = media->ValueTObjectL<TUint32>( KVcxMediaMyVideosDownloadId ); |
|
1975 } |
|
1976 |
|
1977 TInt state = -1; |
|
1978 if( media->IsSupported( KVcxMediaMyVideosDownloadState ) ) |
|
1979 { |
|
1980 state = media->ValueTObjectL<TUint8>( KVcxMediaMyVideosDownloadState ); |
|
1981 } |
|
1982 |
|
1983 HBufC* path( NULL ); |
|
1984 if( media->IsSupported( KMPXMediaGeneralUri ) ) |
|
1985 { |
|
1986 path = media->ValueText( KMPXMediaGeneralUri ).AllocL(); |
|
1987 } |
|
1988 else |
|
1989 { |
|
1990 path = HBufC::NewL( 32 ); |
|
1991 } |
|
1992 |
|
1993 TMPXItemId itemId = *(media->Value<TMPXItemId>( KMPXMediaGeneralId )); |
|
1994 |
|
1995 filePaths.Append( path ); |
|
1996 downloadIds.Append( downloadId ); |
|
1997 downloadStates.Append( state ); |
|
1998 mpxIds.Append( itemId.iId1 ); |
|
1999 } |
|
2000 } |
|
2001 |
|
2002 // Cancel downloads. |
|
2003 |
|
2004 for( TInt i = mpxIds.Count()-1; i >= 0; i-- ) |
|
2005 { |
|
2006 if( downloadIds[i] != 0 || downloadStates[i] != -1 ) |
|
2007 { |
|
2008 // Cancel the download. |
|
2009 RArray<TInt> messages; |
|
2010 if( BaflUtils::FileExists( iFs, filePaths[i]->Des() ) ) |
|
2011 { |
|
2012 messages.Append( KVCXMYVideosTestMessageMpxItemDeleted ); |
|
2013 } |
|
2014 messages.Append( KVCXMYVideosTestMessageCommandComplete ); |
|
2015 messages.Append( KVCXMYVideosTestMessageCollectionOpened ); |
|
2016 TRAP( error, iTester->CancelDownloadL( mpxIds[i], downloadIds[i], filePaths[i]->Des(), EFalse ) ); |
|
2017 if( error == KErrNone ) |
|
2018 { |
|
2019 TRAP( error, WaitForMessagesL( ETrue, messages, 30, ETrue ) ); |
|
2020 } |
|
2021 messages.Reset(); |
|
2022 // Error occured, lets hope deleting works. |
|
2023 if( error != KErrNone ) |
|
2024 { |
|
2025 downloadIds[i] = 0; |
|
2026 downloadStates[i] = -1; |
|
2027 } |
|
2028 } |
|
2029 } |
|
2030 |
1910 |
2031 // Get current list of medias. |
1911 // Get current list of medias. |
2032 |
1912 |
2033 CMPXMediaArray* medias( NULL ); |
1913 CMPXMediaArray* medias( NULL ); |
2034 medias = iTester->SelectMediasL( -1, 0, iTester->GetMediaCount() ); |
1914 medias = iTester->SelectMediasL( -1, 0, iTester->GetMediaCount() ); |
2080 |
1960 |
2081 CleanupStack::PopAndDestroy( medias ); |
1961 CleanupStack::PopAndDestroy( medias ); |
2082 |
1962 |
2083 iLastReceivedMessage = -1; |
1963 iLastReceivedMessage = -1; |
2084 |
1964 |
2085 CleanupStack::PopAndDestroy( &filePaths ); |
|
2086 CleanupStack::PopAndDestroy( &downloadStates ); |
|
2087 CleanupStack::PopAndDestroy( &downloadIds ); |
|
2088 CleanupStack::PopAndDestroy( &mpxIds ); |
|
2089 |
|
2090 if( iTester && iTester->GetDownloadWatcher() ) |
|
2091 { |
|
2092 iTester->GetDownloadWatcher()->Reset(); |
|
2093 } |
|
2094 |
|
2095 if( iTester->GetMediaCount() > 0 ) |
1965 if( iTester->GetMediaCount() > 0 ) |
2096 { |
1966 { |
2097 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: All medias could not be removed."); |
1967 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: All medias could not be removed."); |
2098 error = KErrCorrupt; |
1968 error = KErrCorrupt; |
2099 } |
1969 } |
2100 |
1970 |
2101 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::RemoveAllMediaL <----------"); |
1971 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::RemoveAllMediaL <----------"); |
2102 return VCXMVTEST_ERR( error ); |
1972 return error; |
2103 } |
1973 } |
2104 |
1974 |
2105 // ----------------------------------------------------------------------------- |
1975 // ----------------------------------------------------------------------------- |
2106 // CIptvMyVideosApiTest::MoveMediaL |
1976 // CVcxMyVideosApiTest::MoveMediaL |
2107 // ----------------------------------------------------------------------------- |
1977 // ----------------------------------------------------------------------------- |
2108 // |
1978 // |
2109 TInt CVCXMyVideosCollectionPluginTest::MoveMediaL( CStifItemParser& aItem ) |
1979 TInt CVCXMyVideosCollectionPluginTest::MoveMediaL( CStifItemParser& aItem ) |
2110 { |
1980 { |
2111 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::MoveMediaL ---------->"); |
1981 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::MoveMediaL ---------->"); |
2139 |
2009 |
2140 TInt err( KErrNotReady ); |
2010 TInt err( KErrNotReady ); |
2141 if( iTester ) |
2011 if( iTester ) |
2142 { |
2012 { |
2143 TRAP( err, iTester->EnsureMediaFilesAreNotInUseL() ); |
2013 TRAP( err, iTester->EnsureMediaFilesAreNotInUseL() ); |
2144 err = VCXMVTEST_ERR( err ); |
2014 err = err; |
2145 if( err == KErrNone ) |
2015 if( err == KErrNone ) |
2146 { |
2016 { |
2147 TRAP( err, iTester->MoveMediasL( sourceDrive, index, index+1, destDrive, syncCall ) ); |
2017 TRAP( err, iTester->MoveMediasL( sourceDrive, index, index+1, destDrive, syncCall ) ); |
2148 } |
2018 } |
2149 } |
2019 } |
2150 |
2020 |
2151 if( err != KErrNone ) |
2021 if( err != KErrNone ) |
2152 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2022 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2153 |
2023 |
2154 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::MoveMediaL <----------"); |
2024 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::MoveMediaL <----------"); |
2155 return VCXMVTEST_ERR( err ); |
2025 return err; |
2156 } |
2026 } |
2157 |
2027 |
2158 // ----------------------------------------------------------------------------- |
2028 // ----------------------------------------------------------------------------- |
2159 // CIptvMyVideosApiTest::MoveMediasL |
2029 // CVcxMyVideosApiTest::MoveMediasL |
2160 // ----------------------------------------------------------------------------- |
2030 // ----------------------------------------------------------------------------- |
2161 // |
2031 // |
2162 TInt CVCXMyVideosCollectionPluginTest::MoveMediasL( CStifItemParser& aItem ) |
2032 TInt CVCXMyVideosCollectionPluginTest::MoveMediasL( CStifItemParser& aItem ) |
2163 { |
2033 { |
2164 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::MoveMediasL ---------->"); |
2034 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::MoveMediasL ---------->"); |
2195 |
2065 |
2196 TInt err( KErrNotReady ); |
2066 TInt err( KErrNotReady ); |
2197 if( iTester ) |
2067 if( iTester ) |
2198 { |
2068 { |
2199 TRAP( err, iTester->EnsureMediaFilesAreNotInUseL() ); |
2069 TRAP( err, iTester->EnsureMediaFilesAreNotInUseL() ); |
2200 err = VCXMVTEST_ERR( err ); |
2070 err = err; |
2201 if( err == KErrNone ) |
2071 if( err == KErrNone ) |
2202 { |
2072 { |
2203 TRAP( err, iTester->MoveMediasL( sourceDrive, index, endIndex, destDrive, syncCall ) ); |
2073 TRAP( err, iTester->MoveMediasL( sourceDrive, index, endIndex, destDrive, syncCall ) ); |
2204 } |
2074 } |
2205 } |
2075 } |
2206 |
2076 |
2207 if( err != KErrNone ) |
2077 if( err != KErrNone ) |
2208 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2078 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2209 |
2079 |
2210 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::MoveMediasL <----------"); |
2080 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::MoveMediasL <----------"); |
2211 return VCXMVTEST_ERR( err ); |
2081 return err; |
2212 } |
2082 } |
2213 |
2083 |
2214 // ----------------------------------------------------------------------------- |
2084 // ----------------------------------------------------------------------------- |
2215 // CIptvMyVideosApiTest::CancelMoveL |
2085 // CVcxMyVideosApiTest::CancelMoveL |
2216 // ----------------------------------------------------------------------------- |
2086 // ----------------------------------------------------------------------------- |
2217 // |
2087 // |
2218 TInt CVCXMyVideosCollectionPluginTest::CancelMoveL( CStifItemParser& aItem ) |
2088 TInt CVCXMyVideosCollectionPluginTest::CancelMoveL( CStifItemParser& aItem ) |
2219 { |
2089 { |
2220 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CancelMoveL ---------->"); |
2090 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CancelMoveL ---------->"); |
2245 |
2115 |
2246 if( err != KErrNone ) |
2116 if( err != KErrNone ) |
2247 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2117 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2248 |
2118 |
2249 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CancelMoveL <----------"); |
2119 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CancelMoveL <----------"); |
2250 return VCXMVTEST_ERR( err ); |
2120 return err; |
2251 } |
2121 } |
2252 |
2122 |
2253 // ----------------------------------------------------------------------------- |
2123 // ----------------------------------------------------------------------------- |
2254 // CIptvMyVideosApiTest::CopyMediaL |
2124 // CVcxMyVideosApiTest::CopyMediaL |
2255 // ----------------------------------------------------------------------------- |
2125 // ----------------------------------------------------------------------------- |
2256 // |
2126 // |
2257 TInt CVCXMyVideosCollectionPluginTest::CopyMediaL( CStifItemParser& aItem ) |
2127 TInt CVCXMyVideosCollectionPluginTest::CopyMediaL( CStifItemParser& aItem ) |
2258 { |
2128 { |
2259 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CopyMediaL ---------->"); |
2129 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CopyMediaL ---------->"); |
2293 |
2163 |
2294 if( err != KErrNone ) |
2164 if( err != KErrNone ) |
2295 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2165 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2296 |
2166 |
2297 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CopyMediaL <----------"); |
2167 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CopyMediaL <----------"); |
2298 return VCXMVTEST_ERR( err ); |
2168 return err; |
2299 } |
2169 } |
2300 |
2170 |
2301 // ----------------------------------------------------------------------------- |
2171 // ----------------------------------------------------------------------------- |
2302 // CIptvMyVideosApiTest::CopyMediasL |
2172 // CVcxMyVideosApiTest::CopyMediasL |
2303 // ----------------------------------------------------------------------------- |
2173 // ----------------------------------------------------------------------------- |
2304 // |
2174 // |
2305 TInt CVCXMyVideosCollectionPluginTest::CopyMediasL( CStifItemParser& aItem ) |
2175 TInt CVCXMyVideosCollectionPluginTest::CopyMediasL( CStifItemParser& aItem ) |
2306 { |
2176 { |
2307 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CopyMediasL ---------->"); |
2177 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CopyMediasL ---------->"); |
2344 |
2214 |
2345 if( err != KErrNone ) |
2215 if( err != KErrNone ) |
2346 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2216 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2347 |
2217 |
2348 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CopyMediasL <----------"); |
2218 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CopyMediasL <----------"); |
2349 return VCXMVTEST_ERR( err ); |
2219 return err; |
2350 } |
2220 } |
2351 |
2221 |
2352 // ----------------------------------------------------------------------------- |
2222 // ----------------------------------------------------------------------------- |
2353 // CIptvMyVideosApiTest::CancelCopyL |
2223 // CVcxMyVideosApiTest::CancelCopyL |
2354 // ----------------------------------------------------------------------------- |
2224 // ----------------------------------------------------------------------------- |
2355 // |
2225 // |
2356 TInt CVCXMyVideosCollectionPluginTest::CancelCopyL( CStifItemParser& aItem ) |
2226 TInt CVCXMyVideosCollectionPluginTest::CancelCopyL( CStifItemParser& aItem ) |
2357 { |
2227 { |
2358 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CancelCopyL ---------->"); |
2228 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CancelCopyL ---------->"); |
2383 |
2253 |
2384 if( err != KErrNone ) |
2254 if( err != KErrNone ) |
2385 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2255 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2386 |
2256 |
2387 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CancelCopyL <----------"); |
2257 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CancelCopyL <----------"); |
2388 return VCXMVTEST_ERR( err ); |
2258 return err; |
2389 } |
2259 } |
2390 |
2260 |
2391 // ----------------------------------------------------------------------------- |
2261 // ----------------------------------------------------------------------------- |
2392 // CIptvMyVideosApiTest::DeleteMediaL |
2262 // CVcxMyVideosApiTest::DeleteMediaL |
2393 // ----------------------------------------------------------------------------- |
2263 // ----------------------------------------------------------------------------- |
2394 // |
2264 // |
2395 TInt CVCXMyVideosCollectionPluginTest::DeleteMediaL( CStifItemParser& aItem ) |
2265 TInt CVCXMyVideosCollectionPluginTest::DeleteMediaL( CStifItemParser& aItem ) |
2396 { |
2266 { |
2397 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DeleteMediaL ---------->"); |
2267 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DeleteMediaL ---------->"); |
2422 |
2292 |
2423 TInt err( KErrNotReady ); |
2293 TInt err( KErrNotReady ); |
2424 if( iTester ) |
2294 if( iTester ) |
2425 { |
2295 { |
2426 TRAP( err, iTester->EnsureMediaFilesAreNotInUseL() ); |
2296 TRAP( err, iTester->EnsureMediaFilesAreNotInUseL() ); |
2427 err = VCXMVTEST_ERR( err ); |
2297 err = err; |
2428 if( err == KErrNone ) |
2298 if( err == KErrNone ) |
2429 { |
2299 { |
2430 TRAP( err, iTester->DeleteMediasL( sourceDrive, index, index+1, syncCall ) ); |
2300 TRAP( err, iTester->DeleteMediasL( sourceDrive, index, index+1, syncCall ) ); |
2431 } |
2301 } |
2432 } |
2302 } |
2433 |
2303 |
2434 if( err != KErrNone ) |
2304 if( err != KErrNone ) |
2435 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2305 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2436 |
2306 |
2437 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DeleteMediaL <----------"); |
2307 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DeleteMediaL <----------"); |
2438 return VCXMVTEST_ERR( err ); |
2308 return err; |
2439 } |
2309 } |
2440 |
2310 |
2441 // ----------------------------------------------------------------------------- |
2311 // ----------------------------------------------------------------------------- |
2442 // CIptvMyVideosApiTest::DeleteMediasL |
2312 // CVcxMyVideosApiTest::DeleteMediasL |
2443 // ----------------------------------------------------------------------------- |
2313 // ----------------------------------------------------------------------------- |
2444 // |
2314 // |
2445 TInt CVCXMyVideosCollectionPluginTest::DeleteMediasL( CStifItemParser& aItem ) |
2315 TInt CVCXMyVideosCollectionPluginTest::DeleteMediasL( CStifItemParser& aItem ) |
2446 { |
2316 { |
2447 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DeleteMediasL ---------->"); |
2317 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DeleteMediasL ---------->"); |
2475 |
2345 |
2476 TInt err( KErrNotReady ); |
2346 TInt err( KErrNotReady ); |
2477 if( iTester ) |
2347 if( iTester ) |
2478 { |
2348 { |
2479 TRAP( err, iTester->EnsureMediaFilesAreNotInUseL() ); |
2349 TRAP( err, iTester->EnsureMediaFilesAreNotInUseL() ); |
2480 err = VCXMVTEST_ERR( err ); |
2350 err = err; |
2481 if( err == KErrNone ) |
2351 if( err == KErrNone ) |
2482 { |
2352 { |
2483 TRAP( err, iTester->DeleteMediasL( sourceDrive, index, endIndex, syncCall ) ); |
2353 TRAP( err, iTester->DeleteMediasL( sourceDrive, index, endIndex, syncCall ) ); |
2484 } |
2354 } |
2485 } |
2355 } |
2488 { |
2358 { |
2489 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2359 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2490 } |
2360 } |
2491 |
2361 |
2492 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DeleteMediasL <----------"); |
2362 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DeleteMediasL <----------"); |
2493 return VCXMVTEST_ERR( err ); |
2363 return err; |
2494 } |
2364 } |
2495 |
2365 |
2496 // ----------------------------------------------------------------------------- |
2366 // ----------------------------------------------------------------------------- |
2497 // CIptvMyVideosApiTest::CancelDeleteL |
2367 // CVcxMyVideosApiTest::CancelDeleteL |
2498 // ----------------------------------------------------------------------------- |
2368 // ----------------------------------------------------------------------------- |
2499 // |
2369 // |
2500 TInt CVCXMyVideosCollectionPluginTest::CancelDeleteL( CStifItemParser& aItem ) |
2370 TInt CVCXMyVideosCollectionPluginTest::CancelDeleteL( CStifItemParser& aItem ) |
2501 { |
2371 { |
2502 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CancelDeleteL ---------->"); |
2372 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CancelDeleteL ---------->"); |
2527 |
2397 |
2528 if( err != KErrNone ) |
2398 if( err != KErrNone ) |
2529 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2399 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2530 |
2400 |
2531 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CancelDeleteL <----------"); |
2401 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CancelDeleteL <----------"); |
2532 return VCXMVTEST_ERR( err ); |
2402 return err; |
2533 } |
2403 } |
2534 |
2404 |
2535 //---------------------------------------------------------------------------- |
2405 //---------------------------------------------------------------------------- |
2536 // CIptvMyVideosApiTest::CancelNextOperationL |
2406 // CVcxMyVideosApiTest::CancelNextOperationL |
2537 // ----------------------------------------------------------------------------- |
2407 // ----------------------------------------------------------------------------- |
2538 // |
2408 // |
2539 TInt CVCXMyVideosCollectionPluginTest::CancelNextOperationL( CStifItemParser& /* aItem */ ) |
2409 TInt CVCXMyVideosCollectionPluginTest::CancelNextOperationL( CStifItemParser& /* aItem */ ) |
2540 { |
2410 { |
2541 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CancelNextOperationL ---------->"); |
2411 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CancelNextOperationL ---------->"); |
2551 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CancelNextOperationL <----------"); |
2421 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CancelNextOperationL <----------"); |
2552 return KErrNone; |
2422 return KErrNone; |
2553 } |
2423 } |
2554 |
2424 |
2555 // ----------------------------------------------------------------------------- |
2425 // ----------------------------------------------------------------------------- |
2556 // CIptvMyVideosApiTest::DeleteFileOfMediaL |
2426 // CVcxMyVideosApiTest::DeleteFileOfMediaL |
2557 // ----------------------------------------------------------------------------- |
2427 // ----------------------------------------------------------------------------- |
2558 // |
2428 // |
2559 TInt CVCXMyVideosCollectionPluginTest::DeleteFileOfMediaL( CStifItemParser& aItem ) |
2429 TInt CVCXMyVideosCollectionPluginTest::DeleteFileOfMediaL( CStifItemParser& aItem ) |
2560 { |
2430 { |
2561 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DeleteFileOfMediaL ---------->"); |
2431 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DeleteFileOfMediaL ---------->"); |
2588 { |
2458 { |
2589 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2459 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
2590 } |
2460 } |
2591 |
2461 |
2592 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DeleteFileOfMediaL <----------"); |
2462 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DeleteFileOfMediaL <----------"); |
2593 return VCXMVTEST_ERR( err ); |
2463 return err; |
2594 } |
2464 } |
2595 |
2465 |
2596 // ----------------------------------------------------------------------------- |
2466 // ----------------------------------------------------------------------------- |
2597 // CIptvMyVideosApiTest::DeleteFilesOfAllMediasL |
2467 // CVcxMyVideosApiTest::DeleteFilesOfAllMediasL |
2598 // ----------------------------------------------------------------------------- |
2468 // ----------------------------------------------------------------------------- |
2599 // |
2469 // |
2600 TInt CVCXMyVideosCollectionPluginTest::DeleteFilesOfAllMediasL( CStifItemParser& /* aItem */ ) |
2470 TInt CVCXMyVideosCollectionPluginTest::DeleteFilesOfAllMediasL( CStifItemParser& /* aItem */ ) |
2601 { |
2471 { |
2602 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DeleteFilesOfAllMediasL ---------->"); |
2472 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DeleteFilesOfAllMediasL ---------->"); |
2611 |
2481 |
2612 TInt err( KErrNotReady ); |
2482 TInt err( KErrNotReady ); |
2613 if( iTester ) |
2483 if( iTester ) |
2614 { |
2484 { |
2615 TRAP( err, iTester->EnsureMediaFilesAreNotInUseL() ); |
2485 TRAP( err, iTester->EnsureMediaFilesAreNotInUseL() ); |
2616 err = VCXMVTEST_ERR( err ); |
2486 err = err; |
2617 if( err == KErrNone ) |
2487 if( err == KErrNone ) |
2618 { |
2488 { |
2619 TRAP( err, iTester->DeleteAllMediaFilesL() ); |
2489 TRAP( err, iTester->DeleteAllMediaFilesL() ); |
2620 } |
2490 } |
2621 } |
2491 } |
2622 |
2492 |
2623 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DeleteFilesOfAllMediasL <----------"); |
2493 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DeleteFilesOfAllMediasL <----------"); |
2624 return VCXMVTEST_ERR( err ); |
2494 return err; |
2625 } |
2495 } |
2626 |
2496 |
2627 // ----------------------------------------------------------------------------- |
2497 // ----------------------------------------------------------------------------- |
2628 // CIptvMyVideosApiTest::CreateVideoFileL |
2498 // CVcxMyVideosApiTest::CreateAlbumL |
2499 // ----------------------------------------------------------------------------- |
|
2500 // |
|
2501 TInt CVCXMyVideosCollectionPluginTest::CreateAlbumL( CStifItemParser& aItem ) |
|
2502 { |
|
2503 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CreateAlbumL ---------->"); |
|
2504 // Print to UI |
|
2505 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
2506 _LIT( KWhere, "In CreateAlbumL" ); |
|
2507 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
2508 // Print to log file |
|
2509 iLog->Log( KWhere ); |
|
2510 |
|
2511 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
2512 |
|
2513 iLastReceivedMessage = -1; |
|
2514 |
|
2515 TInt err( KErrNotReady ); |
|
2516 if( iTester ) |
|
2517 { |
|
2518 TPtrC albumName; |
|
2519 User::LeaveIfError( aItem.GetNextString( albumName ) ); |
|
2520 |
|
2521 TInt sync; |
|
2522 if( aItem.GetNextInt( sync ) != KErrNone ) |
|
2523 { |
|
2524 sync = EFalse; |
|
2525 } |
|
2526 |
|
2527 if( albumName.Compare( KStifScript2KString ) == KErrNone ) |
|
2528 { |
|
2529 TRAP( err, iTester->CreateAlbumL( KAbout2050CharsString, sync ) ); |
|
2530 } |
|
2531 else if( albumName.Compare( KStifScriptEmptyString ) == KErrNone ) |
|
2532 { |
|
2533 TRAP( err, iTester->CreateAlbumL( KVcxTestEmptyString, sync ) ); |
|
2534 } |
|
2535 else if( albumName.Compare( KStifScriptInvalidRequest ) == KErrNone ) |
|
2536 { |
|
2537 TRAP( err, iTester->CreateAlbumL( KVcxTestEmptyString, sync, ETrue ) ); |
|
2538 } |
|
2539 else |
|
2540 { |
|
2541 TRAP( err, iTester->CreateAlbumL( albumName, sync ) ); |
|
2542 } |
|
2543 } |
|
2544 |
|
2545 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CreateAlbumL <----------"); |
|
2546 return err; |
|
2547 } |
|
2548 |
|
2549 // ----------------------------------------------------------------------------- |
|
2550 // CVcxMyVideosApiTest::DeleteAlbumsL |
|
2551 // ----------------------------------------------------------------------------- |
|
2552 // |
|
2553 TInt CVCXMyVideosCollectionPluginTest::DeleteAlbumsL( CStifItemParser& aItem ) |
|
2554 { |
|
2555 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DeleteAlbumsL ---------->"); |
|
2556 // Print to UI |
|
2557 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
2558 _LIT( KWhere, "In DeleteAlbumsL" ); |
|
2559 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
2560 // Print to log file |
|
2561 iLog->Log( KWhere ); |
|
2562 |
|
2563 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
2564 |
|
2565 iLastReceivedMessage = -1; |
|
2566 |
|
2567 TInt err( KErrNotReady ); |
|
2568 |
|
2569 if( iTester ) |
|
2570 { |
|
2571 TPtrC albumName; |
|
2572 RArray<TPtrC> albumNames; |
|
2573 |
|
2574 while( aItem.GetNextString( albumName ) == KErrNone ) |
|
2575 { |
|
2576 albumNames.Append( albumName ); |
|
2577 } |
|
2578 |
|
2579 if( albumNames.Count() < 1 ) |
|
2580 { |
|
2581 VCXLOGLO1("CVCXMyVideosCollectionPluginTest::DeleteAlbumsL: No albums specified!"); |
|
2582 err = KErrArgument; |
|
2583 } |
|
2584 else |
|
2585 { |
|
2586 TRAP( err, iTester->DeleteAlbumsL( albumNames ) ); |
|
2587 } |
|
2588 } |
|
2589 |
|
2590 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DeleteAlbumsL <----------"); |
|
2591 return err; |
|
2592 } |
|
2593 |
|
2594 // ----------------------------------------------------------------------------- |
|
2595 // CVcxMyVideosApiTest::DeleteAllAlbumsL |
|
2596 // ----------------------------------------------------------------------------- |
|
2597 // |
|
2598 TInt CVCXMyVideosCollectionPluginTest::DeleteAllAlbumsL( CStifItemParser& aItem ) |
|
2599 { |
|
2600 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DeleteAllAlbumsL ---------->"); |
|
2601 // Print to UI |
|
2602 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
2603 _LIT( KWhere, "In DeleteAllAlbumsL" ); |
|
2604 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
2605 // Print to log file |
|
2606 iLog->Log( KWhere ); |
|
2607 |
|
2608 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
2609 |
|
2610 iLastReceivedMessage = -1; |
|
2611 |
|
2612 TInt err( KErrNotReady ); |
|
2613 |
|
2614 if( iTester ) |
|
2615 { |
|
2616 TRAP( err, iTester->DeleteAllAlbumsL() ); |
|
2617 } |
|
2618 |
|
2619 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DeleteAllAlbumsL <----------"); |
|
2620 return err; |
|
2621 } |
|
2622 |
|
2623 |
|
2624 // ----------------------------------------------------------------------------- |
|
2625 // CVcxMyVideosApiTest::AddMediasToAlbumL |
|
2626 // ----------------------------------------------------------------------------- |
|
2627 // |
|
2628 TInt CVCXMyVideosCollectionPluginTest::AddMediasToAlbumL( CStifItemParser& aItem ) |
|
2629 { |
|
2630 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::AddMediasToAlbumL ---------->"); |
|
2631 // Print to UI |
|
2632 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
2633 _LIT( KWhere, "In AddMediasToAlbumL" ); |
|
2634 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
2635 // Print to log file |
|
2636 iLog->Log( KWhere ); |
|
2637 |
|
2638 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
2639 |
|
2640 iLastReceivedMessage = -1; |
|
2641 |
|
2642 TInt err( KErrNotReady ); |
|
2643 |
|
2644 if( iTester ) |
|
2645 { |
|
2646 TPtrC albumName; |
|
2647 User::LeaveIfError( aItem.GetNextString( albumName ) ); |
|
2648 |
|
2649 TInt sourceDrive(0); |
|
2650 User::LeaveIfError( GetDriveParam( aItem, sourceDrive ) ); |
|
2651 |
|
2652 TInt index(0); |
|
2653 User::LeaveIfError( aItem.GetNextInt( index ) ); |
|
2654 |
|
2655 TInt endIndex(0); |
|
2656 User::LeaveIfError( aItem.GetNextInt( endIndex ) ); |
|
2657 |
|
2658 TRAP( err, iTester->AddMediasToAlbumL( albumName, sourceDrive, index, endIndex ) ); |
|
2659 } |
|
2660 |
|
2661 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::AddMediasToAlbumL <----------"); |
|
2662 return err; |
|
2663 } |
|
2664 |
|
2665 // ----------------------------------------------------------------------------- |
|
2666 // CVcxMyVideosApiTest::RemoveMediasFromAlbumL |
|
2667 // ----------------------------------------------------------------------------- |
|
2668 // |
|
2669 TInt CVCXMyVideosCollectionPluginTest::RemoveMediasFromAlbumL( CStifItemParser& aItem ) |
|
2670 { |
|
2671 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::RemoveMediasFromAlbumL ---------->"); |
|
2672 // Print to UI |
|
2673 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
2674 _LIT( KWhere, "In RemoveMediasFromAlbumL" ); |
|
2675 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
2676 // Print to log file |
|
2677 iLog->Log( KWhere ); |
|
2678 |
|
2679 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
2680 |
|
2681 iLastReceivedMessage = -1; |
|
2682 |
|
2683 TInt err( KErrNotReady ); |
|
2684 |
|
2685 if( iTester ) |
|
2686 { |
|
2687 TPtrC albumName; |
|
2688 User::LeaveIfError( aItem.GetNextString( albumName ) ); |
|
2689 |
|
2690 TInt sourceDrive(0); |
|
2691 User::LeaveIfError( GetDriveParam( aItem, sourceDrive ) ); |
|
2692 |
|
2693 TInt index(0); |
|
2694 User::LeaveIfError( aItem.GetNextInt( index ) ); |
|
2695 |
|
2696 TInt endIndex(0); |
|
2697 User::LeaveIfError( aItem.GetNextInt( endIndex ) ); |
|
2698 |
|
2699 TRAP( err, iTester->RemoveMediasFromAlbumL( albumName, sourceDrive, index, endIndex ) ); |
|
2700 } |
|
2701 |
|
2702 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::RemoveMediasFromAlbumL <----------"); |
|
2703 return err; |
|
2704 } |
|
2705 |
|
2706 // ----------------------------------------------------------------------------- |
|
2707 // CVcxMyVideosApiTest::CheckAlbumCount |
|
2708 // ----------------------------------------------------------------------------- |
|
2709 // |
|
2710 TInt CVCXMyVideosCollectionPluginTest::CheckAlbumCount( CStifItemParser& aItem ) |
|
2711 { |
|
2712 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CreateAlbumL ---------->"); |
|
2713 // Print to UI |
|
2714 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
2715 _LIT( KWhere, "In CheckAlbumCount" ); |
|
2716 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
2717 // Print to log file |
|
2718 iLog->Log( KWhere ); |
|
2719 |
|
2720 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
2721 |
|
2722 TInt err( KErrNotReady ); |
|
2723 |
|
2724 int expectedCount; |
|
2725 User::LeaveIfError( aItem.GetNextInt( expectedCount ) ); |
|
2726 |
|
2727 if( iTester ) |
|
2728 { |
|
2729 if( !iTester->CheckAlbumCount( expectedCount ) ) |
|
2730 { |
|
2731 err = KErrCorrupt; |
|
2732 } |
|
2733 } |
|
2734 |
|
2735 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckAlbumCount <----------"); |
|
2736 return err; |
|
2737 } |
|
2738 |
|
2739 // ----------------------------------------------------------------------------- |
|
2740 // CVcxMyVideosApiTest::CreateVideoFileL |
|
2629 // ----------------------------------------------------------------------------- |
2741 // ----------------------------------------------------------------------------- |
2630 // |
2742 // |
2631 TInt CVCXMyVideosCollectionPluginTest::CreateVideoFileL( CStifItemParser& aItem ) |
2743 TInt CVCXMyVideosCollectionPluginTest::CreateVideoFileL( CStifItemParser& aItem ) |
2632 { |
2744 { |
2633 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CreateVideoFileL ---------->"); |
2745 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CreateVideoFileL ---------->"); |
2641 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
2753 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
2642 |
2754 |
2643 TInt temp(0); |
2755 TInt temp(0); |
2644 |
2756 |
2645 // Parameter video type |
2757 // Parameter video type |
2646 CIptvTestVideoCreator::TIptvTestVideoType videoType; |
2758 CVCXMyVideosTestUtils::TVcxTestVideoType videoType; |
2647 User::LeaveIfError( aItem.GetNextInt(temp) ); |
2759 User::LeaveIfError( aItem.GetNextInt(temp) ); |
2648 videoType = static_cast<CIptvTestVideoCreator::TIptvTestVideoType>(temp); |
2760 videoType = static_cast<CVCXMyVideosTestUtils::TVcxTestVideoType>(temp); |
2649 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: videoType: %d", videoType); |
2761 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: videoType: %d", videoType); |
2650 |
2762 |
2651 // Parameter drive letter |
2763 // Parameter drive letter |
2652 TPtrC driveLetter; |
2764 TPtrC driveLetter; |
2653 User::LeaveIfError(aItem.GetNextString(driveLetter)); |
2765 User::LeaveIfError(aItem.GetNextString(driveLetter)); |
2654 #ifdef __WINSCW__ |
|
2655 driveLetter.Set(_L("C")); |
|
2656 #endif |
|
2657 |
2766 |
2658 // Parameter path and filename |
2767 // Parameter path and filename |
2659 TPtrC filename; |
2768 TPtrC filename; |
2660 User::LeaveIfError(aItem.GetNextString(filename)); |
2769 User::LeaveIfError(aItem.GetNextString(filename)); |
2661 if(filename.Length() < 64) |
2770 if(filename.Length() < 64) |
2678 } |
2787 } |
2679 |
2788 |
2680 TRAPD( err, CreateVideoFileL( videoType, driveLetter, filename, size, count, ETrue ) ); |
2789 TRAPD( err, CreateVideoFileL( videoType, driveLetter, filename, size, count, ETrue ) ); |
2681 |
2790 |
2682 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CreateVideoFileL <----------"); |
2791 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CreateVideoFileL <----------"); |
2683 return VCXMVTEST_ERR( err ); |
2792 return err; |
2684 } |
2793 } |
2685 |
2794 |
2686 // ----------------------------------------------------------------------------- |
2795 // ----------------------------------------------------------------------------- |
2687 // CIptvMyVideosApiTest::CreateVideoFileNoWaitL |
2796 // CVcxMyVideosApiTest::CreateVideoFileNoWaitL |
2688 // ----------------------------------------------------------------------------- |
2797 // ----------------------------------------------------------------------------- |
2689 // |
2798 // |
2690 TInt CVCXMyVideosCollectionPluginTest::CreateVideoFileNoWaitL( CStifItemParser& aItem ) |
2799 TInt CVCXMyVideosCollectionPluginTest::CreateVideoFileNoWaitL( CStifItemParser& aItem ) |
2691 { |
2800 { |
2692 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CreateVideoFileNoWaitL ---------->"); |
2801 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CreateVideoFileNoWaitL ---------->"); |
2700 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
2809 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
2701 |
2810 |
2702 TInt temp(0); |
2811 TInt temp(0); |
2703 |
2812 |
2704 // Parameter video type |
2813 // Parameter video type |
2705 CIptvTestVideoCreator::TIptvTestVideoType videoType; |
2814 CVCXMyVideosTestUtils::TVcxTestVideoType videoType; |
2706 User::LeaveIfError( aItem.GetNextInt(temp) ); |
2815 User::LeaveIfError( aItem.GetNextInt(temp) ); |
2707 videoType = static_cast<CIptvTestVideoCreator::TIptvTestVideoType>(temp); |
2816 videoType = static_cast<CVCXMyVideosTestUtils::TVcxTestVideoType>(temp); |
2708 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: videoType: %d", videoType); |
2817 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: videoType: %d", videoType); |
2709 |
2818 |
2710 // Parameter drive letter |
2819 // Parameter drive letter |
2711 TPtrC driveLetter; |
2820 TPtrC driveLetter; |
2712 User::LeaveIfError(aItem.GetNextString(driveLetter)); |
2821 User::LeaveIfError(aItem.GetNextString(driveLetter)); |
2713 #ifdef __WINSCW__ |
|
2714 driveLetter.Set(_L("C")); |
|
2715 #endif |
|
2716 |
2822 |
2717 // Parameter path and filename |
2823 // Parameter path and filename |
2718 TPtrC filename; |
2824 TPtrC filename; |
2719 User::LeaveIfError(aItem.GetNextString(filename)); |
2825 User::LeaveIfError(aItem.GetNextString(filename)); |
2720 if(filename.Length() < 64) |
2826 if(filename.Length() < 64) |
2739 } |
2845 } |
2740 |
2846 |
2741 TRAPD( err, CreateVideoFileL( videoType, driveLetter, filename, size, count, EFalse ) ); |
2847 TRAPD( err, CreateVideoFileL( videoType, driveLetter, filename, size, count, EFalse ) ); |
2742 |
2848 |
2743 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CreateVideoFileNoWaitL ---------->"); |
2849 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CreateVideoFileNoWaitL ---------->"); |
2744 return VCXMVTEST_ERR( err ); |
2850 return err; |
2745 } |
2851 } |
2746 |
2852 |
2747 // ----------------------------------------------------------------------------- |
2853 // ----------------------------------------------------------------------------- |
2748 // CIptvMyVideosApiTest::CreateVideoFileL |
2854 // CVcxMyVideosApiTest::CreateVideoFileL |
2749 // ----------------------------------------------------------------------------- |
2855 // ----------------------------------------------------------------------------- |
2750 // |
2856 // |
2751 void CVCXMyVideosCollectionPluginTest::CreateVideoFileL( CIptvTestVideoCreator::TIptvTestVideoType aType, const TDesC& aDriveLetter, const TDesC& aFileName, TInt aSize, TInt aVideoCount, TBool aDoSync ) |
2857 void CVCXMyVideosCollectionPluginTest::CreateVideoFileL( CVCXMyVideosTestUtils::TVcxTestVideoType aType, const TDesC& aDriveLetter, const TDesC& aFileName, TInt aSize, TInt aVideoCount, TBool aDoSync ) |
2752 { |
2858 { |
2753 HBufC* path = HBufC::NewL( 2048 ); |
2859 HBufC* path = HBufC::NewL( 2048 ); |
2754 CleanupStack::PushL(path); |
2860 CleanupStack::PushL(path); |
2755 |
2861 |
2756 // Make sure path exists and resolve path + filename |
2862 // Make sure path exists and resolve path + filename |
2827 // Save the path for later use. |
2933 // Save the path for later use. |
2828 CleanupStack::Pop( path ); |
2934 CleanupStack::Pop( path ); |
2829 iSideloadedFiles.Append( path ); |
2935 iSideloadedFiles.Append( path ); |
2830 |
2936 |
2831 // Create the video. |
2937 // Create the video. |
2832 TRAP( err, iTestCommon->CreateVideoFileL( aType, *path, aSize ) ); |
2938 TRAP( err, iTestUtils->CreateVideoFileL( aType, *path, aSize ) ); |
2833 if(err != KErrNone) |
2939 if(err != KErrNone) |
2834 { |
2940 { |
2835 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: CreateVideoFileL returned error: %d:", err); |
2941 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: CreateVideoFileL returned error: %d:", err); |
2836 } |
2942 } |
2837 TRAP_IGNORE( iStats->ActionStartL( KSideloadVideoActionId, _L("Sideload video") ) ); |
|
2838 } |
2943 } |
2839 else |
2944 else |
2840 { |
2945 { |
2841 TRAP( err, iTestCommon->CreateVideoFilesL( aType, *path, aVideoCount, iSideloadedFiles ) ); |
2946 TRAP( err, iTestUtils->CreateVideoFilesL( aType, *path, aVideoCount, iSideloadedFiles ) ); |
2842 if(err != KErrNone) |
2947 if(err != KErrNone) |
2843 { |
2948 { |
2844 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: CreateVideoFilesL returned error: %d:", err); |
2949 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: CreateVideoFilesL returned error: %d:", err); |
2845 } |
|
2846 for( TInt i = 0; i < aVideoCount; i++ ) |
|
2847 { |
|
2848 TRAP_IGNORE( iStats->ActionStartL( KSideloadVideoActionId, _L("Sideload video") ) ); |
|
2849 } |
2950 } |
2850 CleanupStack::PopAndDestroy( path ); |
2951 CleanupStack::PopAndDestroy( path ); |
2851 } |
2952 } |
2852 |
2953 |
2853 if( iTester ) |
2954 if( iTester ) |
2864 |
2965 |
2865 // Wait for insertion events. |
2966 // Wait for insertion events. |
2866 RArray<TInt> messages; |
2967 RArray<TInt> messages; |
2867 for( TInt i=0; i<aVideoCount; i++ ) |
2968 for( TInt i=0; i<aVideoCount; i++ ) |
2868 { |
2969 { |
2869 messages.Append( KVCXMYVideosTestMessageMpxItemInserted ); |
2970 messages.Append( KVCXMYVideosTestMessageMpxVideoInserted ); |
2870 } |
2971 } |
2871 // Only one video added, refresh is automatic. |
2972 // Only one video added, refresh is automatic. |
2872 if( aVideoCount <= 1 ) |
2973 if( aVideoCount <= 1 ) |
2873 { |
2974 { |
2874 messages.Append( KVCXMYVideosTestMessageCollectionOpened ); |
2975 messages.Append( KVCXMYVideosTestMessageCollectionOpened ); |
2945 } |
3046 } |
2946 |
3047 |
2947 TInt createCount = amount - videoCount; |
3048 TInt createCount = amount - videoCount; |
2948 |
3049 |
2949 TRAP( err, CreateVideoFileL( |
3050 TRAP( err, CreateVideoFileL( |
2950 CIptvTestVideoCreator::IptvTestVideoMpeg4, driveLetter, filename, -1, createCount, ETrue ) ); |
3051 CVCXMyVideosTestUtils::VcxTestVideoMpeg4, driveLetter, filename, -1, createCount, ETrue ) ); |
2951 } |
3052 } |
2952 else |
3053 else |
2953 if( videoCount > amount ) |
3054 if( videoCount > amount ) |
2954 { |
3055 { |
2955 VCXLOGLO2("CVCXMyVideosCollectionPluginTest::EnsureDriveForVideosL: drive has more than %d videos.", amount); |
3056 VCXLOGLO2("CVCXMyVideosCollectionPluginTest::EnsureDriveForVideosL: drive has more than %d videos.", amount); |
2978 { |
3079 { |
2979 VCXLOGLO2("CVCXMyVideosCollectionPluginTest::EnsureDriveForVideosL: drive already has %d videos.", amount); |
3080 VCXLOGLO2("CVCXMyVideosCollectionPluginTest::EnsureDriveForVideosL: drive already has %d videos.", amount); |
2980 } |
3081 } |
2981 |
3082 |
2982 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::EnsureDriveForVideosL <----------"); |
3083 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::EnsureDriveForVideosL <----------"); |
2983 return VCXMVTEST_ERR( err ); |
3084 return err; |
2984 } |
3085 } |
2985 |
3086 |
2986 // ----------------------------------------------------------------------------- |
3087 // ----------------------------------------------------------------------------- |
2987 // CVCXMyVideosCollectionPluginTest::EmptySideloadFoldersL |
3088 // CVCXMyVideosCollectionPluginTest::EmptySideloadFoldersL |
2988 // Delete everything from sideloading folders. |
3089 // Delete everything from sideloading folders. |
3041 HBufC16* path = filesInUse[i]; |
3142 HBufC16* path = filesInUse[i]; |
3042 CleanupStack::PushL( path ); |
3143 CleanupStack::PushL( path ); |
3043 filesInUse.Remove( i ); |
3144 filesInUse.Remove( i ); |
3044 |
3145 |
3045 // Delete file |
3146 // Delete file |
3046 iTestCommon->EnsureFileIsNotInUse( *path ); |
3147 iTestUtils->EnsureFileIsNotInUse( *path ); |
3047 TInt err = iFs.Delete( path->Des() ); |
3148 TInt err = iFs.Delete( path->Des() ); |
3048 if( err != KErrNone ) |
3149 if( err != KErrNone ) |
3049 { |
3150 { |
3050 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: delete 2nd error: %d", err); |
3151 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: delete 2nd error: %d", err); |
3051 } |
3152 } |
3058 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::EmptySideloadFoldersL <----------"); |
3159 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::EmptySideloadFoldersL <----------"); |
3059 return KErrNone; |
3160 return KErrNone; |
3060 } |
3161 } |
3061 |
3162 |
3062 // ----------------------------------------------------------------------------- |
3163 // ----------------------------------------------------------------------------- |
3063 // CIptvMyVideosApiTest::SetDeleteSideloadedVideos |
3164 // CVcxMyVideosApiTest::SetDeleteSideloadedVideos |
3064 // ----------------------------------------------------------------------------- |
3165 // ----------------------------------------------------------------------------- |
3065 // |
3166 // |
3066 TInt CVCXMyVideosCollectionPluginTest::SetDeleteSideloadedVideos( CStifItemParser& /* aItem */ ) |
3167 TInt CVCXMyVideosCollectionPluginTest::SetDeleteSideloadedVideos( CStifItemParser& /* aItem */ ) |
3067 { |
3168 { |
3068 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::SetDeleteSideloadedVideos ---------->"); |
3169 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::SetDeleteSideloadedVideos ---------->"); |
3070 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetDeleteSideloadedVideos <----------"); |
3171 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::SetDeleteSideloadedVideos <----------"); |
3071 return KErrNone; |
3172 return KErrNone; |
3072 } |
3173 } |
3073 |
3174 |
3074 // ----------------------------------------------------------------------------- |
3175 // ----------------------------------------------------------------------------- |
3075 // CIptvMyVideosApiTest::DownloadL |
3176 // CVcxMyVideosApiTest::WaitForMessageL |
3076 // ----------------------------------------------------------------------------- |
|
3077 // |
|
3078 TInt CVCXMyVideosCollectionPluginTest::DownloadL( CStifItemParser& aItem ) |
|
3079 { |
|
3080 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DownloadL ---------->"); |
|
3081 iLastReceivedMessage = -1; |
|
3082 TRAPD( err, DownloadOrResumeL( aItem, EFalse, EFalse ) ); |
|
3083 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DownloadL <----------"); |
|
3084 return VCXMVTEST_ERR( err ); |
|
3085 } |
|
3086 |
|
3087 // ----------------------------------------------------------------------------- |
|
3088 // CIptvMyVideosApiTest::ResumeDownloadL |
|
3089 // ----------------------------------------------------------------------------- |
|
3090 // |
|
3091 TInt CVCXMyVideosCollectionPluginTest::ResumeDownloadL( CStifItemParser& aItem ) |
|
3092 { |
|
3093 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::ResumeDownloadL ---------->"); |
|
3094 iLastReceivedMessage = -1; |
|
3095 TRAPD( err, DownloadOrResumeL( aItem, EFalse, ETrue ) ); |
|
3096 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::ResumeDownloadL <----------"); |
|
3097 return VCXMVTEST_ERR( err ); |
|
3098 } |
|
3099 |
|
3100 // ----------------------------------------------------------------------------- |
|
3101 // CIptvMyVideosApiTest::ResumeAllDownloadsL |
|
3102 // ----------------------------------------------------------------------------- |
|
3103 // |
|
3104 TInt CVCXMyVideosCollectionPluginTest::ResumeAllDownloadsL( CStifItemParser& /* aItem */ ) |
|
3105 { |
|
3106 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::ResumeAllDownloadsL ---------->"); |
|
3107 // Print to UI |
|
3108 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
3109 _LIT( KWhere, "In ResumeAllDownloadsL" ); |
|
3110 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
3111 // Print to log file |
|
3112 iLog->Log( KWhere ); |
|
3113 |
|
3114 TRAPD( err, iTester->ResumeAllDownloadsL() ); |
|
3115 |
|
3116 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::ResumeAllDownloadsL <----------"); |
|
3117 return VCXMVTEST_ERR( err ); |
|
3118 } |
|
3119 |
|
3120 // ----------------------------------------------------------------------------- |
|
3121 // CIptvMyVideosApiTest::DownloadUsingMediaL |
|
3122 // ----------------------------------------------------------------------------- |
|
3123 // |
|
3124 TInt CVCXMyVideosCollectionPluginTest::DownloadUsingMediaL( CStifItemParser& aItem ) |
|
3125 { |
|
3126 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DownloadUsingMediaL ---------->"); |
|
3127 |
|
3128 if( !iMpxMedia ) |
|
3129 { |
|
3130 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: Error. iMpxMedia not set!"); |
|
3131 User::Leave( KErrArgument ); |
|
3132 } |
|
3133 |
|
3134 iLastReceivedMessage = -1; |
|
3135 |
|
3136 TRAPD( err, DownloadOrResumeL( aItem, ETrue, EFalse ) ); |
|
3137 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DownloadUsingMediaL <----------"); |
|
3138 return VCXMVTEST_ERR( err ); |
|
3139 } |
|
3140 |
|
3141 // ----------------------------------------------------------------------------- |
|
3142 // CIptvMyVideosApiTest::ResumeDownloadUsingMediaL |
|
3143 // ----------------------------------------------------------------------------- |
|
3144 // |
|
3145 TInt CVCXMyVideosCollectionPluginTest::ResumeDownloadUsingMediaL( CStifItemParser& aItem ) |
|
3146 { |
|
3147 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::ResumeDownloadUsingMediaL ---------->"); |
|
3148 |
|
3149 if( !iMpxMedia ) |
|
3150 { |
|
3151 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: Error. iMpxMedia not set!"); |
|
3152 User::Leave( KErrArgument ); |
|
3153 } |
|
3154 |
|
3155 iLastReceivedMessage = -1; |
|
3156 |
|
3157 TRAPD( err, DownloadOrResumeL( aItem, ETrue, ETrue ) ); |
|
3158 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::ResumeDownloadUsingMediaL <----------"); |
|
3159 return VCXMVTEST_ERR( err ); |
|
3160 } |
|
3161 |
|
3162 // ----------------------------------------------------------------------------- |
|
3163 // CIptvMyVideosApiTest::DownloadOrResumeL |
|
3164 // ----------------------------------------------------------------------------- |
|
3165 // |
|
3166 void CVCXMyVideosCollectionPluginTest::DownloadOrResumeL( CStifItemParser& aItem, TBool aUseCurrentMedia, TBool aResume ) |
|
3167 { |
|
3168 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DownloadOrResumeL"); |
|
3169 // Print to UI |
|
3170 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
3171 _LIT( KWhere, "In DownloadOrResumeL" ); |
|
3172 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
3173 // Print to log file |
|
3174 iLog->Log( KWhere ); |
|
3175 |
|
3176 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
3177 |
|
3178 iLastReceivedMessage = -1; |
|
3179 |
|
3180 TUint32 iapId(0); |
|
3181 TPtrC iapName; |
|
3182 User::LeaveIfError( aItem.GetNextString( iapName ) ); |
|
3183 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: iapName: %S", &iapName); |
|
3184 |
|
3185 if( iapName == KVCXTestZeroIap ) |
|
3186 { |
|
3187 iapId = 0; |
|
3188 } |
|
3189 else |
|
3190 if( iapName == KVCXTestInvalidIap ) |
|
3191 { |
|
3192 iapId = 10001; |
|
3193 } |
|
3194 else |
|
3195 { |
|
3196 User::LeaveIfError( iTestCommon->GetIapIdL(iapName, iapId) ); |
|
3197 } |
|
3198 |
|
3199 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: iapId: %d", iapId); |
|
3200 |
|
3201 TPtrC serviceName; |
|
3202 User::LeaveIfError( aItem.GetNextString( serviceName ) ); |
|
3203 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: serviceName: %S", &serviceName); |
|
3204 |
|
3205 TInt serviceId(0); |
|
3206 User::LeaveIfError( iServiceEmu->GetServiceIdL(serviceName, serviceId) ); |
|
3207 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: serviceId: %d", serviceId); |
|
3208 |
|
3209 TInt contentId(0); |
|
3210 User::LeaveIfError( aItem.GetNextInt( contentId ) ); |
|
3211 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: contentId: %d", contentId); |
|
3212 |
|
3213 TInt syncCallInt(0); |
|
3214 User::LeaveIfError( aItem.GetNextInt( syncCallInt ) ); |
|
3215 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: callTypeInt: %d", syncCallInt); |
|
3216 TBool syncCall = static_cast<TBool>(syncCallInt); |
|
3217 |
|
3218 TPtrC userName; |
|
3219 if( KErrNone == aItem.GetNextString( userName ) ) |
|
3220 { |
|
3221 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: userName: %S", &userName); |
|
3222 } |
|
3223 else |
|
3224 { |
|
3225 userName.Set( _L("") ); |
|
3226 } |
|
3227 |
|
3228 TPtrC password; |
|
3229 if( KErrNone == aItem.GetNextString( password ) ) |
|
3230 { |
|
3231 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: password: %S", &password); |
|
3232 } |
|
3233 else |
|
3234 { |
|
3235 password.Set( _L("") ); |
|
3236 } |
|
3237 |
|
3238 const TPtrC url = iServiceEmu->GetContentUrlL( serviceId, contentId ); |
|
3239 const TPtrC title = iServiceEmu->GetContentTitleL( serviceId, contentId ); |
|
3240 |
|
3241 TInt err(0); |
|
3242 if( !aUseCurrentMedia ) |
|
3243 { |
|
3244 if( !aResume ) |
|
3245 { |
|
3246 TRAP( err, iTester->StartDownloadL( title, iapId, serviceId, contentId, url, syncCall, userName, password, NULL ) ); |
|
3247 } |
|
3248 else |
|
3249 { |
|
3250 TRAP( err, iTester->ResumeDownloadL( title, iapId, serviceId, contentId, url, syncCall, userName, password, NULL ) ); |
|
3251 } |
|
3252 } |
|
3253 else |
|
3254 { |
|
3255 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: passing current media to MPX plugin."); |
|
3256 if( !aResume ) |
|
3257 { |
|
3258 TRAP( err, iTester->StartDownloadL( title, iapId, serviceId, contentId, url, syncCall, userName, password, iMpxMedia ) ); |
|
3259 } |
|
3260 else |
|
3261 { |
|
3262 TRAP( err, iTester->ResumeDownloadL( title, iapId, serviceId, contentId, url, syncCall, userName, password, iMpxMedia ) ); |
|
3263 } |
|
3264 } |
|
3265 |
|
3266 // Set autoresume on if there's only one paused download. |
|
3267 CVCXMyVideosTestDlWatcher* dlWatcher = iTester->GetDownloadWatcher(); |
|
3268 if( aResume && dlWatcher && !iAutoResume ) |
|
3269 { |
|
3270 TInt pausedDlCount = 0; |
|
3271 for( TInt i=0; i<dlWatcher->GetDownloadCount(); i++ ) |
|
3272 { |
|
3273 CVCXMyVideosTestDownload* dl = dlWatcher->GetDownloadByIndex( i ); |
|
3274 if( dl->iState == EVcxMyVideosDlStatePaused ) |
|
3275 { |
|
3276 pausedDlCount++; |
|
3277 } |
|
3278 } |
|
3279 if( pausedDlCount == 1 ) |
|
3280 { |
|
3281 iAutoResume = ETrue; |
|
3282 iTester->SetAutoResume( ETrue ); |
|
3283 } |
|
3284 } |
|
3285 |
|
3286 if( err != KErrNone ) |
|
3287 { |
|
3288 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
|
3289 User::Leave( err ); |
|
3290 } |
|
3291 |
|
3292 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DownloadOrResumeL"); |
|
3293 } |
|
3294 |
|
3295 // ----------------------------------------------------------------------------- |
|
3296 // CIptvMyVideosApiTest::DownloadUrlL |
|
3297 // ----------------------------------------------------------------------------- |
|
3298 // |
|
3299 TInt CVCXMyVideosCollectionPluginTest::DownloadUrlL( CStifItemParser& aItem ) |
|
3300 { |
|
3301 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::DownloadUrlL ---------->"); |
|
3302 // Print to UI |
|
3303 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
3304 _LIT( KWhere, "In DownloadUrlL" ); |
|
3305 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
3306 // Print to log file |
|
3307 iLog->Log( KWhere ); |
|
3308 |
|
3309 iLastReceivedMessage = -1; |
|
3310 |
|
3311 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
3312 |
|
3313 TUint32 iapId(0); |
|
3314 TPtrC iapName; |
|
3315 User::LeaveIfError( aItem.GetNextString( iapName ) ); |
|
3316 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: iapName: %S", &iapName); |
|
3317 User::LeaveIfError( iTestCommon->GetIapIdL(iapName, iapId) ); |
|
3318 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: iapId: %d", iapId); |
|
3319 |
|
3320 TPtrC url; |
|
3321 User::LeaveIfError( aItem.GetNextString( url ) ); |
|
3322 |
|
3323 TInt syncCallInt(0); |
|
3324 User::LeaveIfError( aItem.GetNextInt( syncCallInt ) ); |
|
3325 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: callTypeInt: %d", syncCallInt); |
|
3326 TBool syncCall = static_cast<TBool>(syncCallInt); |
|
3327 |
|
3328 TPtrC userName; |
|
3329 if( KErrNone == aItem.GetNextString( userName ) ) |
|
3330 { |
|
3331 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: userName: %S", &userName); |
|
3332 } |
|
3333 else |
|
3334 { |
|
3335 userName.Set( _L("") ); |
|
3336 } |
|
3337 |
|
3338 TPtrC password; |
|
3339 if( KErrNone == aItem.GetNextString( password ) ) |
|
3340 { |
|
3341 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: password: %S", &password); |
|
3342 } |
|
3343 else |
|
3344 { |
|
3345 password.Set( _L("") ); |
|
3346 } |
|
3347 |
|
3348 if( url == KVCXTestZeroUrl) |
|
3349 { |
|
3350 url.Set( _L("" ) ); |
|
3351 } |
|
3352 |
|
3353 TInt err( KErrNone ); |
|
3354 |
|
3355 if( iTester ) |
|
3356 { |
|
3357 if( url == KVCXMYVideosTest2kURLTag ) |
|
3358 { |
|
3359 TRAP( err, iTester->StartDownloadL( _L("2kcharsurl"), iapId, 0, 0, KVCXMYVideosTest2kURL, syncCall, userName, password, NULL ) ); |
|
3360 } |
|
3361 else |
|
3362 if( url == KVCXMYVideosTest1kURLTag ) |
|
3363 { |
|
3364 TRAP( err, iTester->StartDownloadL( _L("1kcharsurl"), iapId, 0, 0, KVCXMYVideosTest1kURL, syncCall, userName, password, NULL ) ); |
|
3365 } |
|
3366 else |
|
3367 { |
|
3368 TRAP( err, iTester->StartDownloadL( _L("urldl"), iapId, 0, 0, url, syncCall, userName, password, NULL ) ); |
|
3369 } |
|
3370 } |
|
3371 |
|
3372 if( err != KErrNone ) |
|
3373 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
|
3374 |
|
3375 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DownloadUrlL <----------"); |
|
3376 return VCXMVTEST_ERR( err ); |
|
3377 } |
|
3378 |
|
3379 // ----------------------------------------------------------------------------- |
|
3380 // CIptvMyVideosApiTest::CancelDownloadL |
|
3381 // ----------------------------------------------------------------------------- |
|
3382 // |
|
3383 TInt CVCXMyVideosCollectionPluginTest::CancelDownloadL( CStifItemParser& aItem ) |
|
3384 { |
|
3385 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CancelDownloadL ---------->"); |
|
3386 // Print to UI |
|
3387 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
3388 _LIT( KWhere, "In CancelDownloadL" ); |
|
3389 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
3390 // Print to log file |
|
3391 iLog->Log( KWhere ); |
|
3392 |
|
3393 iLastReceivedMessage = -1; |
|
3394 |
|
3395 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
3396 |
|
3397 TPtrC serviceName; |
|
3398 User::LeaveIfError( aItem.GetNextString( serviceName ) ); |
|
3399 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: serviceName: %S", &serviceName); |
|
3400 |
|
3401 TInt serviceId(0); |
|
3402 User::LeaveIfError( iServiceEmu->GetServiceIdL(serviceName, serviceId) ); |
|
3403 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: serviceId: %d", serviceId); |
|
3404 |
|
3405 TInt contentId(0); |
|
3406 User::LeaveIfError( aItem.GetNextInt( contentId ) ); |
|
3407 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: contentId: %d", contentId); |
|
3408 |
|
3409 TInt syncCallInt(0); |
|
3410 User::LeaveIfError( aItem.GetNextInt( syncCallInt ) ); |
|
3411 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: callTypeInt: %d", syncCallInt); |
|
3412 TBool syncCall = static_cast<TBool>(syncCallInt); |
|
3413 |
|
3414 const TPtrC url = iServiceEmu->GetContentUrlL( serviceId, contentId ); |
|
3415 |
|
3416 CVCXMyVideosTestDownload* dl = iTester->GetDownloadWatcher()->GetDownload( serviceId, contentId, url ); |
|
3417 |
|
3418 TInt err( KErrNotReady ); |
|
3419 if( !dl ) |
|
3420 { |
|
3421 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: Could not find download with specified params!"); |
|
3422 } |
|
3423 else |
|
3424 if( iTester ) |
|
3425 { |
|
3426 TRAP( err, iTester->CancelDownloadL( dl, syncCall ) ); |
|
3427 } |
|
3428 |
|
3429 if( err != KErrNone ) |
|
3430 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
|
3431 |
|
3432 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CancelDownloadL <----------"); |
|
3433 return VCXMVTEST_ERR( err ); |
|
3434 } |
|
3435 |
|
3436 // ----------------------------------------------------------------------------- |
|
3437 // CIptvMyVideosApiTest::CancelDownloadByIdL |
|
3438 // ----------------------------------------------------------------------------- |
|
3439 // |
|
3440 TInt CVCXMyVideosCollectionPluginTest::CancelDownloadByIdL( CStifItemParser& aItem ) |
|
3441 { |
|
3442 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CancelDownloadByIdL ---------->"); |
|
3443 // Print to UI |
|
3444 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
3445 _LIT( KWhere, "In CancelDownloadByIdL" ); |
|
3446 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
3447 // Print to log file |
|
3448 iLog->Log( KWhere ); |
|
3449 |
|
3450 iLastReceivedMessage = -1; |
|
3451 |
|
3452 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
3453 |
|
3454 TInt mpxId(0); |
|
3455 User::LeaveIfError( aItem.GetNextInt( mpxId ) ); |
|
3456 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: mpxId: %d", mpxId); |
|
3457 |
|
3458 TInt downloadId(0); |
|
3459 User::LeaveIfError( aItem.GetNextInt( downloadId ) ); |
|
3460 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: downloadId: %d", downloadId); |
|
3461 |
|
3462 TInt syncCallInt(0); |
|
3463 User::LeaveIfError( aItem.GetNextInt( syncCallInt ) ); |
|
3464 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: callTypeInt: %d", syncCallInt); |
|
3465 TBool syncCall = static_cast<TBool>(syncCallInt); |
|
3466 |
|
3467 _LIT(KVCxTestEmptyString, "NULL"); |
|
3468 TPtrC downloadPath; |
|
3469 if( aItem.GetNextString( downloadPath ) != KErrNone ) |
|
3470 { |
|
3471 downloadPath.Set( KVCxTestEmptyString ); |
|
3472 } |
|
3473 |
|
3474 TInt err( KErrNotReady ); |
|
3475 if( iTester ) |
|
3476 { |
|
3477 TRAP( err, iTester->CancelDownloadL( mpxId, downloadId, downloadPath, syncCall ) ); |
|
3478 } |
|
3479 |
|
3480 if( err != KErrNone ) |
|
3481 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
|
3482 |
|
3483 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CancelDownloadByIdL <----------"); |
|
3484 return VCXMVTEST_ERR( err ); |
|
3485 } |
|
3486 |
|
3487 // ----------------------------------------------------------------------------- |
|
3488 // CIptvMyVideosApiTest::PauseDownloadL |
|
3489 // ----------------------------------------------------------------------------- |
|
3490 // |
|
3491 TInt CVCXMyVideosCollectionPluginTest::PauseDownloadL( CStifItemParser& aItem ) |
|
3492 { |
|
3493 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::PauseDownloadL ---------->"); |
|
3494 // Print to UI |
|
3495 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
3496 _LIT( KWhere, "In PauseDownloadL" ); |
|
3497 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
3498 // Print to log file |
|
3499 iLog->Log( KWhere ); |
|
3500 |
|
3501 iLastReceivedMessage = -1; |
|
3502 |
|
3503 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
3504 |
|
3505 TPtrC serviceName; |
|
3506 User::LeaveIfError( aItem.GetNextString( serviceName ) ); |
|
3507 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: serviceName: %S", &serviceName); |
|
3508 |
|
3509 TInt serviceId(0); |
|
3510 User::LeaveIfError( iServiceEmu->GetServiceIdL(serviceName, serviceId) ); |
|
3511 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: serviceId: %d", serviceId); |
|
3512 |
|
3513 TInt contentId(0); |
|
3514 User::LeaveIfError( aItem.GetNextInt( contentId ) ); |
|
3515 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: contentId: %d", contentId); |
|
3516 |
|
3517 TInt syncCallInt(0); |
|
3518 User::LeaveIfError( aItem.GetNextInt( syncCallInt ) ); |
|
3519 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: callTypeInt: %d", syncCallInt); |
|
3520 TBool syncCall = static_cast<TBool>(syncCallInt); |
|
3521 |
|
3522 const TPtrC url = iServiceEmu->GetContentUrlL( serviceId, contentId ); |
|
3523 |
|
3524 TInt err( KErrNotReady ); |
|
3525 if( iTester ) |
|
3526 { |
|
3527 // Disable autoresume |
|
3528 iAutoResume = EFalse; |
|
3529 iTester->SetAutoResume( iAutoResume ); |
|
3530 |
|
3531 TRAP( err, iTester->PauseDownloadL( serviceId, contentId, url, syncCall ) ); |
|
3532 } |
|
3533 |
|
3534 if( err != KErrNone ) |
|
3535 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
|
3536 |
|
3537 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::PauseDownloadL <----------"); |
|
3538 return VCXMVTEST_ERR( err ); |
|
3539 } |
|
3540 |
|
3541 // ----------------------------------------------------------------------------- |
|
3542 // CIptvMyVideosApiTest::PauseDownloadByUrlL |
|
3543 // ----------------------------------------------------------------------------- |
|
3544 // |
|
3545 TInt CVCXMyVideosCollectionPluginTest::PauseDownloadByUrlL( CStifItemParser& aItem ) |
|
3546 { |
|
3547 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::PauseDownloadByUrlL ---------->"); |
|
3548 // Print to UI |
|
3549 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
3550 _LIT( KWhere, "In PauseDownloadByUrlL" ); |
|
3551 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
3552 // Print to log file |
|
3553 iLog->Log( KWhere ); |
|
3554 |
|
3555 iLastReceivedMessage = -1; |
|
3556 |
|
3557 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
3558 |
|
3559 TPtrC url; |
|
3560 User::LeaveIfError( aItem.GetNextString( url ) ); |
|
3561 |
|
3562 TInt err( KErrNotReady ); |
|
3563 if( iTester ) |
|
3564 { |
|
3565 // Disable autoresume |
|
3566 iAutoResume = EFalse; |
|
3567 iTester->SetAutoResume( iAutoResume ); |
|
3568 |
|
3569 TRAP( err, iTester->PauseDownloadL( url, EFalse ) ); |
|
3570 } |
|
3571 |
|
3572 if( err != KErrNone ) |
|
3573 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: err: %d", err); |
|
3574 |
|
3575 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::PauseDownloadL <----------"); |
|
3576 return VCXMVTEST_ERR( err ); |
|
3577 } |
|
3578 |
|
3579 // ----------------------------------------------------------------------------- |
|
3580 // CIptvMyVideosApiTest::CheckDownloadProgressL |
|
3581 // ----------------------------------------------------------------------------- |
|
3582 // |
|
3583 TInt CVCXMyVideosCollectionPluginTest::CheckDownloadProgressL( CStifItemParser& aItem ) |
|
3584 { |
|
3585 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CheckDownloadProgressL ---------->"); |
|
3586 // Print to UI |
|
3587 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
3588 _LIT( KWhere, "In CheckDownloadProgressL" ); |
|
3589 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
3590 // Print to log file |
|
3591 iLog->Log( KWhere ); |
|
3592 |
|
3593 iLastReceivedMessage = -1; |
|
3594 |
|
3595 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
|
3596 |
|
3597 TPtrC serviceName; |
|
3598 User::LeaveIfError( aItem.GetNextString( serviceName ) ); |
|
3599 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: serviceName: %S", &serviceName); |
|
3600 |
|
3601 TInt serviceId(0); |
|
3602 User::LeaveIfError( iServiceEmu->GetServiceIdL(serviceName, serviceId) ); |
|
3603 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: serviceId: %d", serviceId); |
|
3604 |
|
3605 TInt contentId(0); |
|
3606 User::LeaveIfError( aItem.GetNextInt( contentId ) ); |
|
3607 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: contentId: %d", contentId); |
|
3608 |
|
3609 TInt minimumProgress( 0 ); |
|
3610 User::LeaveIfError( aItem.GetNextInt( minimumProgress ) ); |
|
3611 |
|
3612 const TPtrC url = iServiceEmu->GetContentUrlL( serviceId, contentId ); |
|
3613 |
|
3614 CVCXMyVideosTestDlWatcher* dlWatcher = iTester->GetDownloadWatcher(); |
|
3615 |
|
3616 TInt err( KErrNotReady ); |
|
3617 |
|
3618 if( dlWatcher ) |
|
3619 { |
|
3620 CVCXMyVideosTestDownload* dl = dlWatcher->GetDownload( serviceId, contentId, url ); |
|
3621 |
|
3622 if( dl ) |
|
3623 { |
|
3624 if( dl->iProgress < minimumProgress ) |
|
3625 { |
|
3626 err = KErrCorrupt; |
|
3627 } |
|
3628 else |
|
3629 { |
|
3630 err = KErrNone; |
|
3631 } |
|
3632 } |
|
3633 } |
|
3634 |
|
3635 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckDownloadProgressL <----------"); |
|
3636 return VCXMVTEST_ERR( err ); |
|
3637 } |
|
3638 |
|
3639 // ----------------------------------------------------------------------------- |
|
3640 // CIptvMyVideosApiTest::WaitAllDownloadsL |
|
3641 // ----------------------------------------------------------------------------- |
|
3642 // |
|
3643 TInt CVCXMyVideosCollectionPluginTest::WaitAllDownloadsL( CStifItemParser& aItem ) |
|
3644 { |
|
3645 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::WaitAllDownloadsL ---------->"); |
|
3646 // Print to UI |
|
3647 _LIT( KVCXMyVideosCollectionPluginTest, "VCXMyVideosCollectionPluginTest" ); |
|
3648 _LIT( KWhere, "In WaitAllDownloadsL" ); |
|
3649 TestModuleIf().Printf( 0, KVCXMyVideosCollectionPluginTest, KWhere ); |
|
3650 // Print to log file |
|
3651 iLog->Log( KWhere ); |
|
3652 |
|
3653 TInt err( KErrNone ); |
|
3654 |
|
3655 TInt minutes(0); |
|
3656 if( aItem.GetNextInt( minutes ) != KErrNone ) |
|
3657 { |
|
3658 minutes = 10; |
|
3659 } |
|
3660 iTimeoutTimer->After( KTimeoutMinute * minutes ); |
|
3661 |
|
3662 iWaitingForAllDownloads = ETrue; |
|
3663 |
|
3664 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::WaitAllDownloadsL <----------"); |
|
3665 return VCXMVTEST_ERR( err ); |
|
3666 } |
|
3667 |
|
3668 // ----------------------------------------------------------------------------- |
|
3669 // CIptvMyVideosApiTest::WaitForMessageL |
|
3670 // ----------------------------------------------------------------------------- |
3177 // ----------------------------------------------------------------------------- |
3671 // |
3178 // |
3672 TInt CVCXMyVideosCollectionPluginTest::WaitForMessageL( CStifItemParser& aItem ) |
3179 TInt CVCXMyVideosCollectionPluginTest::WaitForMessageL( CStifItemParser& aItem ) |
3673 { |
3180 { |
3674 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::WaitForMessageL ---------->"); |
3181 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::WaitForMessageL ---------->"); |
3705 TRAPD( err, WaitForMessagesL( EFalse, messages, timeout, ETrue ) ); |
3212 TRAPD( err, WaitForMessagesL( EFalse, messages, timeout, ETrue ) ); |
3706 |
3213 |
3707 messages.Reset(); |
3214 messages.Reset(); |
3708 |
3215 |
3709 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::WaitForMessageL <----------"); |
3216 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::WaitForMessageL <----------"); |
3710 return VCXMVTEST_ERR( err ); |
3217 return err; |
3711 } |
3218 } |
3712 |
3219 |
3713 // ----------------------------------------------------------------------------- |
3220 // ----------------------------------------------------------------------------- |
3714 // CIptvMyVideosApiTest::WaitForAnyMessageL |
3221 // CVcxMyVideosApiTest::WaitForAnyMessageL |
3715 // ----------------------------------------------------------------------------- |
3222 // ----------------------------------------------------------------------------- |
3716 // |
3223 // |
3717 TInt CVCXMyVideosCollectionPluginTest::WaitForAnyMessageL( CStifItemParser& aItem ) |
3224 TInt CVCXMyVideosCollectionPluginTest::WaitForAnyMessageL( CStifItemParser& aItem ) |
3718 { |
3225 { |
3719 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::WaitForAnyMessageL ---------->"); |
3226 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::WaitForAnyMessageL ---------->"); |
3752 } |
3259 } |
3753 |
3260 |
3754 messages.Reset(); |
3261 messages.Reset(); |
3755 |
3262 |
3756 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::WaitForAnyMessageL <----------"); |
3263 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::WaitForAnyMessageL <----------"); |
3757 return VCXMVTEST_ERR( error ); |
3264 return error; |
3758 } |
3265 } |
3759 |
3266 |
3760 // ----------------------------------------------------------------------------- |
3267 // ----------------------------------------------------------------------------- |
3761 // CIptvMyVideosApiTest::WaitForMessagesL |
3268 // CVcxMyVideosApiTest::WaitForMessagesL |
3762 // ----------------------------------------------------------------------------- |
3269 // ----------------------------------------------------------------------------- |
3763 // |
3270 // |
3764 TInt CVCXMyVideosCollectionPluginTest::WaitForMessagesL( CStifItemParser& aItem ) |
3271 TInt CVCXMyVideosCollectionPluginTest::WaitForMessagesL( CStifItemParser& aItem ) |
3765 { |
3272 { |
3766 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::WaitForMessagesL ---------->"); |
3273 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::WaitForMessagesL ---------->"); |
3799 } |
3306 } |
3800 |
3307 |
3801 messages.Reset(); |
3308 messages.Reset(); |
3802 |
3309 |
3803 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::WaitForMessagesL <----------"); |
3310 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::WaitForMessagesL <----------"); |
3804 return VCXMVTEST_ERR( error ); |
3311 return error; |
3805 } |
3312 } |
3806 |
3313 |
3807 // ----------------------------------------------------------------------------- |
3314 // ----------------------------------------------------------------------------- |
3808 // CIptvMyVideosApiTest::WaitForMessagesL |
3315 // CVcxMyVideosApiTest::WaitForMessagesL |
3809 // ----------------------------------------------------------------------------- |
3316 // ----------------------------------------------------------------------------- |
3810 // |
3317 // |
3811 void CVCXMyVideosCollectionPluginTest::WaitForMessagesL( TBool aBlock, RArray<TInt>& aMessages, TInt aTimeout, |
3318 void CVCXMyVideosCollectionPluginTest::WaitForMessagesL( TBool aBlock, RArray<TInt>& aMessages, TInt aTimeout, |
3812 TBool aWaitAll ) |
3319 TBool aWaitAll ) |
3813 { |
3320 { |
3886 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DeleteDirectoryIfEmpty"); |
3393 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::DeleteDirectoryIfEmpty"); |
3887 return KErrNone; |
3394 return KErrNone; |
3888 } |
3395 } |
3889 |
3396 |
3890 // ----------------------------------------------------------------------------- |
3397 // ----------------------------------------------------------------------------- |
3891 // CIptvMyVideosApiTest::MapMpxMediaAttribute |
3398 // CVcxMyVideosApiTest::MapMpxMediaAttribute |
3892 // ----------------------------------------------------------------------------- |
3399 // ----------------------------------------------------------------------------- |
3893 // |
3400 // |
3894 TInt CVCXMyVideosCollectionPluginTest::MapMpxMediaAttribute( |
3401 TInt CVCXMyVideosCollectionPluginTest::MapMpxMediaAttribute( |
3895 TVcxTestMediaAttributeIdMapping aMapping, TMPXAttributeData& aAttribute, TVcxTestMediaAttributeType& aType ) |
3402 TVcxTestMediaAttributeIdMapping aMapping, TMPXAttributeData& aAttribute, TVcxTestMediaAttributeType& aType ) |
3896 { |
3403 { |
4151 { |
3658 { |
4152 err = KErrNotFound; |
3659 err = KErrNotFound; |
4153 } |
3660 } |
4154 |
3661 |
4155 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::MapMpxMediaAttribute"); |
3662 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::MapMpxMediaAttribute"); |
4156 return VCXMVTEST_ERR( err ); |
3663 return err; |
4157 } |
3664 } |
4158 |
3665 |
4159 // ----------------------------------------------------------------------------- |
3666 // ----------------------------------------------------------------------------- |
4160 // CIptvMyVideosApiTest::GetMessageDesc |
3667 // CVcxMyVideosApiTest::GetMessageDesc |
4161 // ----------------------------------------------------------------------------- |
3668 // ----------------------------------------------------------------------------- |
4162 // |
3669 // |
4163 void CVCXMyVideosCollectionPluginTest::GetMessageDesc( TInt aMessage, TDes& aMsgBuff ) |
3670 void CVCXMyVideosCollectionPluginTest::GetMessageDesc( TInt aMessage, TDes& aMsgBuff ) |
4164 { |
3671 { |
4165 switch( aMessage ) |
3672 switch( aMessage ) |
4268 case KVCXMYVideosTestMessageCollectionGeneral: |
3775 case KVCXMYVideosTestMessageCollectionGeneral: |
4269 { |
3776 { |
4270 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageCollectionGeneral") ); |
3777 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageCollectionGeneral") ); |
4271 } |
3778 } |
4272 break; |
3779 break; |
4273 case KVCXMYVideosTestMessageCollectionItemChanged: |
3780 case KVCXMYVideosTestMessageMpxVideoInserted: |
4274 { |
3781 { |
4275 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageCollectionItemChanged") ); |
3782 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageMpxVideoInserted") ); |
4276 } |
3783 } |
4277 break; |
3784 break; |
4278 case KVCXMYVideosTestMessageCollectionCategoryChanged: |
3785 case KVCXMYVideosTestMessageMpxCategoryInserted: |
4279 { |
3786 { |
4280 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageCollectionCategoryChanged") ); |
3787 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageMpxCategoryInserted") ); |
4281 } |
3788 } |
4282 break; |
3789 break; |
4283 case KVCXMYVideosTestMessageMpxItemInserted: |
3790 case KVCXMYVideosTestMessageMpxAlbumInserted: |
4284 { |
3791 { |
4285 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageMpxItemInserted") ); |
3792 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageMpxAlbumInserted") ); |
4286 } |
3793 } |
4287 break; |
3794 break; |
4288 case KVCXMYVideosTestMessageMpxItemDeleted: |
3795 case KVCXMYVideosTestMessageMpxVideoDeleted: |
4289 { |
3796 { |
4290 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageMpxItemDeleted") ); |
3797 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageMpxVideoDeleted") ); |
4291 } |
3798 } |
4292 break; |
3799 break; |
4293 case KVCXMYVideosTestMessageMpxItemModified: |
3800 case KVCXMYVideosTestMessageMpxCategoryDeleted: |
4294 { |
3801 { |
4295 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageMpxItemModified") ); |
3802 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageMpxCategoryDeleted") ); |
3803 } |
|
3804 break; |
|
3805 case KVCXMYVideosTestMessageMpxAlbumDeleted: |
|
3806 { |
|
3807 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageMpxAlbumDeleted") ); |
|
3808 } |
|
3809 break; |
|
3810 case KVCXMYVideosTestMessageMpxVideoModified: |
|
3811 { |
|
3812 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageMpxVideoModified") ); |
|
3813 } |
|
3814 break; |
|
3815 case KVCXMYVideosTestMessageMpxCategoryModified: |
|
3816 { |
|
3817 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageMpxCategoryModified") ); |
|
3818 } |
|
3819 break; |
|
3820 case KVCXMYVideosTestMessageMpxAlbumModified: |
|
3821 { |
|
3822 aMsgBuff.Copy( _L("KVCXMYVideosTestMessageMpxAlbumModified") ); |
|
4296 } |
3823 } |
4297 break; |
3824 break; |
4298 case KVCXMyVideosTestMessageVideoListOrderChanged: |
3825 case KVCXMyVideosTestMessageVideoListOrderChanged: |
4299 { |
3826 { |
4300 aMsgBuff.Copy( _L("KVCXMyVideosTestMessageVideoListOrderChanged") ); |
3827 aMsgBuff.Copy( _L("KVCXMyVideosTestMessageVideoListOrderChanged") ); |
4319 |
3846 |
4320 } |
3847 } |
4321 } |
3848 } |
4322 |
3849 |
4323 // ----------------------------------------------------------------------------- |
3850 // ----------------------------------------------------------------------------- |
4324 // CIptvMyVideosApiTest::CheckMediasL |
3851 // CVcxMyVideosApiTest::CheckMediasL |
4325 // ----------------------------------------------------------------------------- |
3852 // ----------------------------------------------------------------------------- |
4326 // |
3853 // |
4327 void CVCXMyVideosCollectionPluginTest::CheckMediasL( TInt aExpectedVideoCount, TInt aDrive, TInt aCheckType ) |
3854 void CVCXMyVideosCollectionPluginTest::CheckMediasL( TInt aExpectedVideoCount, TInt aDrive, TInt aCheckType ) |
4328 { |
3855 { |
4329 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CheckMediasL"); |
3856 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::CheckMediasL"); |
4330 |
3857 |
3858 WaitForRefreshL( false ); |
|
3859 |
|
4331 TInt actualVideoCount(0); |
3860 TInt actualVideoCount(0); |
4332 |
3861 |
4333 // File check |
3862 // File check |
4334 TInt videoCount = iTester->GetMediaCount(); |
3863 TInt videoCount = iTester->GetMediaCount(); |
4335 |
3864 |
4357 } |
3886 } |
4358 } |
3887 } |
4359 |
3888 |
4360 actualVideoCount++; |
3889 actualVideoCount++; |
4361 |
3890 |
4362 TInt state = -1; |
3891 if( !iFileCheckDisabled ) |
4363 if( media->IsSupported( KVcxMediaMyVideosDownloadState ) ) |
|
4364 { |
|
4365 state = media->ValueTObjectL<TUint8>( KVcxMediaMyVideosDownloadState ); |
|
4366 } |
|
4367 |
|
4368 TUint32 downloadId = 0; |
|
4369 if( media->IsSupported( KVcxMediaMyVideosDownloadId ) ) |
|
4370 { |
|
4371 downloadId = media->ValueTObjectL<TUint32>( KVcxMediaMyVideosDownloadId ); |
|
4372 } |
|
4373 |
|
4374 // No file check for ongoing downloads |
|
4375 if( !iFileCheckDisabled && ( downloadId == 0 || state == EVcxMyVideosDlStateDownloaded ) ) |
|
4376 { |
3892 { |
4377 if( !iFs.IsValidName( localFilePath ) ) |
3893 if( !iFs.IsValidName( localFilePath ) ) |
4378 { |
3894 { |
4379 VCXLOGLO1("CVCXMyVideosCollectionPluginTest: ERROR. File path is not valid."); |
3895 VCXLOGLO1("CVCXMyVideosCollectionPluginTest: ERROR. File path is not valid."); |
4380 VCXLOGLO2("Local file path: %S", &localFilePath); |
3896 VCXLOGLO2("Local file path: %S", &localFilePath); |
4447 |
3963 |
4448 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMediasL"); |
3964 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::CheckMediasL"); |
4449 } |
3965 } |
4450 |
3966 |
4451 // ----------------------------------------------------------------------------- |
3967 // ----------------------------------------------------------------------------- |
4452 // CIptvMyVideosApiTest::GetDriveParam |
3968 // CVcxMyVideosApiTest::GetDriveParam |
4453 // ----------------------------------------------------------------------------- |
3969 // ----------------------------------------------------------------------------- |
4454 // |
3970 // |
4455 TInt CVCXMyVideosCollectionPluginTest::GetDriveParam( CStifItemParser& aItem, TInt& aDrive ) |
3971 TInt CVCXMyVideosCollectionPluginTest::GetDriveParam( CStifItemParser& aItem, TInt& aDrive ) |
4456 { |
3972 { |
4457 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
3973 aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing ); |
4469 err = iFs.CharToDrive( driveLetter[0], aDrive ); |
3985 err = iFs.CharToDrive( driveLetter[0], aDrive ); |
4470 VCXLOGLO3("CVCXMyVideosCollectionPluginTest:: drive: %S = %d", &driveLetter, aDrive ); |
3986 VCXLOGLO3("CVCXMyVideosCollectionPluginTest:: drive: %S = %d", &driveLetter, aDrive ); |
4471 } |
3987 } |
4472 } |
3988 } |
4473 |
3989 |
4474 return VCXMVTEST_ERR( err ); |
3990 return err; |
4475 } |
3991 } |
4476 |
3992 |
4477 // ----------------------------------------------------------------------------- |
3993 // ----------------------------------------------------------------------------- |
4478 // CIptvMyVideosApiTest::DoTotalRefreshL |
3994 // CVcxMyVideosApiTest::DoTotalRefreshL |
4479 // ----------------------------------------------------------------------------- |
3995 // ----------------------------------------------------------------------------- |
4480 // |
3996 // |
4481 void CVCXMyVideosCollectionPluginTest::DoTotalRefreshL() |
3997 void CVCXMyVideosCollectionPluginTest::DoTotalRefreshL() |
4482 { |
3998 { |
4483 if( iTester && iTester->GetCurrentLevel() == 3 ) |
3999 if( iTester && iTester->GetCurrentLevel() == 3 ) |
4509 } |
4025 } |
4510 } |
4026 } |
4511 } |
4027 } |
4512 |
4028 |
4513 // ----------------------------------------------------------------------------- |
4029 // ----------------------------------------------------------------------------- |
4514 // CIptvMyVideosApiTest::WaitForRefreshL |
4030 // CVcxMyVideosApiTest::WaitForRefreshL |
4515 // ----------------------------------------------------------------------------- |
4031 // ----------------------------------------------------------------------------- |
4516 // |
4032 // |
4517 void CVCXMyVideosCollectionPluginTest::WaitForRefreshL( TBool aForcedWait ) |
4033 void CVCXMyVideosCollectionPluginTest::WaitForRefreshL( TBool aForcedWait ) |
4518 { |
4034 { |
4519 if( iTester && ( iTester->IsRefreshing() || aForcedWait ) ) |
4035 if( iTester && ( iTester->IsRefreshing() || aForcedWait ) ) |
4525 CleanupStack::PopAndDestroy( &messages ); |
4041 CleanupStack::PopAndDestroy( &messages ); |
4526 } |
4042 } |
4527 } |
4043 } |
4528 |
4044 |
4529 // ----------------------------------------------------------------------------- |
4045 // ----------------------------------------------------------------------------- |
4530 // CIptvMyVideosApiTest::GetMediasForLevelL |
4046 // CVcxMyVideosApiTest::GetMediasForLevelL |
4531 // ----------------------------------------------------------------------------- |
4047 // ----------------------------------------------------------------------------- |
4532 // |
4048 // |
4533 CMPXMediaArray* CVCXMyVideosCollectionPluginTest::GetMediasForLevelL( TInt aLevel, TUint aFlagsFilter ) |
4049 CMPXMediaArray* CVCXMyVideosCollectionPluginTest::GetMediasForLevelL( TInt aLevel, TUint aFlagsFilter ) |
4534 { |
4050 { |
4535 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::GetMediasForLevelL ---------->"); |
4051 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::GetMediasForLevelL ---------->"); |
4632 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::GetMediasForLevelL <----------"); |
4148 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::GetMediasForLevelL <----------"); |
4633 return medias; |
4149 return medias; |
4634 } |
4150 } |
4635 |
4151 |
4636 // ----------------------------------------------------------------------------- |
4152 // ----------------------------------------------------------------------------- |
4637 // CIptvMyVideosApiTest::HandleVcxMvTesterMessageL |
4153 // CVcxMyVideosApiTest::HandleVcxMvTesterMessageL |
4638 // ----------------------------------------------------------------------------- |
4154 // ----------------------------------------------------------------------------- |
4639 // |
4155 // |
4640 void CVCXMyVideosCollectionPluginTest::HandleVcxMvTesterMessageL( TInt aMessage, TInt aError ) |
4156 void CVCXMyVideosCollectionPluginTest::HandleVcxMvTesterMessageL( TInt aMessage, TInt aError ) |
4641 { |
4157 { |
4642 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::HandleVcxMvTesterMessageL"); |
4158 VCXLOGLO1(">>>CVCXMyVideosCollectionPluginTest::HandleVcxMvTesterMessageL"); |
4661 if( aMessage == KVCXMYVideosTestMessageCollectionOpened || |
4177 if( aMessage == KVCXMYVideosTestMessageCollectionOpened || |
4662 aMessage == KVCXMYVideosTestMessageListComplete || |
4178 aMessage == KVCXMYVideosTestMessageListComplete || |
4663 aMessage == KVCXMYVideosTestMessageCollectionOpened || |
4179 aMessage == KVCXMYVideosTestMessageCollectionOpened || |
4664 aMessage == KVCXMYVideosTestMessageGotMediasByKMpxId ) |
4180 aMessage == KVCXMYVideosTestMessageGotMediasByKMpxId ) |
4665 { |
4181 { |
4666 _LIT(KWhat, "VidCount"); |
|
4667 _LIT(KDesc, "%d"); |
|
4668 TInt videoCount = iTester->GetMediaCount(); |
4182 TInt videoCount = iTester->GetMediaCount(); |
4669 TestModuleIf().Printf( 0, KWhat, KDesc, videoCount ); |
4183 if( iTester->GetCurrentOpenLevelIndex() == -1 ) |
4670 } |
4184 { |
4671 |
4185 TestModuleIf().Printf( 0, _L("Mv"), _L("CatCount %d"), videoCount ); |
4186 } |
|
4187 else |
|
4188 { |
|
4189 TestModuleIf().Printf( 0, _L("Mv"), _L("VidCount %d"), videoCount ); |
|
4190 } |
|
4191 } |
|
4672 |
4192 |
4673 // Waiting for messages from mpx plugin to stop. |
4193 // Waiting for messages from mpx plugin to stop. |
4674 if( iCoolDownWait ) |
4194 if( iCoolDownWait ) |
4675 { |
4195 { |
4676 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: MsgQueue: Cooling down."); |
4196 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: MsgQueue: Cooling down."); |
4677 iCoolDownTimer->After( KTimeoutSecond * 5 ); |
4197 iCoolDownTimer->After( KTimeoutSecond * 5 ); |
4678 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::HandleVcxMvTesterMessageL"); |
4198 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::HandleVcxMvTesterMessageL"); |
4679 return; |
4199 return; |
4680 } |
4200 } |
4681 |
|
4682 if( aMessage == KVCXMYVideosTestMessageDlSucceeded || |
|
4683 aMessage == KVCXMYVideosTestMessageDlFailed || |
|
4684 aMessage == KVCXMYVideosTestMessageDlPaused || |
|
4685 aMessage == KVCXMYVideosTestMessageDlGeneral || |
|
4686 aMessage == KVCXMYVideosTestErrorDownloadNotFound ) |
|
4687 { |
|
4688 TInt activeDownloads = iTester->GetActiveDownloadCountL(); |
|
4689 TInt downloads = iTester->GetDownloadWatcher()->GetDownloadCount(); |
|
4690 _LIT(KWhat, "Downloads"); |
|
4691 _LIT(KDesc, "%d/%d"); |
|
4692 TestModuleIf().Printf( 0, KWhat, KDesc, activeDownloads, downloads ); |
|
4693 |
|
4694 if( aError != KErrNone ) |
|
4695 { |
|
4696 iLastDownloadError = aError; |
|
4697 } |
|
4698 } |
|
4699 |
|
4700 // Inform script of paused download when auto resume is off. |
|
4701 if( !iWaitingForAllDownloads && aMessage == KVCXMYVideosTestMessageDlPaused && !iAutoResume ) |
|
4702 { |
|
4703 // Add message to waited list and continue processing, check for signaling is done later. |
|
4704 iWaitedTestMessages.Reset(); |
|
4705 iWaitedTestMessages.AppendL( aMessage ); |
|
4706 } |
|
4707 |
|
4708 // Waiting for all downloads to complete. Check downloads and signal if needed. |
|
4709 if( iWaitingForAllDownloads ) |
|
4710 { |
|
4711 TInt activeDownloads = iTester->GetActiveDownloadCountL(); |
|
4712 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: Ongoing download count: %d", activeDownloads); |
|
4713 |
|
4714 if( activeDownloads <= 0 ) |
|
4715 { |
|
4716 iTimeoutTimer->CancelTimer(); |
|
4717 iWaitingForAllDownloads = EFalse; |
|
4718 |
|
4719 TInt downloadCount = iTester->GetDownloadWatcher()->GetDownloadCount(); |
|
4720 TInt maxFailsToSucceed = downloadCount / 3; |
|
4721 TInt fails = iTester->GetDownloadWatcher()->GetFailedDownloadCount(); |
|
4722 |
|
4723 if( maxFailsToSucceed <= 0 ) |
|
4724 { |
|
4725 maxFailsToSucceed = 0; |
|
4726 } |
|
4727 |
|
4728 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: download count: %d", downloadCount); |
|
4729 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: failed download count: %d", fails); |
|
4730 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: max allowed fails: %d", maxFailsToSucceed); |
|
4731 |
|
4732 if( fails > maxFailsToSucceed ) |
|
4733 { |
|
4734 if( iLastDownloadError != KErrNone ) |
|
4735 { |
|
4736 iEventError = iLastDownloadError; |
|
4737 } |
|
4738 else |
|
4739 { |
|
4740 iEventError = KVCXMYVideosTestMessageDlFailed; |
|
4741 } |
|
4742 } |
|
4743 else |
|
4744 { |
|
4745 iEventError = KErrNone; |
|
4746 } |
|
4747 |
|
4748 // Add message to waited list and continue processing, check for signaling is done later. |
|
4749 iWaitedTestMessages.Reset(); |
|
4750 iWaitedTestMessages.AppendL( aMessage ); |
|
4751 } |
|
4752 } |
|
4753 |
4201 |
4754 // See if there's cancel needed for move, copy or delete. |
4202 // See if there's cancel needed for move, copy or delete. |
4755 if( aError == KErrNone && iCancelNextOperation ) |
4203 if( aError == KErrNone && iCancelNextOperation ) |
4756 { |
4204 { |
4757 if( aMessage == KVCXMYVideosTestMessageCopyOrMoveStarted ) |
4205 if( aMessage == KVCXMYVideosTestMessageCopyOrMoveStarted ) |
4765 iCancelNextOperation = EFalse; |
4213 iCancelNextOperation = EFalse; |
4766 } |
4214 } |
4767 } |
4215 } |
4768 |
4216 |
4769 // Check for errors. |
4217 // Check for errors. |
4770 if( aError != KErrNone && !iWaitingForAllDownloads ) |
4218 if( aError != KErrNone ) |
4771 { |
4219 { |
4772 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); |
4220 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); |
4773 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: ----------> MsgQueue: Error: %d <----------", aError); |
4221 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: ----------> MsgQueue: Error: %d <----------", aError); |
4774 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); |
4222 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); |
4775 |
4223 |
4776 iLastReceivedMessage = 0; |
4224 iLastReceivedMessage = 0; |
4777 if( !iMessageWaitIsBlocking ) |
4225 if( !iMessageWaitIsBlocking ) |
4778 { |
4226 { |
4779 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: ----------> MsgQueue: Signaling <----------"); |
4227 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: ----------> MsgQueue: Signaling <----------"); |
4780 Signal( VCXMVTEST_ERR( aError ) ); |
4228 Signal( aError ); |
4781 TestModuleIf().Printf( 0, _L("Signal"), _L("%d"), aError ); |
4229 TestModuleIf().Printf( 0, _L("Signal"), _L("%d"), aError ); |
4782 iEventError = KErrNone; |
4230 iEventError = KErrNone; |
4783 } |
4231 } |
4784 else |
4232 else |
4785 { |
4233 { |
4844 } |
4292 } |
4845 |
4293 |
4846 if( !iMessageWaitIsBlocking ) |
4294 if( !iMessageWaitIsBlocking ) |
4847 { |
4295 { |
4848 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: ----------> MsgQueue: Signaling <----------"); |
4296 VCXLOGLO1("CVCXMyVideosCollectionPluginTest:: ----------> MsgQueue: Signaling <----------"); |
4849 Signal( VCXMVTEST_ERR( iEventError ) ); |
4297 Signal( iEventError ); |
4850 TestModuleIf().Printf( 0, _L("Signal"), _L("%d"), iEventError ); |
4298 TestModuleIf().Printf( 0, _L("Signal"), _L("%d"), iEventError ); |
4851 iEventError = KErrNone; |
4299 iEventError = KErrNone; |
4852 } |
4300 } |
4853 else |
4301 else |
4854 { |
4302 { |
4865 |
4313 |
4866 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::HandleVcxMvTesterMessageL"); |
4314 VCXLOGLO1("<<<CVCXMyVideosCollectionPluginTest::HandleVcxMvTesterMessageL"); |
4867 } |
4315 } |
4868 |
4316 |
4869 // ----------------------------------------------------------------------------- |
4317 // ----------------------------------------------------------------------------- |
4870 // CIptvEpgEngineTest::TimerComplete |
4318 // CVcxEpgEngineTest::TimerComplete |
4871 // ----------------------------------------------------------------------------- |
4319 // ----------------------------------------------------------------------------- |
4872 // |
4320 // |
4873 void CVCXMyVideosCollectionPluginTest::TimerComplete(TInt aTimerId, TInt aError) |
4321 void CVCXMyVideosCollectionPluginTest::TimerComplete(TInt aTimerId, TInt aError) |
4874 { |
4322 { |
4875 if( aTimerId == 0 ) |
4323 if( aTimerId == 0 ) |
4886 |
4334 |
4887 // Script is waiting for signal. |
4335 // Script is waiting for signal. |
4888 if( !iMessageWaitIsBlocking ) |
4336 if( !iMessageWaitIsBlocking ) |
4889 { |
4337 { |
4890 VCXLOGLO2( "CVCXMyVideosCollectionPluginTest:: Signaling: %d", iEventError); |
4338 VCXLOGLO2( "CVCXMyVideosCollectionPluginTest:: Signaling: %d", iEventError); |
4891 Signal( VCXMVTEST_ERR( iEventError ) ); |
4339 Signal( iEventError ); |
4892 } |
4340 } |
4893 |
|
4894 TRAP_IGNORE( iStats->ActionEndL( 0, iEventError ) ); |
|
4895 |
|
4896 TestModuleIf().Printf( 0, _L("Timedout"), _L("%d"), iEventError ); |
4341 TestModuleIf().Printf( 0, _L("Timedout"), _L("%d"), iEventError ); |
4897 } |
4342 } |
4898 } |
4343 } |
4899 |
4344 |
4900 if( aTimerId == 1 ) |
4345 if( aTimerId == 1 ) |
4901 { |
4346 { |
4902 VCXLOGLO1("CVCXMyVideosCollectionPluginTest::TimerComplete: Cooldown done. ------->"); |
4347 VCXLOGLO1("CVCXMyVideosCollectionPluginTest::TimerComplete: Cooldown done. ------->"); |
4903 iActiveWait->Stop(); |
4348 iActiveWait->Stop(); |
4904 iCoolDownWait = EFalse; |
4349 iCoolDownWait = EFalse; |
4905 |
4350 |
4906 iWaitingForAllDownloads = EFalse; |
|
4907 iWaitedTestMessages.Reset(); |
4351 iWaitedTestMessages.Reset(); |
4908 iLastReceivedMessage = 0; |
4352 iLastReceivedMessage = 0; |
4909 } |
4353 } |
4910 } |
4354 } |
4911 |
4355 |