--- a/mtpdataproviders/mtpimagedp/inc/cmtpimagedpobjectpropertymgr.h Fri Feb 19 23:40:44 2010 +0200
+++ b/mtpdataproviders/mtpimagedp/inc/cmtpimagedpobjectpropertymgr.h Fri Mar 12 15:46:41 2010 +0200
@@ -41,6 +41,9 @@
class CFileStore;
class CMTPTypeString;
class CMTPObjectMetaData;
+class CMTPImageDataProvider;
+class CMTPTypeOpaqueData;
+class CMTPTypeArray;
/**
Manage picture object properties
@@ -52,7 +55,7 @@
{
public:
- static CMTPImageDpObjectPropertyMgr* NewL(MMTPDataProviderFramework& aFramework);
+ static CMTPImageDpObjectPropertyMgr* NewL(MMTPDataProviderFramework& aFramework, CMTPImageDataProvider& aDataProvider);
~CMTPImageDpObjectPropertyMgr();
void SetCurrentObjectL(CMTPObjectMetaData& aObjectInfo, TBool aRequireForModify, TBool aSaveToCache = EFalse);
@@ -67,12 +70,16 @@
void GetPropertyL(TMTPObjectPropertyCode aProperty, TUint32& aValue);
void GetPropertyL(TMTPObjectPropertyCode aProperty, TUint64& aValue);
void GetPropertyL(TMTPObjectPropertyCode aProperty, TMTPTypeUint128& aValue);
- void GetPropertyL(TMTPObjectPropertyCode aProperty, CMTPTypeString& aValue);
+ void GetPropertyL(TMTPObjectPropertyCode aProperty, CMTPTypeString& aValue);
+ void GetPropertyL(TMTPObjectPropertyCode aProperty, CMTPTypeArray& aValue);
//clear the cache
void ClearCacheL();
void ConvertMTPTimeStr2TTimeL(const TDesC& aTimeString, TTime& aModifiedTime) const;
+ void StoreThunmnail(TUint aHandle, HBufC8* aData);
+ HBufC8* Thumbnail(TUint aHandle);
+
public:
void SetMdeSessionError(TInt aError);
CMdESession& MdeSession();
@@ -82,7 +89,7 @@
void HandleSessionError(CMdESession& aSession, TInt aError);
private:
- CMTPImageDpObjectPropertyMgr(MMTPDataProviderFramework& aFramework);
+ CMTPImageDpObjectPropertyMgr(MMTPDataProviderFramework& aFramework, CMTPImageDataProvider& aDataProvider);
void ConstructL(MMTPDataProviderFramework& aFramework);
TBool GetYear(const TDesC& aDateString, TInt& aYear) const;
@@ -96,9 +103,11 @@
void SetProperty2CacheL(TMTPObjectPropertyCode aProperty, TAny* aValue);
void GetPropertyFromMdsL(TMTPObjectPropertyCode aProperty, TAny* aValue);
- TUint32 ParseImageFileL(const TDesC& aUri, TMTPObjectPropertyCode aPropCode);
void RemoveProperty(CMdEObject& aObject, CMdEPropertyDef& aPropDef);
+ void OpenMdeObjectL();
+ void ClearThumnailCache();
+
private:
//define property cache object
@@ -177,21 +186,38 @@
static const TElementMetaData KElements[];
};
+ /**
+ * Thumbnail cache used for winlogo test
+ */
+ struct TThumbnailCache
+ {
+ TUint iObjectHandle;
+ HBufC8* iThumbnailData;
+ };
+
private:
/**
FLOGGER debug trace member variable.
*/
__FLOG_DECLARATION_MEMBER_MUTABLE;
+ MMTPDataProviderFramework& iFramework;
+ CMTPImageDataProvider& iDataProvider;
CActiveSchedulerWait* iActiveSchedulerWait;
CMdESession* iMetaDataSession;
TInt iMdeSessionError;
- CMdEObject* iObject;
+ CMdEObject* iObject;//used for read properties from MdS
RFs& iFs;
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
+ */
+ TThumbnailCache iThumbnailCache;
/**
* Cache the latest image properties which PC send to device,