mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscalleventmonitor.h
changeset 22 496ad160a278
equal deleted inserted replaced
15:ccd8e69b5392 22:496ad160a278
       
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __UT_CMusCallEventMonitor_H__
       
    20 #define __UT_CMusCallEventMonitor_H__
       
    21 
       
    22 
       
    23 //  EXTERNAL INCLUDES
       
    24 #include <digia/eunit/ceunittestsuiteclass.h>
       
    25 #include <digia/eunit/eunitmacros.h>
       
    26 #include "etelmm.h"
       
    27 #include "mussesseioninformationapi.h"
       
    28 #include "mmustsypropertyobserver.h"
       
    29 #include "mmuscallstateobserver.h"
       
    30 
       
    31 //  FORWARD DECLARATIONS
       
    32 class CMusCallEventMonitor;
       
    33 
       
    34 // Next row is to disable warning emerging from EUnit code.
       
    35 // Placement is due to a fact that most test case files
       
    36 // include this file. Directive can be removed when 
       
    37 // EUnit is fixed.  
       
    38 #pragma warn_illtokenpasting off
       
    39 
       
    40 //  CLASS DEFINITION
       
    41 /**
       
    42  * Tester class for MusCallMonitor. 
       
    43  * 
       
    44  */
       
    45 NONSHARABLE_CLASS( UT_CMusCallEventMonitor ): public CEUnitTestSuiteClass,
       
    46 											   MMusTsyPropertyObserver,
       
    47 											   MMusCallStateObserver
       
    48 											   
       
    49     {
       
    50     public:     // Constructors and destructors
       
    51 
       
    52         /**
       
    53          * Two phase construction
       
    54          */
       
    55         static UT_CMusCallEventMonitor* NewL();
       
    56         static UT_CMusCallEventMonitor* NewLC();
       
    57                 
       
    58         /**
       
    59          * Destructor
       
    60          */
       
    61         ~UT_CMusCallEventMonitor();
       
    62         
       
    63     public:    // from MMusTsyPropertyObserver.
       
    64     
       
    65     /**
       
    66      * Notify call state changed
       
    67      * @param aVal The call status
       
    68      * @param aCallName The name of the call
       
    69      */
       
    70     virtual void NotifyCallStateChanged( NMusSessionInformationApi::TMusCallEvent aVal,
       
    71     									 TName& aCallName );
       
    72     
       
    73     public:    // from MMusCallStateObserver.
       
    74 
       
    75         virtual void MusCallStateChanged();
       
    76     
       
    77 
       
    78     private: // Constructors and destructors
       
    79 
       
    80         UT_CMusCallEventMonitor();
       
    81         void ConstructL();
       
    82         
       
    83     private: // Test case setup and teardown
       
    84 
       
    85         void SetupL();
       
    86         void Teardown();
       
    87 
       
    88     private: // Test methdods
       
    89     
       
    90         void UT_CMusCallEventMonitor_NewLL();
       
    91         void UT_CMusCallEventMonitor_RunLL();
       
    92         void UT_CMusCallEventMonitor_DoCancelL();
       
    93         void UT_CMusCallEventMonitor_RunErrorL();        
       
    94     private:    // Data
       
    95         CMusCallEventMonitor* iCallEventMonitor;
       
    96         RMobileCall iCall;
       
    97 
       
    98         EUNIT_DECLARE_TEST_TABLE;
       
    99 
       
   100     };
       
   101 
       
   102 #endif      //  __UT_CMusCallEventMonitor_H__
       
   103 
       
   104 // End of file