svgtviewer/SvgtViewerPlugin/ScreenSaverPluginInc/SvgRenderFrameTimer.h
branchRCL_3
changeset 20 5fd161fa28b6
parent 0 632761c941a7
equal deleted inserted replaced
17:e52958d06c29 20:5fd161fa28b6
       
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  SVGRenderFrameTimer provides an implementation of timer 
       
    15 *                for RenderFrames Control
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef SVGRENDERFRAMETIMER_H
       
    21 #define SVGRENDERFRAMETIMER_H
       
    22 
       
    23 #if !defined(__E32BASE_H__)
       
    24 #include <e32base.h>
       
    25 #endif
       
    26 
       
    27 /**
       
    28 *  Interface for the render frame timer listener.
       
    29 *  @lib SVGTScreenSaverPlugin.lib
       
    30 *  @since 3.1
       
    31 */
       
    32 class MSvgRenderFrameTimerListener
       
    33     {
       
    34 
       
    35     public:
       
    36     /*
       
    37     * Function called when timeout occurs
       
    38     * @since 3.1
       
    39     */
       
    40     virtual void AnimationTimeOut() = 0;   
       
    41    
       
    42     };
       
    43 
       
    44 /**
       
    45 *  Provides the timer functionality for RenderFrames control  
       
    46 *  @lib SVGTScreenSaverPlugin.lib
       
    47 *  @since 3.1
       
    48 */
       
    49 class CSvgRenderFrameTimer: public CTimer                            
       
    50     {    
       
    51     
       
    52     public: 
       
    53         
       
    54         /**
       
    55         * Two-phased constructor.
       
    56         * @since 3.1
       
    57         */
       
    58         static CSvgRenderFrameTimer* NewL( MSvgRenderFrameTimerListener* 
       
    59                                            aListener );
       
    60                                            
       
    61         /**
       
    62         * Two-phased constructor.
       
    63         * @since 3.1
       
    64         */                                           
       
    65         static CSvgRenderFrameTimer* NewLC(MSvgRenderFrameTimerListener* 
       
    66                                            aListener );
       
    67         
       
    68         /**
       
    69         * Destructor.
       
    70         */
       
    71         virtual ~CSvgRenderFrameTimer();              
       
    72         
       
    73         
       
    74     public: // CTimer interface methods        
       
    75          
       
    76 
       
    77         /**
       
    78         * From CActive Implements cancellation of an outstanding request.
       
    79         * @since 3.1
       
    80         */
       
    81         void DoCancel();
       
    82 
       
    83         /**
       
    84         * From CActive Handles the timer's request completion event.
       
    85         * @since 3.1
       
    86         */
       
    87         void RunL();
       
    88    
       
    89     public: // new function(s)
       
    90     
       
    91         /**
       
    92         * Sets the timeout to the interval specified.
       
    93         * @param anInterval the timeout value
       
    94         * @since 3.1
       
    95         */
       
    96         void SetTimeOut( const TTimeIntervalMicroSeconds32& anInterval );
       
    97        
       
    98     
       
    99     private:
       
   100     
       
   101         /**
       
   102         * Default Constructor
       
   103         * @since 3.1
       
   104         */  
       
   105         CSvgRenderFrameTimer( MSvgRenderFrameTimerListener* aListener  );
       
   106         
       
   107         /**
       
   108         * 2nd phase constructor
       
   109         * @since 3.1
       
   110         */
       
   111         void ConstructL();
       
   112 
       
   113     private:        
       
   114         
       
   115         // Listener for the timeout
       
   116         MSvgRenderFrameTimerListener* iListener;
       
   117                
       
   118         };
       
   119 
       
   120 #endif // SVGRENDERFRAMETIMER_H
       
   121 // End of File