34 #include "thumbnaildiskunmountobserver.h" |
34 #include "thumbnaildiskunmountobserver.h" |
35 #include "thumbnailpanic.h" |
35 #include "thumbnailpanic.h" |
36 #include "thumbnailcenrep.h" |
36 #include "thumbnailcenrep.h" |
37 #include "thumbnailmemorycardobserver.h" |
37 #include "thumbnailmemorycardobserver.h" |
38 #include "tmgetimei.h" |
38 #include "tmgetimei.h" |
|
39 //#include "thumbnailfetchedchecker.h" |
39 |
40 |
40 |
41 |
41 _LIT8( KThumbnailMimeWildCard, "*" ); |
42 _LIT8( KThumbnailMimeWildCard, "*" ); |
42 _LIT8( KThumbnailMimeImage, "image" ); |
43 _LIT8( KThumbnailMimeImage, "image" ); |
43 _LIT8( KThumbnailMimeVideo, "video" ); |
44 _LIT8( KThumbnailMimeVideo, "video" ); |
482 TN_DEBUG4( |
486 TN_DEBUG4( |
483 "CThumbnailServer::AddBitmapToPoolL(aSession=0x%08x, aBitmap=0x%08x), handle=%d", aSession, aBitmap, aBitmap->Handle()); |
487 "CThumbnailServer::AddBitmapToPoolL(aSession=0x%08x, aBitmap=0x%08x), handle=%d", aSession, aBitmap, aBitmap->Handle()); |
484 |
488 |
485 TThumbnailBitmapRef* ptr = iBitmapPool.Find( aBitmap->Handle()); |
489 TThumbnailBitmapRef* ptr = iBitmapPool.Find( aBitmap->Handle()); |
486 |
490 |
487 TN_DEBUG2( "CThumbnailServer::AddBitmapToPoolL() - id = %d", aRequestId.iRequestId ); |
491 TN_DEBUG2( "CThumbnailServer::AddBitmapToPoolL() - req id = %d", aRequestId.iRequestId ); |
488 |
492 |
489 if ( ptr ) |
493 if ( ptr ) |
490 { |
494 { |
491 ptr->iRefCount++; |
495 ptr->iRefCount++; |
492 } |
496 } |
533 } |
537 } |
534 else |
538 else |
535 { |
539 { |
536 TN_DEBUG1( "CThumbnailServer::StoreThumbnailL() - file doesn't exists anymore, skip store!"); |
540 TN_DEBUG1( "CThumbnailServer::StoreThumbnailL() - file doesn't exists anymore, skip store!"); |
537 } |
541 } |
|
542 /*if( iFetchedChecker ) |
|
543 { |
|
544 iFetchedChecker->SetFetchResult( aPath, KErrNone ); |
|
545 }*/ |
538 } |
546 } |
539 |
547 |
540 |
548 |
541 // ----------------------------------------------------------------------------- |
549 // ----------------------------------------------------------------------------- |
542 // CThumbnailServer::FetchThumbnailL() |
550 // CThumbnailServer::FetchThumbnailL() |
544 // |
552 // |
545 void CThumbnailServer::FetchThumbnailL( const TDesC& aPath, CFbsBitmap* & |
553 void CThumbnailServer::FetchThumbnailL( const TDesC& aPath, CFbsBitmap* & |
546 aThumbnail, TDesC8* & aData, const TThumbnailSize aThumbnailSize, TSize &aOriginalSize ) |
554 aThumbnail, TDesC8* & aData, const TThumbnailSize aThumbnailSize, TSize &aOriginalSize ) |
547 { |
555 { |
548 TN_DEBUG3( "CThumbnailServer::FetchThumbnailL(aPath=%S aThumbnailSize=%d)", &aPath, aThumbnailSize ); |
556 TN_DEBUG3( "CThumbnailServer::FetchThumbnailL(aPath=%S aThumbnailSize=%d)", &aPath, aThumbnailSize ); |
549 |
|
550 StoreForPathL( aPath )->FetchThumbnailL( aPath, aThumbnail, aData, aThumbnailSize, aOriginalSize); |
557 StoreForPathL( aPath )->FetchThumbnailL( aPath, aThumbnail, aData, aThumbnailSize, aOriginalSize); |
|
558 /* TInt err( iFetchedChecker->LastFetchResult( aPath ) ); |
|
559 if ( err == KErrNone ) // To avoid useless sql gets that fails for sure |
|
560 { |
|
561 TRAP( err, StoreForPathL( aPath )->FetchThumbnailL( aPath, aThumbnail, aData, aThumbnailSize, aOriginalSize) ); |
|
562 if ( err != KErrNone ) |
|
563 { |
|
564 iFetchedChecker->SetFetchResult( aPath, err ); |
|
565 } |
|
566 } |
|
567 User::LeaveIfError( err );*/ |
551 } |
568 } |
552 |
569 |
553 |
570 |
554 |
571 |
555 // ----------------------------------------------------------------------------- |
572 // ----------------------------------------------------------------------------- |
597 void CThumbnailServer::DeleteThumbnailsL( const TDesC& aPath ) |
614 void CThumbnailServer::DeleteThumbnailsL( const TDesC& aPath ) |
598 { |
615 { |
599 TN_DEBUG2( "CThumbnailServer::DeleteThumbnailsL(%S)", &aPath); |
616 TN_DEBUG2( "CThumbnailServer::DeleteThumbnailsL(%S)", &aPath); |
600 |
617 |
601 StoreForPathL( aPath )->DeleteThumbnailsL( aPath ); |
618 StoreForPathL( aPath )->DeleteThumbnailsL( aPath ); |
|
619 /* |
|
620 if( iFetchedChecker ) |
|
621 { |
|
622 iFetchedChecker->SetFetchResult( aPath, KErrNone ); |
|
623 }*/ |
602 } |
624 } |
603 |
625 |
604 // ----------------------------------------------------------------------------- |
626 // ----------------------------------------------------------------------------- |
605 // CThumbnailServer::ResolveMimeTypeL() |
627 // CThumbnailServer::ResolveMimeTypeL() |
606 // ----------------------------------------------------------------------------- |
628 // ----------------------------------------------------------------------------- |