photosgallery/slideshow/engine/tsrc/t_cshweventrouter/t_cshweventrouter.h
changeset 0 4e91876724a2
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2006-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 scheduler for the slideshow
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __T_CSHWEVENTROUTER_H__
       
    22 #define __T_CSHWEVENTROUTER_H__
       
    23 
       
    24 //  EXTERNAL INCLUDES
       
    25 #include <e32def.h>
       
    26 #include <digia/eunit/ceunittestsuiteclass.h>
       
    27 
       
    28 //  INTERNAL INCLUDES
       
    29 #include "shweventobserver.h"
       
    30 #include "shweventpublisher.h"
       
    31 
       
    32 //  FORWARD DECLARATIONS
       
    33 class CShwEventRouter;
       
    34 class T_TestEvent;
       
    35 
       
    36 //  CLASS DEFINITION
       
    37 /**
       
    38  *
       
    39  * EUnitWizard generated test class. 
       
    40  *
       
    41  */
       
    42 NONSHARABLE_CLASS( T_CShwEventRouter )
       
    43      : public CEUnitTestSuiteClass, public MShwEventObserver, public MShwEventPublisher
       
    44     {
       
    45     public:     // Constructors and destructors
       
    46 
       
    47         /**
       
    48          * Two phase construction
       
    49          */
       
    50         static T_CShwEventRouter* NewL();
       
    51         static T_CShwEventRouter* NewLC();
       
    52         /**
       
    53          * Destructor
       
    54          */
       
    55         ~T_CShwEventRouter();
       
    56 
       
    57     private:    // Constructors and destructors 
       
    58 
       
    59         T_CShwEventRouter();
       
    60         void ConstructL();
       
    61 
       
    62     public:     // From MShwEventObserver and MShwEventPublisher
       
    63 
       
    64 		void NotifyL( MShwEvent* aEvent );
       
    65 		void SetEventQueue( MShwEventQueue* aQueue );
       
    66 
       
    67     private:    // New methods
       
    68 
       
    69          void SetupL();
       
    70          void Teardown();
       
    71         
       
    72          void TestBasicRoutingL();
       
    73          void TestNestedEventsL();
       
    74          void TestNestedEventsAndMultipleObserversL();
       
    75          void TestLeaveInNotifyL();
       
    76          void TestOOML();
       
    77         
       
    78 
       
    79     private:    // Data
       
    80 
       
    81         EUNIT_DECLARE_TEST_TABLE;
       
    82 
       
    83 		CShwEventRouter* iRouter;
       
    84 		MShwEventQueue* iQueue;
       
    85 		MShwEvent* iEvent;
       
    86 		
       
    87 		TInt iEventReceiveCount;
       
    88 		TInt iSendNewEventCount;
       
    89 		TBool iLeaveInNotify;
       
    90 		T_TestEvent* iEventToReceive;
       
    91 
       
    92     };
       
    93 
       
    94 #endif      //  __T_CSHWEVENTROUTER_H__
       
    95 
       
    96 // End of file