mtpdataproviders/mtpimagedp/inc/cmtpimagedpthumbnailcreator.h
changeset 17 aabe5387f5ce
parent 0 d0791faffa3f
child 47 63cf70d3ecd8
--- a/mtpdataproviders/mtpimagedp/inc/cmtpimagedpthumbnailcreator.h	Tue Feb 02 01:11:40 2010 +0200
+++ b/mtpdataproviders/mtpimagedp/inc/cmtpimagedpthumbnailcreator.h	Fri Mar 19 09:40:39 2010 +0200
@@ -35,6 +35,8 @@
 
 #include "mtpdebug.h"
 
+class CMTPImageDataProvider;
+
 #define MTPTHUMBSCALING
 
 // CLASS DECLARATION
@@ -54,7 +56,7 @@
      * @param None.
      * @return An instance of CMTPImageDpThumbnailCreator.
      */
-    static CMTPImageDpThumbnailCreator* NewL();
+    static CMTPImageDpThumbnailCreator* NewL(CMTPImageDataProvider& aDataProvider);
 
     /**
      * C++ destructor.
@@ -62,16 +64,7 @@
     ~CMTPImageDpThumbnailCreator();
     
 public:
-
-    /**
-     * Gets a thumbnail from the image.
-     * @since S60 3.2
-     * @param aSession, Reference to file server.
-     * @param aFileName, Name of the image file. Caller must ensure that the referenced object exists until the asynchronous call is completed.
-     * @param aThumbName, Name of the thumbnail file to be created. Caller must ensure that the referenced object exists until the asynchronous call is completed.
-     * @param aGetThumbnailStatus, status when 
-     */
-    void GetThumbnailL(const TDesC& aFileName, CMTPTypeOpaqueData& aThumbName, TInt& result);
+    void GetThumbnailL(const TDesC& aFileName, HBufC8*& aDestinationData, TInt& result);
 
 
     void ClearThumbnailData();
@@ -105,7 +98,7 @@
     /**
      * Default C++ constructor. Not used.
      */
-    CMTPImageDpThumbnailCreator();
+    CMTPImageDpThumbnailCreator(CMTPImageDataProvider& aDataProvider);
 
     /**
      * 2nd phase constructor.
@@ -124,6 +117,8 @@
         EGetted,
         EScaling,
         EEncoding}          iState;
+        
+    CMTPImageDataProvider&  iDataProvider;
     TThumbnailRequestId     iCurrentReq;
     TInt*                   iCreationErr;
     CFbsBitmap*             iBitmap;
@@ -134,7 +129,6 @@
     HBufC8*                 iData;
     CThumbnailManager*      iThumbMgr;
     CThumbnailObjectSource* iObjectSource;
-    CMTPTypeOpaqueData*     iBuffer;             //not owned
     CActiveSchedulerWait*   iActiveSchedulerWait;
     };