imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailserver.cpp
changeset 15 7197e789b953
parent 14 2edacbf5d3f9
child 17 ffa62e555b02
equal deleted inserted replaced
14:2edacbf5d3f9 15:7197e789b953
   217     
   217     
   218     // create shutdown observer
   218     // create shutdown observer
   219     iShutdownObserver = CTMShutdownObserver::NewL( *this, KTMPSNotification, KShutdown, ETrue );  
   219     iShutdownObserver = CTMShutdownObserver::NewL( *this, KTMPSNotification, KShutdown, ETrue );  
   220     iShutdown = EFalse;
   220     iShutdown = EFalse;
   221     
   221     
       
   222     // MDS session reconnect timer
       
   223     iReconnect = CPeriodic::NewL(CActive::EPriorityIdle);
       
   224     
   222     // connect to MDS
   225     // connect to MDS
   223     iMdESession = CMdESession::NewL( *this );
   226     iMdESession = CMdESession::NewL( *this );
   224     
   227     
   225     User::LeaveIfError( iFbsSession.Connect());
   228     User::LeaveIfError( iFbsSession.Connect());
   226     User::LeaveIfError( Start( KThumbnailServerName ));
   229     User::LeaveIfError( Start( KThumbnailServerName ));
   249     iFormatting = EFalse;
   252     iFormatting = EFalse;
   250     
   253     
   251     //OpenStoresL();
   254     //OpenStoresL();
   252     
   255     
   253     AddUnmountObserversL();
   256     AddUnmountObserversL();
   254     
       
   255     iReconnect = CPeriodic::NewL(CActive::EPriorityIdle);
       
   256     }
   257     }
   257 
   258 
   258 
   259 
   259 // ---------------------------------------------------------------------------
   260 // ---------------------------------------------------------------------------
   260 // Destructor.
   261 // Destructor.
   482     TN_DEBUG4( 
   483     TN_DEBUG4( 
   483         "CThumbnailServer::AddBitmapToPoolL(aSession=0x%08x, aBitmap=0x%08x), handle=%d", aSession, aBitmap, aBitmap->Handle());
   484         "CThumbnailServer::AddBitmapToPoolL(aSession=0x%08x, aBitmap=0x%08x), handle=%d", aSession, aBitmap, aBitmap->Handle());
   484 
   485 
   485     TThumbnailBitmapRef* ptr = iBitmapPool.Find( aBitmap->Handle());
   486     TThumbnailBitmapRef* ptr = iBitmapPool.Find( aBitmap->Handle());
   486 
   487 
   487     TN_DEBUG2( "CThumbnailServer::AddBitmapToPoolL() - id = %d", aRequestId.iRequestId );
   488     TN_DEBUG2( "CThumbnailServer::AddBitmapToPoolL() - req id = %d", aRequestId.iRequestId );
   488     
   489     
   489     if ( ptr )
   490     if ( ptr )
   490         {
   491         {
   491         ptr->iRefCount++;
   492         ptr->iRefCount++;
   492         }
   493         }
   603 
   604 
   604 // -----------------------------------------------------------------------------
   605 // -----------------------------------------------------------------------------
   605 // CThumbnailServer::ResolveMimeTypeL()
   606 // CThumbnailServer::ResolveMimeTypeL()
   606 // -----------------------------------------------------------------------------
   607 // -----------------------------------------------------------------------------
   607 //
   608 //
   608 TDataType CThumbnailServer::ResolveMimeTypeL( RFile& aFile )
   609 TDataType CThumbnailServer::ResolveMimeTypeL( RFile64& aFile )
   609     {
   610     {
   610     TN_DEBUG1( "CThumbnailStore::ResolveMimeTypeL()");
   611     TN_DEBUG1( "CThumbnailStore::ResolveMimeTypeL()");
   611     RFile tmp = aFile;
   612     RFile64 tmp = aFile;
   612     
   613     
   613     // check if DRM
   614     // check if DRM
   614     ContentAccess::CData* data = ContentAccess::CData::NewLC( 
   615     ContentAccess::CData* data = ContentAccess::CData::NewLC( 
   615             tmp, ContentAccess::KDefaultContentObject, ContentAccess::EPeek );
   616             tmp, ContentAccess::KDefaultContentObject, ContentAccess::EPeek );
   616 
   617