1 iclanimationdataprovider.h |
1 // Copyright (c) 2004-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __ICLANIMATIONDATAPROVIDER_H__ |
|
17 #define __ICLANIMATIONDATAPROVIDER_H__ |
|
18 |
|
19 #include <animationdataprovider.h> |
|
20 |
|
21 #include <e32std.h> |
|
22 #include <animationframe.h> |
|
23 #include <animationmixins.h> |
|
24 |
|
25 _LIT8(KBitmapAnimationDataType, "bitmap"); |
|
26 |
|
27 class CICLAnimationDataLoader; |
|
28 |
|
29 /** |
|
30 Data provider for frame based animations. |
|
31 |
|
32 This data provider expects to be provided with a file which can be interpreted |
|
33 as an animation using the Image Conversion Library (ICL). An example would be |
|
34 an animated GIF. The default data type for this provider is "bitmap". |
|
35 |
|
36 @see CBitmapAnimator |
|
37 @publishedAll |
|
38 @released |
|
39 */ |
|
40 class CICLAnimationDataProvider : public CAnimationDataProvider, public MICLAnimationDataLoaderObserver |
|
41 { |
|
42 public: |
|
43 IMPORT_C CICLAnimationDataProvider(); |
|
44 IMPORT_C ~CICLAnimationDataProvider(); |
|
45 IMPORT_C void SetFileL(RFs & aFs, const TFileName& aFileName); |
|
46 IMPORT_C TPtrC8 DataType(); |
|
47 virtual void StartL(); |
|
48 protected: |
|
49 IMPORT_C virtual void CICLAnimationDataProvider_Reserved1(); |
|
50 IMPORT_C virtual void CICLAnimationDataProvider_Reserved2(); |
|
51 // From CAnimationDataProvider |
|
52 IMPORT_C virtual void CAnimationDataProvider_Reserved1(); |
|
53 IMPORT_C virtual void CAnimationDataProvider_Reserved2(); |
|
54 private: |
|
55 TInt iCICLAnimationDataProvider_Reserved; |
|
56 private: |
|
57 CAnimationFrame::THandles CurrentFrame() const; |
|
58 void DecodeImageL(); |
|
59 void DataDeliveryL(); |
|
60 void Reset(); |
|
61 // From MICLAnimationDataLoaderObserver |
|
62 virtual void DataLoaderEventL(TDataLoaderEvent aEvent, TInt aError); |
|
63 private: |
|
64 CICLAnimationDataLoader* iDataLoader; |
|
65 CAnimationFrame* iCurrentFrame; |
|
66 TInt iFlags; |
|
67 }; |
|
68 |
|
69 #endif //__ICLANIMATIONDATAPROVIDER_H__ |