132 * @param aFile File handle. |
132 * @param aFile File handle. |
133 * @param aMimeType MIME type. Optional, but should be specified if known. |
133 * @param aMimeType MIME type. Optional, but should be specified if known. |
134 */ |
134 */ |
135 void ConstructL( const RFile64& aFile, const TDesC& aMimeType ); |
135 void ConstructL( const RFile64& aFile, const TDesC& aMimeType ); |
136 |
136 |
137 private: |
|
138 // data |
|
139 |
|
140 /** |
|
141 * File |
|
142 */ |
|
143 RFile64 iFile; |
|
144 |
|
145 /** |
|
146 * Uri |
|
147 */ |
|
148 HBufC* iUri; // own |
|
149 |
|
150 /** |
|
151 * Mime type |
|
152 */ |
|
153 HBufC8* iMimeType; // own |
|
154 |
|
155 /** |
|
156 * Buffer |
|
157 */ |
|
158 TDesC8* iBuffer; // own |
|
159 |
|
160 /** |
|
161 * Bitmap |
|
162 */ |
|
163 |
|
164 CFbsBitmap* iBitmap; // own |
|
165 |
|
166 /** |
|
167 * ThumbnailId |
|
168 */ |
|
169 |
|
170 TThumbnailId iThumbnailId; //own |
|
171 |
|
172 public: |
|
173 /** |
137 /** |
174 * Symbian 2nd phase constructor can leave. |
138 * Symbian 2nd phase constructor can leave. |
175 * |
139 * |
176 * @since S60 v5.0 |
140 * @since S60 v5.0 |
177 * @param aURI URI. |
141 * @param aURI URI. |
178 * @param aMimeType MimeType. |
142 * @param aMimeType MimeType. |
179 * @param aThumbnailId ThumbnailId |
143 * @param aThumbnailId ThumbnailId |
180 */ |
144 */ |
181 void ConstructL( const TDesC& aUri, const TDesC& aMimeType, TThumbnailId aThumbnailId ); |
145 void ConstructL( const TDesC& aUri, const TDesC& aMimeType, TThumbnailId aThumbnailId ); |
|
146 |
|
147 /** |
|
148 * Symbian 2nd phase constructor can leave. |
|
149 * |
|
150 * @since S60 v5.0 |
|
151 * @param aBitmap Bitmap. |
|
152 * @param aURI URI. |
|
153 */ |
|
154 void ConstructL( CFbsBitmap* aBitmap, const TDesC& aUri ); |
|
155 |
|
156 /** |
|
157 * Symbian 2nd phase constructor can leave. |
|
158 * |
|
159 * @since S60 v5.0 |
|
160 * @param aBuffer Buffer. |
|
161 * @param aMimeType MIME type. Optional, but should be specified if known. |
|
162 * @param aURI URI. |
|
163 */ |
|
164 void ConstructL( TDesC8* aBuffer, const TDesC& aMimeType, const TDesC& aUri ); |
|
165 |
|
166 /** |
|
167 * Symbian 2nd phase constructor can leave. |
|
168 * |
|
169 * @since Symbian^3 |
|
170 * @param aUri Object URI or a full path to a file in the file system. |
|
171 * @param aTargetUri For linking the thumbnail to a different URI. |
|
172 * @param aMimeType MIME type. Optional, but should be specified if known. |
|
173 */ |
|
174 void ConstructL( const TDesC& aUri, const TDesC& aTargetUri, const TDesC& aMimeType ); |
|
175 |
|
176 private: |
|
177 // data |
|
178 |
|
179 /** |
|
180 * File |
|
181 */ |
|
182 RFile64 iFile; |
|
183 |
|
184 /** |
|
185 * Uri |
|
186 */ |
|
187 HBufC* iUri; // own |
|
188 |
|
189 /** |
|
190 * Mime type |
|
191 */ |
|
192 HBufC8* iMimeType; // own |
|
193 |
|
194 /** |
|
195 * Buffer |
|
196 */ |
|
197 TDesC8* iBuffer; // own |
|
198 |
|
199 /** |
|
200 * Bitmap |
|
201 */ |
|
202 CFbsBitmap* iBitmap; // own |
|
203 |
|
204 /** |
|
205 * ThumbnailId |
|
206 */ |
|
207 TThumbnailId iThumbnailId; //own |
|
208 |
|
209 /** |
|
210 * Uri |
|
211 */ |
|
212 HBufC* iTargetUri; // own |
|
213 |
|
214 public: |
182 |
215 |
183 /** |
216 /** |
184 * Construct a new CThumbnailObjectSource referring to a buffer |
217 * Construct a new CThumbnailObjectSource referring to a buffer |
185 * containing an image. |
218 * containing an image. |
186 * |
219 * |
209 * @param aBuffer Buffer. |
242 * @param aBuffer Buffer. |
210 * @param aUri Object URI or a full path to a file in the file system. |
243 * @param aUri Object URI or a full path to a file in the file system. |
211 * @since S60 v5.0 |
244 * @since S60 v5.0 |
212 * @return New CThumbnailObjectSource instance. |
245 * @return New CThumbnailObjectSource instance. |
213 */ |
246 */ |
214 IMPORT_C static CThumbnailObjectSource* NewL( TDesC8* aBuffer, TDesC& aMimeType, const TDesC& aUri ); |
247 IMPORT_C static CThumbnailObjectSource* NewL( TDesC8* aBuffer, TDesC& aMimeType, |
|
248 const TDesC& aUri ); |
215 |
249 |
216 /** |
250 /** |
217 * Construct a new CThumbnailObjectSource referring to a buffer |
251 * Construct a new CThumbnailObjectSource referring to a buffer |
218 * containing an image. |
252 * containing an image. |
219 * |
253 * |
221 * @param aMimeType MIME type. Optional, but should be specified if known. |
255 * @param aMimeType MIME type. Optional, but should be specified if known. |
222 * @param aUri Object URI or a full path to a file in the file system. |
256 * @param aUri Object URI or a full path to a file in the file system. |
223 * @since S60 v5.0 |
257 * @since S60 v5.0 |
224 * @return New CThumbnailObjectSource instance. |
258 * @return New CThumbnailObjectSource instance. |
225 */ |
259 */ |
226 IMPORT_C static CThumbnailObjectSource* NewLC( TDesC8* aBuffer, TDesC& aMimeType, const TDesC& aUri); |
260 IMPORT_C static CThumbnailObjectSource* NewLC( TDesC8* aBuffer, TDesC& aMimeType, |
|
261 const TDesC& aUri); |
227 |
262 |
228 /** |
263 /** |
229 * Construct a new CThumbnailObjectSource referring to an URI. |
264 * Construct a new CThumbnailObjectSource referring to an URI. |
230 * @param aUri Object URI or a full path to a file in the file system. |
265 * @param aUri Object URI or a full path to a file in the file system. |
231 * @param aMimeType MIME type. Optional, but should be specified if known. |
266 * @param aMimeType MIME type. Optional, but should be specified if known. |
232 * @since S60 v5.0 |
267 * @since S60 v5.0 |
233 * @return New CThumbnailObjectSource instance. |
268 * @return New CThumbnailObjectSource instance. |
234 */ |
269 */ |
235 IMPORT_C static CThumbnailObjectSource* NewL( const TDesC& aUri, |
270 IMPORT_C static CThumbnailObjectSource* NewL( const TDesC& aUri, |
236 TThumbnailId aThumbnailId = 0, const TDesC& aMimeType = KNullDesC ); |
271 TThumbnailId aThumbnailId = 0, const TDesC& aMimeType = KNullDesC ); |
237 |
272 |
238 /** |
273 /** |
239 * Construct a new CThumbnailObjectSource referring to an URI. |
274 * Construct a new CThumbnailObjectSource referring to an URI. |
240 * @param aUri Object URI or a full path to a file in the file system. |
275 * @param aUri Object URI or a full path to a file in the file system. |
241 * @param aMimeType MIME type. Optional, but should be specified if known. |
276 * @param aMimeType MIME type. Optional, but should be specified if known. |
242 * @since S60 v5.0 |
277 * @since S60 v5.0 |
243 * @return New CThumbnailObjectSource instance. |
278 * @return New CThumbnailObjectSource instance. |
244 */ |
279 */ |
245 IMPORT_C static CThumbnailObjectSource* NewLC( const TDesC& aUri, |
280 IMPORT_C static CThumbnailObjectSource* NewLC( const TDesC& aUri, |
246 TThumbnailId aThumbnailId = 0, const TDesC& aMimeType = KNullDesC ); |
281 TThumbnailId aThumbnailId = 0, const TDesC& aMimeType = KNullDesC ); |
247 |
282 |
248 |
|
249 /** |
283 /** |
250 * Returns source buffer. |
284 * Returns source buffer. |
251 * |
285 * |
252 * @since S60 v5.0 |
286 * @since S60 v5.0 |
253 * @return buffer |
287 * @return buffer |
274 /** |
308 /** |
275 * Gets ThumbnailId. |
309 * Gets ThumbnailId. |
276 * |
310 * |
277 * @since S60 v5.0 |
311 * @since S60 v5.0 |
278 * @return ThumbnailId |
312 * @return ThumbnailId |
279 */ |
313 */ |
280 |
314 IMPORT_C TThumbnailId Id(); |
281 IMPORT_C TThumbnailId Id(); |
|
282 |
|
283 /** |
|
284 * Symbian 2nd phase constructor can leave. |
|
285 * |
|
286 * @since S60 v5.0 |
|
287 * @param aBitmap Bitmap. |
|
288 * @param aURI URI. |
|
289 */ |
|
290 void ConstructL( CFbsBitmap* aBitmap, const TDesC& |
|
291 aUri ); |
|
292 |
|
293 /** |
|
294 * Symbian 2nd phase constructor can leave. |
|
295 * |
|
296 * @since S60 v5.0 |
|
297 * @param aBuffer Buffer. |
|
298 * @param aMimeType MIME type. Optional, but should be specified if known. |
|
299 * @param aURI URI. |
|
300 */ |
|
301 void ConstructL( TDesC8* aBuffer, const TDesC& |
|
302 aMimeType, const TDesC& aUri ); |
|
303 |
315 |
304 /** |
316 /** |
305 * Returns source bitmap. |
317 * Returns source bitmap. |
306 * |
318 * |
307 * @since S60 v5.0 |
319 * @since S60 v5.0 |
315 * |
327 * |
316 * @since S60 v5.0 |
328 * @since S60 v5.0 |
317 * @return bitmap |
329 * @return bitmap |
318 */ |
330 */ |
319 IMPORT_C CFbsBitmap* GetBitmapOwnership(); |
331 IMPORT_C CFbsBitmap* GetBitmapOwnership(); |
|
332 |
|
333 /** |
|
334 * Construct a new CThumbnailObjectSource referring to an URI. |
|
335 * @param aUri Object URI or a full path to a file in the file system. |
|
336 * @param aTargetUri For linking the thumbnail to a different URI. |
|
337 * @param aMimeType MIME type. Optional, but should be specified if known. |
|
338 * @since Symbian^3 |
|
339 * @return New CThumbnailObjectSource instance. |
|
340 */ |
|
341 IMPORT_C static CThumbnailObjectSource* NewL( const TDesC& aUri, |
|
342 const TDesC& aTargetUri, const TDesC& aMimeType ); |
|
343 |
|
344 /** |
|
345 * Construct a new CThumbnailObjectSource referring to an URI. |
|
346 * @param aUri Object URI or a full path to a file in the file system. |
|
347 * @param aTargetUri For linking the thumbnail to a different URI. |
|
348 * @param aMimeType MIME type. |
|
349 * @since Symbian^3 |
|
350 * @return New CThumbnailObjectSource instance. |
|
351 */ |
|
352 IMPORT_C static CThumbnailObjectSource* NewLC( const TDesC& aUri, |
|
353 const TDesC& aTargetUri, const TDesC& aMimeType ); |
|
354 |
|
355 /** |
|
356 * Returns target uri. |
|
357 * |
|
358 * @since Symbian^3 |
|
359 * @return uri |
|
360 */ |
|
361 IMPORT_C const TDesC& TargetUri(); |
320 }; |
362 }; |
321 |
363 |
322 #endif // THUMBNAILOBJECTSOURCE_H |
364 #endif // THUMBNAILOBJECTSOURCE_H |