williamr@2: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __ICLANIMATIONDATAPROVIDER_H__ williamr@2: #define __ICLANIMATIONDATAPROVIDER_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: _LIT8(KBitmapAnimationDataType, "bitmap"); williamr@2: williamr@2: class CICLAnimationDataLoader; williamr@2: williamr@2: /** williamr@2: Data provider for frame based animations. williamr@2: williamr@2: This data provider expects to be provided with a file which can be interpreted williamr@2: as an animation using the Image Conversion Library (ICL). An example would be williamr@2: an animated GIF. The default data type for this provider is "bitmap". williamr@2: williamr@2: @see CBitmapAnimator williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: class CICLAnimationDataProvider : public CAnimationDataProvider, public MICLAnimationDataLoaderObserver williamr@2: { williamr@2: public: williamr@2: IMPORT_C CICLAnimationDataProvider(); williamr@2: IMPORT_C ~CICLAnimationDataProvider(); williamr@2: IMPORT_C void SetFileL(RFs & aFs, const TFileName& aFileName); williamr@2: IMPORT_C TPtrC8 DataType(); williamr@2: virtual void StartL(); williamr@2: protected: williamr@2: IMPORT_C virtual void CICLAnimationDataProvider_Reserved1(); williamr@2: IMPORT_C virtual void CICLAnimationDataProvider_Reserved2(); williamr@2: // From CAnimationDataProvider williamr@2: IMPORT_C virtual void CAnimationDataProvider_Reserved1(); williamr@2: IMPORT_C virtual void CAnimationDataProvider_Reserved2(); williamr@2: private: williamr@2: TInt iCICLAnimationDataProvider_Reserved; williamr@2: private: williamr@2: CAnimationFrame::THandles CurrentFrame() const; williamr@2: void DecodeImageL(); williamr@2: void DataDeliveryL(); williamr@2: void Reset(); williamr@2: // From MICLAnimationDataLoaderObserver williamr@2: virtual void DataLoaderEventL(TDataLoaderEvent aEvent, TInt aError); williamr@2: private: williamr@2: CICLAnimationDataLoader* iDataLoader; williamr@2: CAnimationFrame* iCurrentFrame; williamr@2: TInt iFlags; williamr@2: }; williamr@2: williamr@2: #endif //__ICLANIMATIONDATAPROVIDER_H__