1 /* |
|
2 * Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Image thumbnail provider plugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef THUMBNAILAUDIOPROVIDER_H |
|
20 #define THUMBNAILAUDIOPROVIDER_H |
|
21 |
|
22 #include "thumbnailprovider.h" |
|
23 |
|
24 class CThumbnailImageDecoderv3; |
|
25 |
|
26 /** |
|
27 * Image thumbnail provider plugin. |
|
28 * |
|
29 * @since S60 v5.0 |
|
30 */ |
|
31 class CThumbnailAudioProvider: public CThumbnailProvider |
|
32 { |
|
33 |
|
34 public: |
|
35 |
|
36 /** |
|
37 * Two-phased constructor. |
|
38 * |
|
39 * @since S60 v5.0 |
|
40 * @return New image thumbnail provider instance. |
|
41 */ |
|
42 static CThumbnailAudioProvider* NewL(); |
|
43 |
|
44 /** |
|
45 * Destructor |
|
46 * |
|
47 * @since S60 v5.0 |
|
48 */ |
|
49 virtual ~CThumbnailAudioProvider(); |
|
50 |
|
51 /** |
|
52 * Function that will provide thumbnail from given parameters. |
|
53 * |
|
54 * @since S60 v5.0 |
|
55 * @param aFs File server session |
|
56 * @param aFile Source image file. |
|
57 * @param aMimeType MIME-type of the image file. |
|
58 * @param aFlags Flags for thumbnail creation. |
|
59 * @param aDisplayMode Used display mode. |
|
60 */ |
|
61 void GetThumbnailL( RFs& aFs, RFile64& aFile, const TDataType& aMimeType, |
|
62 const CThumbnailManager::TThumbnailFlags aFlags, const TDisplayMode |
|
63 aDisplayMode, const CThumbnailManager::TThumbnailQualityPreference aQualityPreference ); |
|
64 |
|
65 /** |
|
66 * Function that will provide thumbnail from given parameters. |
|
67 * |
|
68 * @since S60 v5.0 |
|
69 * @param aFs File server session |
|
70 * @param aBuffer Source image buffer. |
|
71 * @param aMimeType MIME-type of the image file. |
|
72 * @param aFlags Flags for thumbnail creation. |
|
73 * @param aDisplayMode Used display mode. |
|
74 */ |
|
75 void GetThumbnailL( RFs& aFs, TDesC8* aBuffer, const |
|
76 TDataType& aMimeType, const CThumbnailManager::TThumbnailFlags aFlags, |
|
77 const TDisplayMode aDisplayMode, const CThumbnailManager::TThumbnailQualityPreference aQualityPreference ); |
|
78 |
|
79 /** |
|
80 * Function that will provide thumbnail from given parameters. |
|
81 * |
|
82 * @since S60 v5.0 |
|
83 * @param aFs File server session |
|
84 * @param aBuffer Source image buffer. |
|
85 */ |
|
86 void GetThumbnailL( RFs& aFs, TDesC8& aBuffer); |
|
87 |
|
88 /** |
|
89 * Cancel a previous thumbnail request, if any. |
|
90 * |
|
91 * @since S60 5.0 |
|
92 */ |
|
93 void CancelGetThumbnail(); |
|
94 |
|
95 private: |
|
96 |
|
97 /** |
|
98 * C++ default constructor |
|
99 * |
|
100 * @since S60 v5.0 |
|
101 * @return New image thumbnail provider instance. |
|
102 */ |
|
103 CThumbnailAudioProvider(); |
|
104 |
|
105 private: |
|
106 |
|
107 /** |
|
108 * Thumbnail decoder. |
|
109 */ |
|
110 CThumbnailImageDecoderv3* iImageDecoderv3; |
|
111 |
|
112 |
|
113 /** |
|
114 * File server session. |
|
115 * Not own. |
|
116 */ |
|
117 RFs iFs; |
|
118 |
|
119 /** |
|
120 * Mime-type of image |
|
121 */ |
|
122 TDataType iMimeType; |
|
123 }; |
|
124 |
|
125 #include "thumbnailprovider.inl" |
|
126 |
|
127 #endif // THUMBNAILIMAGEPROVIDER_H |
|