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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __ANIMATIONDATAPROVIDER_H__
17 #define __ANIMATIONDATAPROVIDER_H__
20 #include <animationframe.h>
22 class MAnimationDataProviderObserver;
24 _LIT8(KUndefinedAnimationDataType, "undefined");
27 Pure virtual base class for data providers.
29 A data provider takes an animation specification (such as a file), converts
30 it (if needed) into a format recognised by an animator (such as CAnimationFrame
31 objects), and passes it to the animator, via the medium of an animation.
33 Most animation types take a data provider as an argument during contruction.
34 For more detailed usage instructions, refer to the documentation of the derived
38 @see MAnimationDataProviderObserver
42 class CAnimationDataProvider : public CBase
45 IMPORT_C void SetObserver(MAnimationDataProviderObserver* aObserver);
46 /** Called from the animation when it is ready to begin receiving data. */
47 virtual void StartL() = 0;
48 /** Called from the animation to obtain the type of data to expect.
49 @return An 8 bit identifier string*/
50 virtual TPtrC8 DataType() = 0;
52 IMPORT_C CAnimationDataProvider();
53 IMPORT_C virtual void CAnimationDataProvider_Reserved1();
54 IMPORT_C virtual void CAnimationDataProvider_Reserved2();
56 IMPORT_C void SendEventL(TInt aEvent);
57 IMPORT_C void SendEventL(TInt aEvent, TInt aData);
58 IMPORT_C void SendEventL(TInt aEvent, TAny* aData, TInt aDataSize);
60 /** Reserved for future use */
61 TInt iCAnimationDataProvider_Reserved;
62 /** The destination to send data to. Usually an animation class. */
63 MAnimationDataProviderObserver* iObserver;
66 #endif // __ANIMATIONDATAPROVIDER_H__