mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp
changeset 22 a5c0bb5018eb
parent 20 6e82ae192c3a
child 28 85e0c0339cc3
equal deleted inserted replaced
20:6e82ae192c3a 22:a5c0bb5018eb
   396         }
   396         }
   397         break;
   397         break;
   398         
   398         
   399     case EFormatExtensionSets:
   399     case EFormatExtensionSets:
   400         {
   400         {
   401         _LIT(KFormatExtensionJpg, "0x3801:jpg::3");//3 means file dp will enumerate all image files instead of image dp.
   401         _LIT(KFormatExtensionJpg, "0x3801:jpg:::3");//3 means file dp will enumerate all image files instead of image dp.
   402         aStrings.AppendL(KFormatExtensionJpg);
   402         aStrings.AppendL(KFormatExtensionJpg);
   403         _LIT(KFormatExtensionJpe, "0x3801:jpe::3");
   403         _LIT(KFormatExtensionJpe, "0x3801:jpe:::3");
   404         aStrings.AppendL(KFormatExtensionJpe);
   404         aStrings.AppendL(KFormatExtensionJpe);
   405         _LIT(KFormatExtensionJpeg, "0x3801:jpeg::3");
   405         _LIT(KFormatExtensionJpeg, "0x3801:jpeg:::3");
   406         aStrings.AppendL(KFormatExtensionJpeg);
   406         aStrings.AppendL(KFormatExtensionJpeg);
   407         
   407         
   408         /*
   408         /*
   409          * bmp files
   409          * bmp files
   410          */
   410          */
   411         _LIT(KFormatExtensionBmp, "0x3804:bmp::3");
   411         _LIT(KFormatExtensionBmp, "0x3804:bmp:::3");
   412         aStrings.AppendL(KFormatExtensionBmp);
   412         aStrings.AppendL(KFormatExtensionBmp);
   413         
   413         
   414         /*
   414         /*
   415          * gif files
   415          * gif files
   416          */
   416          */
   417         _LIT(KFormatExtensionGif, "0x3807:gif::3");
   417         _LIT(KFormatExtensionGif, "0x3807:gif:::3");
   418         aStrings.AppendL(KFormatExtensionGif);
   418         aStrings.AppendL(KFormatExtensionGif);
   419         
   419         
   420         /*
   420         /*
   421          * png files
   421          * png files
   422          */
   422          */
   423         _LIT(KFormatExtensionPng, "0x380B:png::3");
   423         _LIT(KFormatExtensionPng, "0x380B:png:::3");
   424         aStrings.AppendL(KFormatExtensionPng);
   424         aStrings.AppendL(KFormatExtensionPng);
   425         
   425         
   426         /*
   426         /*
   427          * tif, tiff files
   427          * tif, tiff files
   428          */
   428          */
   721     CleanupStack::PopAndDestroy(&context);
   721     CleanupStack::PopAndDestroy(&context);
   722     
   722     
   723     return newPictures;
   723     return newPictures;
   724     }
   724     }
   725 
   725 
   726 TBool CMTPImageDataProvider::GetCacheParentHandle(const TDesC& aParentPath, TUint32& aParentHandle)
       
   727     {
       
   728     TBool ret = EFalse;
       
   729     
       
   730     if (iParentCache.iPath.Compare(aParentPath) == 0)
       
   731         {
       
   732         aParentHandle = iParentCache.iHandle;
       
   733         ret = ETrue;
       
   734         }
       
   735     else
       
   736         {
       
   737         aParentHandle = KMTPHandleNone;
       
   738         }
       
   739     
       
   740     return ret;
       
   741     }
       
   742 
       
   743 void CMTPImageDataProvider::SetCacheParentHandle(const TDesC& aParentPath, TUint32 aParentHandle)
       
   744     {
       
   745     iParentCache.iPath.Copy(aParentPath);
       
   746     iParentCache.iHandle = aParentHandle;
       
   747     }
       
   748 
       
   749 void CMTPImageDataProvider::AppendDeleteObjectsArrayL(const TDesC& aSuid)
   726 void CMTPImageDataProvider::AppendDeleteObjectsArrayL(const TDesC& aSuid)
   750     {
   727     {
   751     iDeleteObjectsArray.AppendL(aSuid.AllocLC());
   728     iDeleteObjectsArray.AppendL(aSuid.AllocLC());
   752     CleanupStack::Pop();
   729     CleanupStack::Pop();
   753     }
   730     }