imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailserver.cpp
branchRCL_3
changeset 9 dea39715fc05
parent 8 7403edfcf0fb
child 10 ee674526fac5
--- a/imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailserver.cpp	Mon Mar 15 12:41:55 2010 +0200
+++ b/imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailserver.cpp	Wed Mar 31 22:04:49 2010 +0300
@@ -36,7 +36,6 @@
 #include "thumbnailcenrep.h"
 #include "thumbnailmemorycardobserver.h"
 #include "tmgetimei.h"
-//#include "thumbnailfetchedchecker.h"
 
 
 _LIT8( KThumbnailMimeWildCard, "*" );
@@ -220,6 +219,9 @@
     iShutdownObserver = CTMShutdownObserver::NewL( *this, KTMPSNotification, KShutdown, ETrue );  
     iShutdown = EFalse;
     
+    // MDS session reconnect timer
+    iReconnect = CPeriodic::NewL(CActive::EPriorityIdle);
+    
     // connect to MDS
     iMdESession = CMdESession::NewL( *this );
     
@@ -252,10 +254,6 @@
     //OpenStoresL();
     
     AddUnmountObserversL();
-    
-    iReconnect = CPeriodic::NewL(CActive::EPriorityIdle);
-	
-    //iFetchedChecker = CThumbnailFetchedChecker::NewL();
     }
 
 
@@ -269,7 +267,6 @@
 
     iShutdown = ETrue;
     
-    //delete iFetchedChecker;
     delete iShutdownObserver;
     delete iProcessor;
     
@@ -539,10 +536,6 @@
         {
         TN_DEBUG1( "CThumbnailServer::StoreThumbnailL() - file doesn't exists anymore, skip store!");
         }
-	/*if( iFetchedChecker )
-		{	
-    	iFetchedChecker->SetFetchResult( aPath, KErrNone );
-		}*/
     }
 
 
@@ -554,17 +547,8 @@
     aThumbnail, TDesC8* & aData, const TThumbnailSize aThumbnailSize, TSize &aOriginalSize )
     {
     TN_DEBUG3( "CThumbnailServer::FetchThumbnailL(aPath=%S aThumbnailSize=%d)", &aPath, aThumbnailSize );
+
     StoreForPathL( aPath )->FetchThumbnailL( aPath, aThumbnail, aData, aThumbnailSize, aOriginalSize);
-/*    TInt err( iFetchedChecker->LastFetchResult( aPath ) );
-    if ( err == KErrNone ) // To avoid useless sql gets that fails for sure
-        {
-        TRAP( err, StoreForPathL( aPath )->FetchThumbnailL( aPath, aThumbnail, aData, aThumbnailSize, aOriginalSize) );
-        if ( err != KErrNone )
-            {
-            iFetchedChecker->SetFetchResult( aPath, err );
-            }
-        }
-    User::LeaveIfError( err );*/
     }
 
 
@@ -616,21 +600,16 @@
     TN_DEBUG2( "CThumbnailServer::DeleteThumbnailsL(%S)", &aPath);
     
     StoreForPathL( aPath )->DeleteThumbnailsL( aPath );
-	/*
-	if( iFetchedChecker )
-		{
-    	iFetchedChecker->SetFetchResult( aPath, KErrNone );
-		}*/
     }
 
 // -----------------------------------------------------------------------------
 // CThumbnailServer::ResolveMimeTypeL()
 // -----------------------------------------------------------------------------
 //
-TDataType CThumbnailServer::ResolveMimeTypeL( RFile& aFile )
+TDataType CThumbnailServer::ResolveMimeTypeL( RFile64& aFile )
     {
     TN_DEBUG1( "CThumbnailStore::ResolveMimeTypeL()");
-    RFile tmp = aFile;
+    RFile64 tmp = aFile;
     
     // check if DRM
     ContentAccess::CData* data = ContentAccess::CData::NewLC(