diff -r 81da3301b632 -r f85613f12947 mtpdataproviders/mtpimagedp/inc/cmtpimagedpobjectpropertymgr.h --- a/mtpdataproviders/mtpimagedp/inc/cmtpimagedpobjectpropertymgr.h Wed Jun 09 10:36:33 2010 +0300 +++ b/mtpdataproviders/mtpimagedp/inc/cmtpimagedpobjectpropertymgr.h Mon Jun 21 16:36:59 2010 +0300 @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -74,7 +75,8 @@ void GetPropertyL(TMTPObjectPropertyCode aProperty, CMTPTypeArray& aValue, TBool alwaysCreate = ETrue); //clear the cache - void ClearCacheL(); + void ClearAllCache(); + void ClearCache(TUint aHandle); void ConvertMTPTimeStr2TTimeL(const TDesC& aTimeString, TTime& aModifiedTime) const; void StoreThunmnail(TUint aHandle, HBufC8* aData); @@ -108,6 +110,9 @@ void OpenMdeObjectL(); void ClearThumnailCache(); + TBool FindPropertiesCache(TUint aObjectHandle); + void DestroyPropertiesCahce(TUint aObjectHandle); + private: //define property cache object @@ -123,7 +128,6 @@ EImagePixHeight = 1, EImageBitDepth = 2, EDateCreated = 3, - /** The number of elements. */ @@ -138,11 +142,9 @@ const TDesC& DesC(TUint aId) const; TUint Uint(TUint aId) const; - TUint ObjectHandle() const; void SetDesCL(TUint aId, const TDesC& aValue); - void SetUint(TUint aId, TUint aValue); - void SetObjectHandle(TUint aObjectHandle); + void SetUint(TUint aId, TUint aValue); private: @@ -178,11 +180,6 @@ */ RArray iElementsUint; - /** - The object handle of owner - */ - TUint iObjectHandle; - static const TElementMetaData KElements[]; }; @@ -211,7 +208,6 @@ MMTPObjectMgr& iObjectMgr; CMTPObjectMetaData* iObjectInfo; //not owned TBool iCacheHit;//flag to indicate cache is available - TBool iNeedParse;//flag to indicate whether we need to parse image file by our self /* * Cache thumbnail, thumbnail size is inconsistent in winlogo test @@ -222,7 +218,8 @@ * Cache the latest image properties which PC send to device, * it can optimize synce/reverse-sync performance due to reduction of object properties generation */ - CMTPImagePropertiesCache* iPropertiesCache; + CMTPImagePropertiesCache* iCurrentPropertiesCache; + RHashMap iPropretiesCacheMap; }; #endif // CMTPIMAGEDPOBJECTPROPERTYMGR_H