62
|
1 |
/*
|
|
2 |
* Copyright (c) 2002 - 2007 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Scripted STIF cases for MPXCollectionHelper
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
// INCLUDE FILES
|
|
19 |
#include <e32svr.h>
|
|
20 |
#include <StifParser.h>
|
|
21 |
#include <Stiftestinterface.h>
|
|
22 |
#include "collectionhelpertest.h"
|
|
23 |
#include <mpxmessagegeneraldefs.h>
|
|
24 |
#include <mpxmediageneraldefs.h>
|
|
25 |
#include <mpxmediaaudiodefs.h>
|
|
26 |
#include <mpxmediamusicdefs.h>
|
|
27 |
#include <mpxmediadrmdefs.h>
|
|
28 |
#include <mpxmediaarray.h>
|
|
29 |
#include <mpxmediacontainerdefs.h>
|
|
30 |
#include <mpxattribute.h>
|
|
31 |
|
|
32 |
|
|
33 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
34 |
|
|
35 |
// -----------------------------------------------------------------------------
|
|
36 |
// CCollectionHelperTest::Delete
|
|
37 |
// Delete here all resources allocated and opened from test methods.
|
|
38 |
// Called from destructor.
|
|
39 |
// -----------------------------------------------------------------------------
|
|
40 |
//
|
|
41 |
void CCollectionHelperTest::Delete()
|
|
42 |
{
|
|
43 |
FTRACE(FPrint(_L("CTunerUtilityTest::Delete")));
|
|
44 |
|
|
45 |
iExpectedEvents.Close();
|
|
46 |
iOcurredEvents.Close();
|
|
47 |
|
|
48 |
iLog->Log(_L("Deleting test class..."));
|
|
49 |
iLog->Log(_L(""));
|
|
50 |
iLog->Log(_L(""));
|
|
51 |
|
|
52 |
if(iUIHelper)
|
|
53 |
{
|
|
54 |
//delete iUIHelper;
|
|
55 |
iUIHelper = NULL;
|
|
56 |
}
|
|
57 |
if(iHelper)
|
|
58 |
{
|
|
59 |
//delete iHelper;
|
|
60 |
iHelper = NULL;
|
|
61 |
}
|
|
62 |
if(iCachedHelper)
|
|
63 |
{
|
|
64 |
//delete iCachedHelper;
|
|
65 |
iCachedHelper = NULL;
|
|
66 |
}
|
|
67 |
}
|
|
68 |
|
|
69 |
// -----------------------------------------------------------------------------
|
|
70 |
// CCollectionHelperTest::RunMethodL
|
|
71 |
// Run specified method. Contains also table of test mothods and their names.
|
|
72 |
// -----------------------------------------------------------------------------
|
|
73 |
//
|
|
74 |
TInt CCollectionHelperTest::RunMethodL( CStifItemParser& aItem )
|
|
75 |
{
|
|
76 |
|
|
77 |
static TStifFunctionInfo const KFunctions[] =
|
|
78 |
{
|
|
79 |
// Copy this line for every implemented function.
|
|
80 |
// First string is the function name used in TestScripter script file.
|
|
81 |
// Second is the actual implementation member function.
|
|
82 |
|
|
83 |
ENTRY( "OpenCollectionUtility", CCollectionHelperTest::OpenCollectionUtilityL ),
|
|
84 |
ENTRY( "NewUiHelper", CCollectionHelperTest::NewUiHelperL ),
|
|
85 |
ENTRY( "NewHelper", CCollectionHelperTest::NewHelperL ),
|
|
86 |
ENTRY( "NewCachedHelper", CCollectionHelperTest::NewCachedHelperL ),
|
|
87 |
ENTRY( "CloseUiHelper", CCollectionHelperTest::CloseUiHelperL ),
|
|
88 |
ENTRY( "CloseHelper", CCollectionHelperTest::CloseHelperL ),
|
|
89 |
ENTRY( "CloseCachedHelper", CCollectionHelperTest::CloseCachedHelperL ),
|
|
90 |
ENTRY( "AddFile", CCollectionHelperTest::AddFileL),
|
|
91 |
ENTRY( "AddMedia", CCollectionHelperTest::AddMediaL ),
|
|
92 |
ENTRY( "RemoveFile", CCollectionHelperTest::RemoveFileL ),
|
|
93 |
ENTRY( "RemoveAll", CCollectionHelperTest::RemoveAllL ),
|
|
94 |
ENTRY( "CleanupDeletedMedias", CCollectionHelperTest::CleanupDeletedMediasL ),
|
|
95 |
ENTRY( "SetMedia", CCollectionHelperTest::SetMediaL ),
|
|
96 |
ENTRY( "RenameUri", CCollectionHelperTest::RenameUriL ),
|
|
97 |
ENTRY( "GetFile", CCollectionHelperTest::GetFileL ),
|
|
98 |
ENTRY( "GetFile2", CCollectionHelperTest::GetFile2L ),
|
|
99 |
ENTRY( "FindAll", CCollectionHelperTest::FindAllL ),
|
|
100 |
//ADD NEW ENTRY HERE
|
|
101 |
// [test cases entries] - Do not remove
|
|
102 |
};
|
|
103 |
|
|
104 |
const TInt count = sizeof( KFunctions ) /
|
|
105 |
sizeof( TStifFunctionInfo );
|
|
106 |
|
|
107 |
return RunInternalL( KFunctions, count, aItem );
|
|
108 |
|
|
109 |
}
|
|
110 |
|
|
111 |
TInt CCollectionHelperTest::OpenCollectionUtilityL(CStifItemParser& /*aItem*/)
|
|
112 |
{
|
|
113 |
FTRACE(FPrint(_L("CCollectionHelperTest::OpenCollectionUtilityL")));
|
|
114 |
iLog->Log(_L("CCollectionHelperTest::OpenCollectionUtilityL"));
|
|
115 |
|
|
116 |
TRAPD( result, iCollectionUtility->Collection().OpenL() );
|
|
117 |
|
|
118 |
if( KErrNone == result )
|
|
119 |
{
|
|
120 |
AddExpectedEvent( EColHandleCollectionMessage, KMediumTimeout );
|
|
121 |
AddExpectedEvent( EColHandleOpen, KMediumTimeout );
|
|
122 |
}
|
|
123 |
|
|
124 |
return result;
|
|
125 |
}
|
|
126 |
|
|
127 |
|
|
128 |
TInt CCollectionHelperTest::NewUiHelperL(CStifItemParser& /*aItem*/)
|
|
129 |
{
|
|
130 |
FTRACE(FPrint(_L("CCollectionHelperTest::NewUiHelperL")));
|
|
131 |
iLog->Log(_L("CCollectionHelperTest::NewUiHelperL"));
|
|
132 |
|
|
133 |
TRAPD( result,
|
|
134 |
iUIHelper = CMPXCollectionHelperFactory::NewCollectionUiHelperL() );
|
|
135 |
|
|
136 |
return result;
|
|
137 |
}
|
|
138 |
|
|
139 |
|
|
140 |
TInt CCollectionHelperTest::NewHelperL(CStifItemParser& /*aItem*/)
|
|
141 |
{
|
|
142 |
FTRACE(FPrint(_L("CCollectionHelperTest::NewHelperL")));
|
|
143 |
iLog->Log(_L("CCollectionHelperTest::NewHelperL"));
|
|
144 |
|
|
145 |
TRAPD( result,
|
|
146 |
iHelper = CMPXCollectionHelperFactory::NewCollectionHelperL() );
|
|
147 |
|
|
148 |
return result;
|
|
149 |
}
|
|
150 |
|
|
151 |
TInt CCollectionHelperTest::NewCachedHelperL(CStifItemParser& /*aItem*/)
|
|
152 |
{
|
|
153 |
FTRACE(FPrint(_L("CCollectionHelperTest::NewCachedHelperL")));
|
|
154 |
iLog->Log(_L("CCollectionHelperTest::NewCachedHelperL"));
|
|
155 |
|
|
156 |
TRAPD( result,
|
|
157 |
iCachedHelper =
|
|
158 |
CMPXCollectionHelperFactory::NewCollectionCachedHelperL() );
|
|
159 |
|
|
160 |
return result;
|
|
161 |
}
|
|
162 |
|
|
163 |
TInt CCollectionHelperTest::CloseUiHelperL(CStifItemParser& /*aItem*/)
|
|
164 |
{
|
|
165 |
FTRACE(FPrint(_L("CCollectionHelperTest::CloseUiHelperL")));
|
|
166 |
iLog->Log(_L("CCollectionHelperTest::CloseUiHelperL"));
|
|
167 |
|
|
168 |
TRAPD( result, iUIHelper->Close() );
|
|
169 |
|
|
170 |
return result;
|
|
171 |
}
|
|
172 |
|
|
173 |
TInt CCollectionHelperTest::CloseHelperL(CStifItemParser& /*aItem*/)
|
|
174 |
{
|
|
175 |
FTRACE(FPrint(_L("CCollectionHelperTest::CloseHelperL")));
|
|
176 |
iLog->Log(_L("CCollectionHelperTest::CloseHelperL"));
|
|
177 |
|
|
178 |
TRAPD( result, iHelper->Close() );
|
|
179 |
|
|
180 |
return result;
|
|
181 |
}
|
|
182 |
|
|
183 |
TInt CCollectionHelperTest::CloseCachedHelperL(CStifItemParser& /*aItem*/)
|
|
184 |
{
|
|
185 |
FTRACE(FPrint(_L("CCollectionHelperTest::CloseCachedHelperL")));
|
|
186 |
iLog->Log(_L("CCollectionHelperTest::CloseCachedHelperL"));
|
|
187 |
|
|
188 |
TRAPD( result, iCachedHelper->Close() );
|
|
189 |
|
|
190 |
return result;
|
|
191 |
}
|
|
192 |
|
|
193 |
TInt CCollectionHelperTest::AddFileL(CStifItemParser& /*aItem*/)
|
|
194 |
{
|
|
195 |
FTRACE(FPrint(_L("CCollectionHelperTest::AddFileL")));
|
|
196 |
iLog->Log(_L("CCollectionHelperTest::AddFileL"));
|
|
197 |
|
|
198 |
TRAPD( result, iHelper->AddL( KTestFile, this ) );
|
|
199 |
|
|
200 |
if( KErrNone == result )
|
|
201 |
{
|
|
202 |
AddExpectedEvent( EColHandleAddFileComplete, KMediumTimeout );
|
|
203 |
}
|
|
204 |
|
|
205 |
return result;
|
|
206 |
}
|
|
207 |
|
|
208 |
TInt CCollectionHelperTest::AddMediaL(CStifItemParser& /*aItem*/)
|
|
209 |
{
|
|
210 |
FTRACE(FPrint(_L("CCollectionHelperTest::AddMediaL")));
|
|
211 |
iLog->Log(_L("CCollectionHelperTest::AddMediaL"));
|
|
212 |
|
|
213 |
CMPXMedia* media( NULL );
|
|
214 |
CreateTestMediaL( media );
|
|
215 |
CleanupStack::PushL( media );
|
|
216 |
|
|
217 |
TRAPD( result, iHelper->AddL( media ) );
|
|
218 |
|
|
219 |
CleanupStack::PopAndDestroy( media );
|
|
220 |
|
|
221 |
return result;
|
|
222 |
};
|
|
223 |
|
|
224 |
TInt CCollectionHelperTest::RemoveFileL(CStifItemParser& /*aItem*/)
|
|
225 |
{
|
|
226 |
FTRACE(FPrint(_L("CCollectionHelperTest::RemoveFileL")));
|
|
227 |
iLog->Log(_L("CCollectionHelperTest::RemoveFileL"));
|
|
228 |
TRAPD( result, iHelper->RemoveL( KTestFile ) );
|
|
229 |
|
|
230 |
//if( KErrNone == result )
|
|
231 |
// {
|
|
232 |
// AddExpectedEvent( EHandleRemove, KMediumTimeout );
|
|
233 |
// }
|
|
234 |
|
|
235 |
return result;
|
|
236 |
}
|
|
237 |
|
|
238 |
TInt CCollectionHelperTest::RemoveAllL(CStifItemParser& /*aItem*/)
|
|
239 |
{
|
|
240 |
FTRACE(FPrint(_L("CCollectionHelperTest::RemoveAllL")));
|
|
241 |
iLog->Log(_L("CCollectionHelperTest::RemoveAllL"));
|
|
242 |
|
|
243 |
TRAPD( result, iHelper->RemoveAllL() );
|
|
244 |
|
|
245 |
//if( KErrNone == result )
|
|
246 |
// {
|
|
247 |
// AddExpectedEvent( EHandleRemove, KMediumTimeout );
|
|
248 |
// }
|
|
249 |
|
|
250 |
return result;
|
|
251 |
}
|
|
252 |
|
|
253 |
TInt CCollectionHelperTest::CleanupDeletedMediasL(CStifItemParser& /*aItem*/)
|
|
254 |
{
|
|
255 |
FTRACE(FPrint(_L("CCollectionHelperTest::CleanupDeletedMediasL")));
|
|
256 |
iLog->Log(_L("CCollectionHelperTest::CleanupDeletedMediasL"));
|
|
257 |
|
|
258 |
TRAPD( result, iHelper->CleanupDeletedMediasL() );
|
|
259 |
|
|
260 |
// This method is unsupported.
|
|
261 |
result = (result == KErrNotSupported) ? KErrNone : result;
|
|
262 |
return result;
|
|
263 |
}
|
|
264 |
|
|
265 |
TInt CCollectionHelperTest::SetMediaL(CStifItemParser& /*aItem*/)
|
|
266 |
{
|
|
267 |
FTRACE(FPrint(_L("CCollectionHelperTest::SetMediaL")));
|
|
268 |
iLog->Log(_L("CCollectionHelperTest::SetMediaL"));
|
|
269 |
|
|
270 |
CMPXMedia* media( NULL );
|
|
271 |
CreateTestMediaL( media );
|
|
272 |
CleanupStack::PushL( media );
|
|
273 |
|
|
274 |
TRAPD( result, iHelper->SetL( media ) );
|
|
275 |
|
|
276 |
CleanupStack::PopAndDestroy( media );
|
|
277 |
|
|
278 |
return result;
|
|
279 |
}
|
|
280 |
|
|
281 |
TInt CCollectionHelperTest::RenameUriL(CStifItemParser& /*aItem*/)
|
|
282 |
{
|
|
283 |
FTRACE(FPrint(_L("CCollectionHelperTest::RenameUriL")));
|
|
284 |
iLog->Log(_L("CCollectionHelperTest::RenameUriL"));
|
|
285 |
|
|
286 |
TRAPD( result, iHelper->RenameL( KRenameOldUri,KRenameNewUri ) );
|
|
287 |
|
|
288 |
return result;
|
|
289 |
}
|
|
290 |
|
|
291 |
TInt CCollectionHelperTest::GetFileL(CStifItemParser& /*aItem*/)
|
|
292 |
{
|
|
293 |
FTRACE(FPrint(_L("CCollectionHelperTest::GetFileL")));
|
|
294 |
iLog->Log(_L("CCollectionHelperTest::GetFileL"));
|
|
295 |
|
|
296 |
RArray<TMPXAttribute> attrs;
|
|
297 |
CleanupClosePushL( attrs );
|
|
298 |
|
|
299 |
CMPXMedia* theFile = NULL;
|
|
300 |
TRAPD( result, theFile = iHelper->GetL( KTestFile, attrs.Array() ) );
|
|
301 |
if(theFile)
|
|
302 |
{
|
|
303 |
delete theFile;
|
|
304 |
}
|
|
305 |
|
|
306 |
CleanupStack::PopAndDestroy( &attrs ); // attrs
|
|
307 |
|
|
308 |
return result;
|
|
309 |
}
|
|
310 |
|
|
311 |
TInt CCollectionHelperTest::GetFile2L(CStifItemParser& /*aItem*/)
|
|
312 |
{
|
|
313 |
FTRACE(FPrint(_L("CCollectionHelperTest::GetFile2L")));
|
|
314 |
iLog->Log(_L("CCollectionHelperTest::GetFile2L"));
|
|
315 |
|
|
316 |
TRAPD( result, const CMPXMedia& theFile = iHelper->GetL( KTestFile ) );
|
|
317 |
|
|
318 |
// This method is unsupported.
|
|
319 |
result = (result == KErrNotSupported) ? KErrNone : result;
|
|
320 |
return result;
|
|
321 |
}
|
|
322 |
|
|
323 |
TInt CCollectionHelperTest::FindAllL(CStifItemParser& /*aItem*/)
|
|
324 |
{
|
|
325 |
FTRACE(FPrint(_L("CCollectionHelperTest::FindAllL")));
|
|
326 |
iLog->Log(_L("CCollectionHelperTest::FindAllL"));
|
|
327 |
|
|
328 |
RArray<TMPXAttribute> attrs;
|
|
329 |
CleanupClosePushL( attrs );
|
|
330 |
|
|
331 |
CMPXMedia* media( NULL );
|
|
332 |
CreateTestMediaL( media );
|
|
333 |
CleanupStack::PushL( media );
|
|
334 |
|
|
335 |
CMPXMedia* allMedia = NULL;
|
|
336 |
TRAPD( result, allMedia = iHelper->FindAllL( *media, attrs.Array() ) );
|
|
337 |
if(allMedia)
|
|
338 |
{
|
|
339 |
delete allMedia;
|
|
340 |
}
|
|
341 |
|
|
342 |
CleanupStack::PopAndDestroy( media );
|
|
343 |
CleanupStack::PopAndDestroy( &attrs ); // attrs
|
|
344 |
|
|
345 |
return result;
|
|
346 |
}
|
|
347 |
|
|
348 |
void CCollectionHelperTest::CreateTestMediaL( CMPXMedia*& aNewProperty )
|
|
349 |
{
|
|
350 |
RArray<TInt> contentIDs;
|
|
351 |
contentIDs.AppendL( KMPXMediaIdGeneral );
|
|
352 |
contentIDs.AppendL( KMPXMediaIdAudio );
|
|
353 |
contentIDs.AppendL( KMPXMediaIdMusic );
|
|
354 |
contentIDs.AppendL( KMPXMediaIdDrm );
|
|
355 |
|
|
356 |
aNewProperty = NULL;
|
|
357 |
CMPXMedia* media = CMPXMedia::NewL( contentIDs.Array() );
|
|
358 |
CleanupStack::PushL( media );
|
|
359 |
contentIDs.Close();
|
|
360 |
|
|
361 |
// CMPXMedia default types
|
|
362 |
media->SetTObjectValueL<TMPXGeneralType>( KMPXMediaGeneralType,
|
|
363 |
EMPXItem );
|
|
364 |
media->SetTObjectValueL<TMPXGeneralCategory>( KMPXMediaGeneralCategory,
|
|
365 |
EMPXSong );
|
|
366 |
media->SetTextValueL( KMPXMediaGeneralUri, KTestFile() );
|
|
367 |
|
|
368 |
// Title, default is file name
|
|
369 |
media->SetTextValueL( KMPXMediaGeneralTitle, KTestFile() );
|
|
370 |
|
|
371 |
// Default album track
|
|
372 |
media->SetTextValueL( KMPXMediaMusicAlbumTrack, KNullDesC );
|
|
373 |
|
|
374 |
// Set the Mime Type and collection UID
|
|
375 |
media->SetTextValueL( KMPXMediaGeneralMimeType, KTestFileMimeType() );
|
|
376 |
//media->SetTObjectValueL( KMPXMediaGeneralCollectionId, );
|
|
377 |
|
|
378 |
// Set the pointers now that the object is ready
|
|
379 |
CleanupStack::Pop( media );
|
|
380 |
aNewProperty = media;
|
|
381 |
}
|
|
382 |
|
|
383 |
// ---------------------------------------------------------------------------
|
|
384 |
// Handle collection message
|
|
385 |
// ---------------------------------------------------------------------------
|
|
386 |
//
|
|
387 |
void CCollectionHelperTest::HandleCollectionMessageL(const CMPXMessage& aMsg)
|
|
388 |
{
|
|
389 |
FTRACE(FPrint(_L("CCollectionHelperTest::HandleCollectionMessageL")));
|
|
390 |
iLog->Log(_L("CCollectionHelperTest::HandleCollectionMessageL"));
|
|
391 |
|
|
392 |
if( aMsg.IsSupported(KMPXMessageGeneralEvent) &&
|
|
393 |
aMsg.IsSupported(KMPXMessageGeneralType) )
|
|
394 |
{
|
|
395 |
TMPXCollectionMessage::TEvent event =
|
|
396 |
*aMsg.Value<TMPXCollectionMessage::TEvent>( KMPXMessageGeneralEvent );
|
|
397 |
TInt type = *aMsg.Value<TInt>( KMPXMessageGeneralType );
|
|
398 |
TInt data = *aMsg.Value<TInt>( KMPXMessageGeneralData );
|
|
399 |
|
|
400 |
TMPXCollectionMessage message(event, type, data);
|
|
401 |
if(message.Event() == TMPXCollectionMessage::EPathChanged &&
|
|
402 |
message.Type() == EMcPathChangedByOpen)
|
|
403 |
{
|
|
404 |
iCollectionUtility->Collection().OpenL();
|
|
405 |
|
|
406 |
this->ProcessEvent(EColHandleCollectionMessage, KErrNone);
|
|
407 |
}
|
|
408 |
}
|
|
409 |
}
|
|
410 |
|
|
411 |
// ---------------------------------------------------------------------------
|
|
412 |
// Handles the collection entries being opened. Typically called
|
|
413 |
// when client has Open()'d a folder
|
|
414 |
// ---------------------------------------------------------------------------
|
|
415 |
//
|
|
416 |
void CCollectionHelperTest::HandleOpenL(const CMPXMedia& /*aEntries*/,
|
|
417 |
TInt /*aIndex*/, TBool aComplete,TInt aError)
|
|
418 |
{
|
|
419 |
FTRACE(FPrint(_L("CCollectionHelperTest::HandleOpenL")));
|
|
420 |
iLog->Log(_L("CCollectionHelperTest::HandleOpenL"));
|
|
421 |
|
|
422 |
this->ProcessEvent(EColHandleOpen, aError);
|
|
423 |
}
|
|
424 |
|
|
425 |
// ---------------------------------------------------------------------------
|
|
426 |
// Handles the item being opened. Typically called
|
|
427 |
// when client has Open()'d an item. Client typically responds by
|
|
428 |
// 'playing' the item via the playlist
|
|
429 |
// ---------------------------------------------------------------------------
|
|
430 |
void CCollectionHelperTest::HandleOpenL(
|
|
431 |
const CMPXCollectionPlaylist& /*aPlaylist*/, TInt /*aError*/)
|
|
432 |
{
|
|
433 |
FTRACE(FPrint(_L("CCollectionHelperTest::HandleOpenL")));
|
|
434 |
iLog->Log(_L("CCollectionHelperTest::HandleOpenL"));
|
|
435 |
}
|
|
436 |
|
|
437 |
// ---------------------------------------------------------------------------
|
|
438 |
// Handle completion of a asynchronous command
|
|
439 |
// ---------------------------------------------------------------------------
|
|
440 |
void CCollectionHelperTest::HandleCommandComplete(
|
|
441 |
CMPXCommand* /*aCommandResult*/, TInt /*aError*/)
|
|
442 |
{
|
|
443 |
FTRACE(FPrint(_L("CCollectionHelperTest::HandleCommandComplete")));
|
|
444 |
iLog->Log(_L("CCollectionHelperTest::HandleCommandComplete"));
|
|
445 |
|
|
446 |
Signal();
|
|
447 |
iTimeoutController->Cancel();
|
|
448 |
}
|
|
449 |
|
|
450 |
// ---------------------------------------------------------------------------
|
|
451 |
// Handle extended media properties
|
|
452 |
// ---------------------------------------------------------------------------
|
|
453 |
//
|
|
454 |
void CCollectionHelperTest::HandleCollectionMediaL(const CMPXMedia& /*aMedia*/,
|
|
455 |
TInt /*aError*/)
|
|
456 |
{
|
|
457 |
FTRACE(FPrint(_L("CCollectionHelperTest::HandleCollectionMediaL")));
|
|
458 |
iLog->Log(_L("CCollectionHelperTest::HandleCollectionMediaL"));
|
|
459 |
|
|
460 |
Signal();
|
|
461 |
iTimeoutController->Cancel();
|
|
462 |
}
|
|
463 |
|
|
464 |
// ---------------------------------------------------------------------------
|
|
465 |
// Handles removing a collection path
|
|
466 |
// ---------------------------------------------------------------------------
|
|
467 |
//
|
|
468 |
void CCollectionHelperTest::HandleRemoveL(MDesCArray& /*aUriArray*/, TInt aError)
|
|
469 |
{
|
|
470 |
FTRACE(FPrint(_L("CCollectionHelperTest::HandleRemoveL")));
|
|
471 |
iLog->Log(_L("CCollectionHelperTest::HandleRemoveL"));
|
|
472 |
|
|
473 |
this->ProcessEvent(EColHandleRemove, aError);
|
|
474 |
}
|
|
475 |
|
|
476 |
// ---------------------------------------------------------------------------
|
|
477 |
// Handle callback for "find" operation
|
|
478 |
// ---------------------------------------------------------------------------
|
|
479 |
//
|
|
480 |
void CCollectionHelperTest::HandleFindAllL(const CMPXMedia& /*aResults*/,
|
|
481 |
TBool aComplete, TInt aError)
|
|
482 |
{
|
|
483 |
FTRACE(FPrint(_L("CCollectionHelperTest::HandleFindAllL")));
|
|
484 |
iLog->Log(_L("CCollectionHelperTest::HandleFindAllL"));
|
|
485 |
|
|
486 |
if(aComplete)
|
|
487 |
{
|
|
488 |
this->ProcessEvent(EColHandleFindAllComplete, aError);
|
|
489 |
}
|
|
490 |
else
|
|
491 |
{
|
|
492 |
this->ProcessEvent(EColHandleFindAllComplete, KErrGeneral );
|
|
493 |
}
|
|
494 |
}
|
|
495 |
|
|
496 |
|
|
497 |
void CCollectionHelperTest::HandleAddFileCompleteL( TInt aErr )
|
|
498 |
{
|
|
499 |
FTRACE(FPrint(_L("CCollectionHelperTest::HandleAddFileCompleteL")));
|
|
500 |
iLog->Log(_L("CCollectionHelperTest::HandleAddFileCompleteL"));
|
|
501 |
|
|
502 |
this->ProcessEvent(EColHandleAddFileComplete, aErr);
|
|
503 |
}
|
|
504 |
|
|
505 |
void CCollectionHelperTest::HandleOperationCompleteL(
|
|
506 |
TCHelperOperation /*aOperation*/, TInt /*aErr*/, void* /*aArgument*/ )
|
|
507 |
{
|
|
508 |
FTRACE(FPrint(_L("CCollectionHelperTest::HandleOperationCompleteL")));
|
|
509 |
iLog->Log(_L("CCollectionHelperTest::HandleOperationCompleteL"));
|
|
510 |
|
|
511 |
Signal();
|
|
512 |
iTimeoutController->Cancel();
|
|
513 |
}
|
|
514 |
|
|
515 |
void CCollectionHelperTest::HandleEmbeddedOpenL(
|
|
516 |
TInt /*aErr*/, TMPXGeneralCategory /*aCategory*/ )
|
|
517 |
{
|
|
518 |
FTRACE(FPrint(_L("CCollectionHelperTest::HandleEmbeddedOpenL")));
|
|
519 |
iLog->Log(_L("CCollectionHelperTest::HandleEmbeddedOpenL"));
|
|
520 |
|
|
521 |
Signal();
|
|
522 |
iTimeoutController->Cancel();
|
|
523 |
}
|