imagehandlingutilities/thumbnailmanager/thumbnailclient/src/thumbnailmanagerimpl.cpp
changeset 29 4bdfb6b5c9b4
parent 22 a67f74060682
child 30 b67379558a75
child 37 f759b6186ab5
equal deleted inserted replaced
25:cb86b71cae0a 29:4bdfb6b5c9b4
    45 // Destructor.
    45 // Destructor.
    46 // ---------------------------------------------------------------------------
    46 // ---------------------------------------------------------------------------
    47 //
    47 //
    48 CThumbnailManagerImpl::~CThumbnailManagerImpl()
    48 CThumbnailManagerImpl::~CThumbnailManagerImpl()
    49     {
    49     {
    50     delete iRequestQueue;   
    50     TN_DEBUG1( "CThumbnailManagerImpl::~CThumbnailManagerImpl() - start" );
       
    51 	
       
    52     delete iRequestQueue;  
       
    53     iRequestQueue = NULL;
       
    54     
    51     iSession.Close();
    55     iSession.Close();
    52     iFs.Close();
    56     iFs.Close();
    53 
    57 
    54     // Check if we need to disconnect Fbs
    58     // Check if we need to disconnect Fbs
    55     TInt sessionCount = (TInt)Dll::Tls(); 
    59     TInt sessionCount = (TInt)Dll::Tls(); 
    63 	    TN_DEBUG2( "CThumbnailManagerImpl::~CThumbnailManagerImpl() - update sessionCount == %d to TLS", sessionCount );
    67 	    TN_DEBUG2( "CThumbnailManagerImpl::~CThumbnailManagerImpl() - update sessionCount == %d to TLS", sessionCount );
    64         Dll::SetTls( (TAny*)sessionCount );
    68         Dll::SetTls( (TAny*)sessionCount );
    65         }
    69         }
    66 
    70 
    67     delete iMimeTypeList;
    71     delete iMimeTypeList;
       
    72 	
       
    73 	TN_DEBUG1( "CThumbnailManagerImpl::~CThumbnailManagerImpl() - end" );
    68     }
    74     }
    69 
    75 
    70 
    76 
    71 // ---------------------------------------------------------------------------
    77 // ---------------------------------------------------------------------------
    72 // CThumbnailManagerImpl::NewLC()
    78 // CThumbnailManagerImpl::NewLC()
    92     aObserver ): iObserver( aObserver ), iRequestObserver( NULL ), iDisplayMode(
    98     aObserver ): iObserver( aObserver ), iRequestObserver( NULL ), iDisplayMode(
    93     KThumbnailDefaultDisplayMode ), iFlags( EDefaultFlags ), iQualityPreference
    99     KThumbnailDefaultDisplayMode ), iFlags( EDefaultFlags ), iQualityPreference
    94     ( EOptimizeForQuality ), iRequestId( 0 )
   100     ( EOptimizeForQuality ), iRequestId( 0 )
    95     {
   101     {
    96     // No implementation required
   102     // No implementation required
       
   103     TN_DEBUG1( "CThumbnailManagerImpl::CThumbnailManagerImpl()" );
    97     }
   104     }
    98 
   105 
    99 
   106 
   100 // ---------------------------------------------------------------------------
   107 // ---------------------------------------------------------------------------
   101 // CThumbnailManagerImpl::ConstructL()
   108 // CThumbnailManagerImpl::ConstructL()
   102 // Symbian 2nd phase constructor can leave.
   109 // Symbian 2nd phase constructor can leave.
   103 // ---------------------------------------------------------------------------
   110 // ---------------------------------------------------------------------------
   104 //
   111 //
   105 void CThumbnailManagerImpl::ConstructL()
   112 void CThumbnailManagerImpl::ConstructL()
   106     {
   113     {
       
   114     TN_DEBUG1( "CThumbnailManagerImpl::ConstructL - start");
       
   115     
   107     User::LeaveIfError( iSession.Connect());
   116     User::LeaveIfError( iSession.Connect());
   108     User::LeaveIfError( iFs.Connect());
   117     User::LeaveIfError( iFs.Connect());
   109     User::LeaveIfError( iFs.ShareProtected());
   118     User::LeaveIfError( iFs.ShareProtected());
   110 
   119 
   111     if ( !RFbsSession::GetSession() )
   120     if ( !RFbsSession::GetSession() )
   127             } 
   136             } 
   128         else
   137         else
   129             {
   138             {
   130             // Fbs connection was available in the beginning, no need to
   139             // Fbs connection was available in the beginning, no need to
   131             // increase the reference count
   140             // increase the reference count
       
   141             TN_DEBUG1( "CThumbnailManagerImpl::ConstructL - no need to update sessionCount");
   132             }
   142             }
   133         }
   143         }
   134     
   144     
   135     // request processor
   145     // request processor
   136     iRequestQueue = CThumbnailRequestQueue::NewL();
   146     iRequestQueue = CThumbnailRequestQueue::NewL();
       
   147     
       
   148     TN_DEBUG1( "CThumbnailManagerImpl::ConstructL - end");
   137     }
   149     }
   138 
   150 
   139 
   151 
   140 // ---------------------------------------------------------------------------
   152 // ---------------------------------------------------------------------------
   141 // CThumbnailManagerImpl::GetThumbnailL
   153 // CThumbnailManagerImpl::GetThumbnailL