65 ENTRY( "DeleteInstance", CThumbnailManagerTest::DeleteInstance ), |
65 ENTRY( "DeleteInstance", CThumbnailManagerTest::DeleteInstance ), |
66 ENTRY( "SetThumbnailSizeL", CThumbnailManagerTest::SetThumbnailSizeL ), |
66 ENTRY( "SetThumbnailSizeL", CThumbnailManagerTest::SetThumbnailSizeL ), |
67 ENTRY( "CheckThumbnailSizeL", CThumbnailManagerTest::CheckThumbnailSizeL ), |
67 ENTRY( "CheckThumbnailSizeL", CThumbnailManagerTest::CheckThumbnailSizeL ), |
68 ENTRY( "SetThumbnailEnumSizeL", CThumbnailManagerTest::SetThumbnailEnumSizeL ), |
68 ENTRY( "SetThumbnailEnumSizeL", CThumbnailManagerTest::SetThumbnailEnumSizeL ), |
69 ENTRY( "CreateSourceInstancePathL", CThumbnailManagerTest::CreateSourceInstancePathL ), |
69 ENTRY( "CreateSourceInstancePathL", CThumbnailManagerTest::CreateSourceInstancePathL ), |
70 ENTRY( "CreateSourceInstancePathTargetL", CThumbnailManagerTest::CreateSourceInstancePathTargetL ), |
|
71 ENTRY( "CreateSourceInstanceHandleL", CThumbnailManagerTest::CreateSourceInstanceHandleL ), |
70 ENTRY( "CreateSourceInstanceHandleL", CThumbnailManagerTest::CreateSourceInstanceHandleL ), |
72 ENTRY( "CreateSourceInstanceBufferL", CThumbnailManagerTest::CreateSourceInstanceBufferL ), |
71 ENTRY( "CreateSourceInstanceBufferL", CThumbnailManagerTest::CreateSourceInstanceBufferL ), |
73 ENTRY( "CreateSourceInstanceBitmapL", CThumbnailManagerTest::CreateSourceInstanceBitmapL ), |
72 ENTRY( "CreateSourceInstanceBitmapL", CThumbnailManagerTest::CreateSourceInstanceBitmapL ), |
74 ENTRY( "DeleteSourceInstance", CThumbnailManagerTest::DeleteSourceInstance ), |
73 ENTRY( "DeleteSourceInstance", CThumbnailManagerTest::DeleteSourceInstance ), |
75 ENTRY( "GetThumbnailL", CThumbnailManagerTest::GetThumbnailL ), |
74 ENTRY( "GetThumbnailL", CThumbnailManagerTest::GetThumbnailL ), |
299 |
298 |
300 iObjectSource = CThumbnailObjectSource::NewL( filePath, id ); |
299 iObjectSource = CThumbnailObjectSource::NewL( filePath, id ); |
301 return KErrNone; |
300 return KErrNone; |
302 } |
301 } |
303 |
302 |
304 TInt CThumbnailManagerTest::CreateSourceInstancePathTargetL( CStifItemParser& aItem ) |
|
305 { |
|
306 _LIT( KPanicTxt, "CreateSrcPathTarget" ); |
|
307 __ASSERT_ALWAYS( !iObjectSource, User::Panic( KPanicTxt, 0 )); |
|
308 |
|
309 TPtrC path; |
|
310 User::LeaveIfError( aItem.GetNextString( path )); |
|
311 |
|
312 TPtrC target; |
|
313 User::LeaveIfError( aItem.GetNextString( target )); |
|
314 |
|
315 TPtrC mimeType; |
|
316 User::LeaveIfError( aItem.GetNextString( mimeType )); |
|
317 |
|
318 TInt virtual1 = 0; |
|
319 aItem.GetNextInt( virtual1 ); |
|
320 |
|
321 TInt virtual2 = 0; |
|
322 aItem.GetNextInt( virtual2 ); |
|
323 |
|
324 TFileName filePath( iDataPath ); |
|
325 filePath.Append( path ); |
|
326 filePath.ZeroTerminate(); |
|
327 |
|
328 if (virtual1) |
|
329 { |
|
330 filePath.Delete(2,1); |
|
331 } |
|
332 |
|
333 TFileName targetPath( iDataPath ); |
|
334 targetPath.Append( target ); |
|
335 targetPath.ZeroTerminate(); |
|
336 |
|
337 if (virtual2) |
|
338 { |
|
339 targetPath.Delete(2,1); |
|
340 } |
|
341 |
|
342 iLog->Log( _L( "CreateSourceInstancePathTargetL - path = %S, target = %S" ), &filePath ); |
|
343 |
|
344 delete iObjectSource; |
|
345 iObjectSource = NULL; |
|
346 |
|
347 iObjectSource = CThumbnailObjectSource::NewL( filePath, targetPath, mimeType ); |
|
348 return KErrNone; |
|
349 } |
|
350 |
|
351 TInt CThumbnailManagerTest::CreateSourceInstanceHandleL( CStifItemParser& aItem ) |
303 TInt CThumbnailManagerTest::CreateSourceInstanceHandleL( CStifItemParser& aItem ) |
352 { |
304 { |
353 _LIT( KPanicTxt, "CreateSrcHandle" ); |
305 _LIT( KPanicTxt, "CreateSrcHandle" ); |
354 __ASSERT_ALWAYS( !iObjectSource, User::Panic( KPanicTxt, 0 )); |
306 __ASSERT_ALWAYS( !iObjectSource, User::Panic( KPanicTxt, 0 )); |
355 |
307 |
819 |
771 |
820 iCreateThumbnails = ETrue; |
772 iCreateThumbnails = ETrue; |
821 |
773 |
822 return KErrNone; |
774 return KErrNone; |
823 } |
775 } |
824 |
776 |
|
777 /* |
|
778 TInt CThumbnailManagerTest::GetThumbnailsByUrlL( CStifItemParser& aItem ) |
|
779 { |
|
780 _LIT( KPanicTxt, "CreateSrcPath" ); |
|
781 __ASSERT_ALWAYS( !iObjectSource, User::Panic( KPanicTxt, 0 )); |
|
782 |
|
783 TPtrC path; |
|
784 User::LeaveIfError( aItem.GetNextString( path )); |
|
785 |
|
786 TInt id = 0; |
|
787 aItem.GetNextInt( id ); |
|
788 |
|
789 TFileName filePath( iDataPath ); |
|
790 filePath.Append( path ); |
|
791 filePath.ZeroTerminate(); |
|
792 |
|
793 iLog->Log( _L( "CreateSourceInstancePathL - path = %S" ), &filePath ); |
|
794 |
|
795 delete iObjectSource; |
|
796 iObjectSource = NULL; |
|
797 |
|
798 iObjectSource = CThumbnailObjectSource::NewL( filePath, id ); |
|
799 |
|
800 id = iEngine->GetThumbnailL( *iObjectSource ); |
|
801 if (id < 0) |
|
802 { |
|
803 iLog->Log( _L( "GetThumbnails - error %d" ), id ); |
|
804 return id; |
|
805 } |
|
806 else |
|
807 { |
|
808 iPreviousRequestId = id; |
|
809 iLog->Log( _L( "GetThumbnails - request id %d" ), iPreviousRequestId ); |
|
810 } |
|
811 |
|
812 iCreateThumbnails = ETrue; |
|
813 |
|
814 return KErrNone; |
|
815 } |
|
816 |
|
817 */ |
825 |
818 |
826 TInt CThumbnailManagerTest::CreateThumbnails( CStifItemParser& aItem ) |
819 TInt CThumbnailManagerTest::CreateThumbnails( CStifItemParser& aItem ) |
827 { |
820 { |
828 _LIT( KPanicTxt, "CreateThumbnails" ); |
821 _LIT( KPanicTxt, "CreateThumbnails" ); |
829 __ASSERT_ALWAYS( iObjectSource, User::Panic( KPanicTxt, 0 )); |
822 __ASSERT_ALWAYS( iObjectSource, User::Panic( KPanicTxt, 0 )); |
848 |
841 |
849 iCreateThumbnails = ETrue; |
842 iCreateThumbnails = ETrue; |
850 |
843 |
851 return KErrNone; |
844 return KErrNone; |
852 } |
845 } |
|
846 |
853 |
847 |
854 TInt CThumbnailManagerTest::UpdatePathL( CStifItemParser& aItem ) |
848 TInt CThumbnailManagerTest::UpdatePathL( CStifItemParser& aItem ) |
855 { |
849 { |
856 _LIT( KPanicTxt, "UpdatePath" ); |
850 _LIT( KPanicTxt, "UpdatePath" ); |
857 __ASSERT_ALWAYS( iEngine, User::Panic( KPanicTxt, 0 )); |
851 __ASSERT_ALWAYS( iEngine, User::Panic( KPanicTxt, 0 )); |