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 __ANIMATIONDATAPROVIDER_H__ williamr@2: #define __ANIMATIONDATAPROVIDER_H__ williamr@2: williamr@2: #include williamr@2: #include williamr@2: williamr@2: class MAnimationDataProviderObserver; williamr@2: williamr@2: _LIT8(KUndefinedAnimationDataType, "undefined"); williamr@2: williamr@2: /** williamr@2: Pure virtual base class for data providers. williamr@2: williamr@2: A data provider takes an animation specification (such as a file), converts williamr@2: it (if needed) into a format recognised by an animator (such as CAnimationFrame williamr@2: objects), and passes it to the animator, via the medium of an animation. williamr@2: williamr@2: Most animation types take a data provider as an argument during contruction. williamr@2: For more detailed usage instructions, refer to the documentation of the derived williamr@2: classes. williamr@2: williamr@2: @see CAnimation williamr@2: @see MAnimationDataProviderObserver williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: class CAnimationDataProvider : public CBase williamr@2: { williamr@2: public: williamr@2: IMPORT_C void SetObserver(MAnimationDataProviderObserver* aObserver); williamr@2: /** Called from the animation when it is ready to begin receiving data. */ williamr@2: virtual void StartL() = 0; williamr@2: /** Called from the animation to obtain the type of data to expect. williamr@2: @return An 8 bit identifier string*/ williamr@2: virtual TPtrC8 DataType() = 0; williamr@2: protected: williamr@2: IMPORT_C CAnimationDataProvider(); williamr@2: IMPORT_C virtual void CAnimationDataProvider_Reserved1(); williamr@2: IMPORT_C virtual void CAnimationDataProvider_Reserved2(); williamr@2: williamr@2: IMPORT_C void SendEventL(TInt aEvent); williamr@2: IMPORT_C void SendEventL(TInt aEvent, TInt aData); williamr@2: IMPORT_C void SendEventL(TInt aEvent, TAny* aData, TInt aDataSize); williamr@2: protected: williamr@2: /** Reserved for future use */ williamr@2: TInt iCAnimationDataProvider_Reserved; williamr@2: /** The destination to send data to. Usually an animation class. */ williamr@2: MAnimationDataProviderObserver* iObserver; williamr@2: }; williamr@2: williamr@2: #endif // __ANIMATIONDATAPROVIDER_H__