|
1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Not for public use |
|
15 // These are structures for the Image Conversion Library |
|
16 // to maintain future binary compatibility |
|
17 // |
|
18 // |
|
19 |
|
20 #ifndef IMAGECONVERSIONPRIV_INL |
|
21 #define IMAGECONVERSIONPRIV_INL |
|
22 |
|
23 // |
|
24 // CImageDecoderPriv |
|
25 // |
|
26 |
|
27 inline CImageDecoderPlugin* CImageDecoderPriv::Plugin() const |
|
28 { |
|
29 return iPlugin; |
|
30 } |
|
31 |
|
32 /** |
|
33 * Default version of HandleCustomSyncL - always leaves with KErrNotSupported |
|
34 * |
|
35 */ |
|
36 |
|
37 inline void CImageDecoderPriv::BodyHandleCustomSyncL(TInt /*aParam*/) |
|
38 { |
|
39 User::Leave(KErrNotSupported); |
|
40 } |
|
41 |
|
42 /** |
|
43 * Default version of InitCustomAsyncL - always leaves with KErrNotSupported |
|
44 * |
|
45 */ |
|
46 |
|
47 inline void CImageDecoderPriv::BodyInitCustomAsyncL(TInt /*aParam*/) |
|
48 { |
|
49 User::Leave(KErrNotSupported); |
|
50 } |
|
51 |
|
52 /** |
|
53 * Default version of NotifyComplete - NO-OP |
|
54 * |
|
55 */ |
|
56 |
|
57 inline void CImageDecoderPriv::BodyNotifyComplete() |
|
58 { |
|
59 } |
|
60 |
|
61 /** |
|
62 * |
|
63 * Return the number of frames in the image being decoded. This function can |
|
64 * be called immediately after the call to create the decoder, thus enabling |
|
65 * the caller to know how many frames need to be converted. |
|
66 * |
|
67 * @return "TInt" |
|
68 * The number of frames. |
|
69 */ |
|
70 inline TInt CImageDecoderPriv::FrameCount() const |
|
71 { |
|
72 return iFrameInfo.Count(); |
|
73 } |
|
74 |
|
75 /** |
|
76 * |
|
77 * Return the status of the image. |
|
78 * If the image is incomplete or not terminated correctly EFalse will be returned |
|
79 * |
|
80 * @return "TBool" |
|
81 * Image status. |
|
82 * |
|
83 */ |
|
84 inline TBool CImageDecoderPriv::IsImageHeaderProcessingComplete() const |
|
85 { |
|
86 return iHaveCompleteImageHeaders; |
|
87 } |
|
88 |
|
89 inline CImageReadCodec* CImageDecoderPriv::ImageReadCodec() const |
|
90 { |
|
91 return iImageReadCodec; |
|
92 } |
|
93 |
|
94 inline void CImageDecoderPriv::SetImageReadCodec(CImageReadCodec* aImageReadCodec) |
|
95 { |
|
96 ASSERT(aImageReadCodec != NULL); |
|
97 iImageReadCodec = aImageReadCodec; |
|
98 } |
|
99 |
|
100 inline TInt CImageDecoderPriv::DataLength() const |
|
101 { |
|
102 return iDataLength; |
|
103 } |
|
104 |
|
105 inline void CImageDecoderPriv::SetDataLength(TInt aDataLength) |
|
106 { |
|
107 iDataLength = aDataLength; |
|
108 } |
|
109 |
|
110 inline TInt CImageDecoderPriv::StartPosition() const |
|
111 { |
|
112 return iStartPosition; |
|
113 } |
|
114 |
|
115 inline void CImageDecoderPriv::SetStartPosition(TInt aStartPosition) |
|
116 { |
|
117 iStartPosition = aStartPosition; |
|
118 } |
|
119 |
|
120 inline const TImageDataBlock* CImageDecoderPriv::ImageData(TInt aIndex) const |
|
121 { |
|
122 return iImageData.GetImageData(aIndex); |
|
123 } |
|
124 |
|
125 inline TInt CImageDecoderPriv::InsertImageData(const TImageDataBlock* aEntry, TInt aPos) |
|
126 { |
|
127 return iImageData.InsertImageData(aEntry, aPos); |
|
128 } |
|
129 |
|
130 inline void CImageDecoderPriv::RemoveImageData(TInt aPos) |
|
131 { |
|
132 iImageData.RemoveImageData(aPos); |
|
133 } |
|
134 |
|
135 inline TInt CImageDecoderPriv::AppendImageData(const TImageDataBlock* aEntry) |
|
136 { |
|
137 return iImageData.AppendImageData(aEntry); |
|
138 } |
|
139 |
|
140 inline TInt CImageDecoderPriv::ImageDataCount() const |
|
141 { |
|
142 return iImageData.ImageDataCount(); |
|
143 } |
|
144 |
|
145 inline TInt CImageDecoderPriv::AppendImageDataBuffer(const HBufC8* aImageBuffer) |
|
146 { |
|
147 return iImageData.AppendImageBuffer(aImageBuffer); |
|
148 } |
|
149 |
|
150 inline TInt CImageDecoderPriv::NumberOfFrames() const |
|
151 { |
|
152 return iFrameInfo.Count(); |
|
153 } |
|
154 |
|
155 inline TInt CImageDecoderPriv::Position() const |
|
156 { |
|
157 return iPosition; |
|
158 } |
|
159 |
|
160 inline void CImageDecoderPriv::SetPosition(const TInt aPosition) |
|
161 { |
|
162 iPosition = aPosition; |
|
163 } |
|
164 |
|
165 inline const TFrameInfo& CImageDecoderPriv::ImageInfo() const |
|
166 { |
|
167 return iImageInfo; |
|
168 } |
|
169 |
|
170 inline void CImageDecoderPriv::SetImageInfo(const TFrameInfo& aImageInfo) |
|
171 { |
|
172 iImageInfo = aImageInfo; |
|
173 } |
|
174 |
|
175 inline const CFbsBitmap& CImageDecoderPriv::Destination() const |
|
176 { |
|
177 ASSERT(ValidDestination()); |
|
178 return *iDestination; |
|
179 } |
|
180 |
|
181 inline TBool CImageDecoderPriv::ValidDestination() const |
|
182 { |
|
183 return iDestination != NULL; |
|
184 } |
|
185 |
|
186 inline const CFbsBitmap& CImageDecoderPriv::DestinationMask() const |
|
187 { |
|
188 ASSERT(ValidDestinationMask()); |
|
189 return *iDestinationMask; |
|
190 } |
|
191 |
|
192 inline TBool CImageDecoderPriv::ValidDestinationMask() const |
|
193 { |
|
194 return iDestinationMask != NULL; |
|
195 } |
|
196 |
|
197 inline TInt CImageDecoderPriv::SourceLength() const |
|
198 { |
|
199 return iSrcDes.Length(); |
|
200 } |
|
201 |
|
202 inline TBool CImageDecoderPriv::MustUseBufferWithDescriptor() const |
|
203 { |
|
204 return iSupport->MustUseBufferWithDescriptor(); |
|
205 } |
|
206 |
|
207 inline void CImageDecoderPriv::CopyBufferToDescriptor(TDes8& aBuffer, const TDesC8& aSource, TInt aPosition, TInt aSize) |
|
208 { |
|
209 iSupport->CopyBufferToDescriptor(aBuffer, aSource, aPosition, aSize); |
|
210 } |
|
211 |
|
212 inline CImageDecoder::TOptions CImageDecoderPriv::DecoderOptions() const |
|
213 { |
|
214 return iOptions; |
|
215 } |
|
216 |
|
217 // |
|
218 // CImageEncoderPriv |
|
219 // |
|
220 |
|
221 inline CImageEncoderPlugin* CImageEncoderPriv::Plugin() const |
|
222 { |
|
223 return iPlugin; |
|
224 } |
|
225 |
|
226 /** |
|
227 * Default version of HandleCustomSyncL - always leaves with KErrNotSupported |
|
228 * |
|
229 */ |
|
230 |
|
231 inline void CImageEncoderPriv::BodyHandleCustomSyncL(TInt /*aParam*/) |
|
232 { |
|
233 User::Leave(KErrNotSupported); |
|
234 } |
|
235 |
|
236 /** |
|
237 * Default version of InitCustomAsyncL - always leaves with KErrNotSupported |
|
238 * |
|
239 */ |
|
240 |
|
241 inline void CImageEncoderPriv::BodyInitCustomAsyncL(TInt /*aParam*/) |
|
242 { |
|
243 User::Leave(KErrNotSupported); |
|
244 } |
|
245 |
|
246 /** |
|
247 * Default version of NotifyComplete - NO-OP |
|
248 * |
|
249 */ |
|
250 |
|
251 inline void CImageEncoderPriv::BodyNotifyComplete() |
|
252 { |
|
253 } |
|
254 |
|
255 inline CImageWriteCodec* CImageEncoderPriv::ImageWriteCodec() const |
|
256 { |
|
257 return iImageWriteCodec; |
|
258 } |
|
259 |
|
260 inline void CImageEncoderPriv::SetImageWriteCodec(CImageWriteCodec* aImageWriteCodec) |
|
261 { |
|
262 ASSERT(aImageWriteCodec != NULL); |
|
263 iImageWriteCodec = aImageWriteCodec; |
|
264 } |
|
265 |
|
266 inline const CFbsBitmap& CImageEncoderPriv::Source() const |
|
267 { |
|
268 ASSERT(ValidSource()); |
|
269 return *iSource; |
|
270 } |
|
271 |
|
272 inline TBool CImageEncoderPriv::ValidSource() const |
|
273 { |
|
274 return iSource != NULL; |
|
275 } |
|
276 |
|
277 inline TInt& CImageEncoderPriv::StartPosition() |
|
278 { |
|
279 return iStartPosition; |
|
280 } |
|
281 |
|
282 inline TInt& CImageEncoderPriv::Position() |
|
283 { |
|
284 return iPosition; |
|
285 } |
|
286 |
|
287 inline const TSize& CImageEncoderPriv::FrameInfoOverallSizeInPixels() const |
|
288 { |
|
289 return iFrameInfo.iOverallSizeInPixels; |
|
290 } |
|
291 |
|
292 inline CImageEncoder::TOptions CImageEncoderPriv::EncoderOptions() const |
|
293 { |
|
294 return iOptions; |
|
295 } |
|
296 |
|
297 |
|
298 #endif // IMAGECONVERSIONPRIV_INL |