photosgallery/slideshow/engine/tsrc/t_cshwtimercontrol/t_cshwtimercontrol.h
changeset 0 4e91876724a2
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2007-2007 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:  Test for timer control for the slideshow
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __T_CSHWTIMERCONTROL_H__
       
    22 #define __T_CSHWTIMERCONTROL_H__
       
    23 
       
    24 //  EXTERNAL INCLUDES
       
    25 #include <digia/eunit/CEUnitTestSuiteClass.h>
       
    26 #include <digia/eunit/EUnitDecorators.h>
       
    27 
       
    28 
       
    29 //  INTERNAL INCLUDES
       
    30 #include "shweventqueue.h"
       
    31 #include "shwtimercontrol.h"
       
    32 
       
    33 //  FORWARD DECLARATIONS
       
    34 
       
    35 //  CLASS DEFINITION
       
    36 /**
       
    37  * EUnit test suite for CShwTimerControl
       
    38  */
       
    39 NONSHARABLE_CLASS( T_CShwTimerControl )
       
    40 	: public CEUnitTestSuiteClass,
       
    41 	public MShwEventQueue
       
    42     {
       
    43     public:     // Constructors and destructors
       
    44 
       
    45         /**
       
    46          * Two phase construction
       
    47          */
       
    48         static T_CShwTimerControl* NewL();
       
    49         static T_CShwTimerControl* NewLC();
       
    50         /**
       
    51          * Destructor
       
    52          */
       
    53         ~T_CShwTimerControl();
       
    54 
       
    55     private:    // Constructors and destructors
       
    56 
       
    57         T_CShwTimerControl();
       
    58         void ConstructL();
       
    59 
       
    60 	public:	// From MShwEventQueue
       
    61 	
       
    62 		void SendEventL( MShwEvent* aEvent );
       
    63 
       
    64 		// timer callback for test
       
    65     	TInt TimerCallBack();
       
    66 		
       
    67     private:    // New methods
       
    68     
       
    69 		void SetupL();
       
    70 		void Teardown();
       
    71 		void Empty();
       
    72 
       
    73 		void TestConstructL();
       
    74 		void T_TimeTickLL();
       
    75 		void T_NotifyLL();
       
    76 		void T_NotifyL2L();
       
    77         void T_PauseL();
       
    78 
       
    79     private:    // Data
       
    80 		
       
    81 		/// Own: the class under test
       
    82         CShwTimerControl* iCShwTimerControl;
       
    83 		/// Own: the event received from cut
       
    84         MShwEvent* iEvent;
       
    85         /// Own: scheduler wait object
       
    86         CActiveSchedulerWait iWait;
       
    87         /// Own: a flag to know where the scheduler was stopped
       
    88         TBool iStoppedForTimer;
       
    89 
       
    90 
       
    91         EUNIT_DECLARE_TEST_TABLE; 
       
    92 
       
    93     };
       
    94 
       
    95 #endif      //  __T_CSHWTIMERCONTROL_H__
       
    96 
       
    97 // End of file