epoc32/include/animationdataprovider.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 animationdataprovider.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 __ANIMATIONDATAPROVIDER_H__
       
    17 #define __ANIMATIONDATAPROVIDER_H__
       
    18 
       
    19 #include <e32std.h>
       
    20 #include <animationframe.h>
       
    21 
       
    22 class MAnimationDataProviderObserver;
       
    23 
       
    24 _LIT8(KUndefinedAnimationDataType, "undefined");
       
    25 
       
    26 /**
       
    27 Pure virtual base class for data providers.
       
    28 
       
    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.
       
    32 
       
    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
       
    35 classes.
       
    36 
       
    37 @see CAnimation
       
    38 @see MAnimationDataProviderObserver
       
    39 @publishedAll
       
    40 @released
       
    41 */
       
    42 class CAnimationDataProvider : public CBase
       
    43 	{
       
    44 public:
       
    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;
       
    51 protected:
       
    52 	IMPORT_C CAnimationDataProvider();
       
    53 	IMPORT_C virtual void CAnimationDataProvider_Reserved1();
       
    54 	IMPORT_C virtual void CAnimationDataProvider_Reserved2();
       
    55 
       
    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);
       
    59 protected: 
       
    60 	/** Reserved for future use */
       
    61 	TInt iCAnimationDataProvider_Reserved;
       
    62 	/** The destination to send data to. Usually an animation class. */
       
    63 	MAnimationDataProviderObserver* iObserver;
       
    64 	};
       
    65 
       
    66 #endif // __ANIMATIONDATAPROVIDER_H__