lafagnosticuifoundation/animation/src/ICLAnimationDataLoader.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     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 "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 //
       
    15 
       
    16 #ifndef __ICLANIMATIONDATALOADER_H__
       
    17 #define __ICLANIMATIONDATALOADER_H__
       
    18 
       
    19 #include <e32base.h> 
       
    20 #include <icl/imagedata.h>
       
    21 
       
    22 #include "AnimationMixins.h"
       
    23 
       
    24 class CBitmapScaler;
       
    25 class CImageEncoder;
       
    26 class CImageDecoder;
       
    27 class CFbsBitmap;
       
    28 class CAnimationFrame;
       
    29 
       
    30 /** @internalComponent */
       
    31 NONSHARABLE_CLASS(CICLAnimationDataLoader) : public CActive
       
    32 	{
       
    33 public:
       
    34 	IMPORT_C static CICLAnimationDataLoader* NewL(RFs& aFs, MICLAnimationDataLoaderObserver& aCallback);
       
    35 	~CICLAnimationDataLoader();
       
    36 
       
    37 	IMPORT_C void LoadImageDataL(const TFileName& aFileName);
       
    38 	IMPORT_C void GetNextFrameL(CAnimationFrame* aFrame);
       
    39 	
       
    40 	IMPORT_C TFrameInfo FrameInfo(const TInt aFrame) const;
       
    41 	IMPORT_C TInt FrameCount() const;
       
    42 	IMPORT_C TInt CurrentFrame() const;
       
    43 	TBool IsMngAnimation();
       
    44 	
       
    45 private:
       
    46 	CICLAnimationDataLoader(RFs& aFs, MICLAnimationDataLoaderObserver& aCallback);
       
    47 	void ConstructL();
       
    48 	static MICLAnimationDataLoaderObserver::TDataLoaderEvent NextMngOperation(TInt aFrame, TUint aFlags);
       
    49 	
       
    50 	// from CActive
       
    51 	void RunL(); 
       
    52 	void DoCancel();
       
    53 private:
       
    54 	RFs& iFs;
       
    55 	MICLAnimationDataLoaderObserver& iCallback;
       
    56 	TInt iFrameCount;
       
    57 	TInt iCurrentFrame;
       
    58 	TBool iIsMngAnimation;
       
    59 	CImageDecoder* iImageDecoder;
       
    60 	MICLAnimationDataLoaderObserver::TDataLoaderEvent iOperation;
       
    61 	};
       
    62 
       
    63 
       
    64 #endif //__ICLANIMATIONDATALOADER_H__