equal
deleted
inserted
replaced
33 |
33 |
34 class CMTPTypeOpaqueData; |
34 class CMTPTypeOpaqueData; |
35 |
35 |
36 #include "mtpdebug.h" |
36 #include "mtpdebug.h" |
37 |
37 |
|
38 class CMTPImageDataProvider; |
|
39 |
38 #define MTPTHUMBSCALING |
40 #define MTPTHUMBSCALING |
39 |
41 |
40 // CLASS DECLARATION |
42 // CLASS DECLARATION |
41 /** |
43 /** |
42 * A class for reading image related info and creating a thumbnail from |
44 * A class for reading image related info and creating a thumbnail from |
52 /** |
54 /** |
53 * Two-phased constructor. |
55 * Two-phased constructor. |
54 * @param None. |
56 * @param None. |
55 * @return An instance of CMTPImageDpThumbnailCreator. |
57 * @return An instance of CMTPImageDpThumbnailCreator. |
56 */ |
58 */ |
57 static CMTPImageDpThumbnailCreator* NewL(); |
59 static CMTPImageDpThumbnailCreator* NewL(CMTPImageDataProvider& aDataProvider); |
58 |
60 |
59 /** |
61 /** |
60 * C++ destructor. |
62 * C++ destructor. |
61 */ |
63 */ |
62 ~CMTPImageDpThumbnailCreator(); |
64 ~CMTPImageDpThumbnailCreator(); |
63 |
65 |
64 public: |
66 public: |
65 |
67 void GetThumbnailL(const TDesC& aFileName, HBufC8*& aDestinationData, TInt& result); |
66 /** |
|
67 * Gets a thumbnail from the image. |
|
68 * @since S60 3.2 |
|
69 * @param aSession, Reference to file server. |
|
70 * @param aFileName, Name of the image file. Caller must ensure that the referenced object exists until the asynchronous call is completed. |
|
71 * @param aThumbName, Name of the thumbnail file to be created. Caller must ensure that the referenced object exists until the asynchronous call is completed. |
|
72 * @param aGetThumbnailStatus, status when |
|
73 */ |
|
74 void GetThumbnailL(const TDesC& aFileName, CMTPTypeOpaqueData& aThumbName, TInt& result); |
|
75 |
68 |
76 |
69 |
77 void ClearThumbnailData(); |
70 void ClearThumbnailData(); |
78 CThumbnailManager* GetThumbMgr() { return iThumbMgr;} |
71 CThumbnailManager* GetThumbMgr() { return iThumbMgr;} |
79 |
72 |
103 |
96 |
104 private: |
97 private: |
105 /** |
98 /** |
106 * Default C++ constructor. Not used. |
99 * Default C++ constructor. Not used. |
107 */ |
100 */ |
108 CMTPImageDpThumbnailCreator(); |
101 CMTPImageDpThumbnailCreator(CMTPImageDataProvider& aDataProvider); |
109 |
102 |
110 /** |
103 /** |
111 * 2nd phase constructor. |
104 * 2nd phase constructor. |
112 */ |
105 */ |
113 void ConstructL(); |
106 void ConstructL(); |
122 EIdle, |
115 EIdle, |
123 EGetting, |
116 EGetting, |
124 EGetted, |
117 EGetted, |
125 EScaling, |
118 EScaling, |
126 EEncoding} iState; |
119 EEncoding} iState; |
|
120 |
|
121 CMTPImageDataProvider& iDataProvider; |
127 TThumbnailRequestId iCurrentReq; |
122 TThumbnailRequestId iCurrentReq; |
128 TInt* iCreationErr; |
123 TInt* iCreationErr; |
129 CFbsBitmap* iBitmap; |
124 CFbsBitmap* iBitmap; |
130 CImageEncoder* iImgEnc; |
125 CImageEncoder* iImgEnc; |
131 #ifdef MTPTHUMBSCALING |
126 #ifdef MTPTHUMBSCALING |
132 CBitmapScaler* iScaler; |
127 CBitmapScaler* iScaler; |
133 #endif |
128 #endif |
134 HBufC8* iData; |
129 HBufC8* iData; |
135 CThumbnailManager* iThumbMgr; |
130 CThumbnailManager* iThumbMgr; |
136 CThumbnailObjectSource* iObjectSource; |
131 CThumbnailObjectSource* iObjectSource; |
137 CMTPTypeOpaqueData* iBuffer; //not owned |
|
138 CActiveSchedulerWait* iActiveSchedulerWait; |
132 CActiveSchedulerWait* iActiveSchedulerWait; |
139 }; |
133 }; |
140 |
134 |
141 #endif // CMTPIMAGEDPTHUMBNAILCREATOR_H |
135 #endif // CMTPIMAGEDPTHUMBNAILCREATOR_H |