mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp
branchRCL_3
changeset 43 4a793f564d72
parent 42 0aa8cc770c8a
child 45 74aa6861c87d
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp	Tue Aug 31 16:03:15 2010 +0300
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp	Wed Sep 01 12:20:56 2010 +0100
@@ -454,23 +454,21 @@
          */
         TEntry fileEntry;
         TInt err = iFs.Entry(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), fileEntry);
-        CMTPImageDpThumbnailCreator* tnc = iDataProvider.ThumbnailManager();
-        if (err == KErrNone && tnc != NULL)
+        if (err == KErrNone)
             {
-            
             if(fileEntry.FileSize() > KFileSizeMax || !alwaysCreate)
                 {
-                tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate);
+                iDataProvider.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate);
                 }
             else
                 {
-                tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags);
+                iDataProvider.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags);
                 }
             
             /**
              * trap the leave to avoid return general error when PC get object property list
              */
-            TRAP(err, tnc->GetThumbnailL(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), iThumbnailCache.iThumbnailData, err));
+            TRAP(err, iDataProvider.ThumbnailManager().GetThumbnailL(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), iThumbnailCache.iThumbnailData, err));
             if (err == KErrNone)
                 {
                 iThumbnailCache.iObjectHandle = iObjectInfo->Uint(CMTPObjectMetaData::EHandle);                        
@@ -486,10 +484,6 @@
                     }
                 }
             }
-        else
-            {
-            aValue = KThumbCompressedSize;
-            }
         }
         break;       
        
@@ -605,23 +599,22 @@
              */
             TEntry fileEntry;
             TInt err = iFs.Entry(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), fileEntry);
-            CMTPImageDpThumbnailCreator* tnc = iDataProvider.ThumbnailManager();
-            if (err == KErrNone && tnc != NULL)
+            if (err == KErrNone)
                 {
                 
                 if(fileEntry.FileSize() > KFileSizeMax || !alwaysCreate)
                     {
-                    tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate);
+                    iDataProvider.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDoNotCreate);
                     }
                 else
                     {
-                    tnc->GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags);
+                    iDataProvider.ThumbnailManager().GetThumbMgr()->SetFlagsL(CThumbnailManager::EDefaultFlags);
                     }
                 
                 /**
                  * trap the leave to avoid return general error when PC get object property list
                  */
-                TRAP(err, tnc->GetThumbnailL(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), iThumbnailCache.iThumbnailData, err));
+                TRAP(err, iDataProvider.ThumbnailManager().GetThumbnailL(iObjectInfo->DesC(CMTPObjectMetaData::ESuid), iThumbnailCache.iThumbnailData, err));
                 if (err == KErrNone)
                     {
                     iThumbnailCache.iObjectHandle = iObjectInfo->Uint(CMTPObjectMetaData::EHandle);