mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_muscallstatusmonitor.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_CMusCallStatusMonitor_H__
       
    20 #define __UT_CMusCallStatusMonitor_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 CMusCommonObserverStub;
       
    33 class CMusCallStatusMonitor;
       
    34 
       
    35 // Next row is to disable warning emerging from EUnit code.
       
    36 // Placement is due to a fact that most test case files
       
    37 // include this file. Directive can be removed when 
       
    38 // EUnit is fixed.  
       
    39 #pragma warn_illtokenpasting off
       
    40 
       
    41 //  CLASS DEFINITION
       
    42 /**
       
    43  * Tester class for MusCallMonitor. 
       
    44  * 
       
    45  */
       
    46 NONSHARABLE_CLASS( UT_CMusCallStatusMonitor ): public CEUnitTestSuiteClass,
       
    47 													 MMusTsyPropertyObserver,
       
    48                                                      MMusCallStateObserver
       
    49 													 
       
    50     {
       
    51     public:     // Constructors and destructors
       
    52 
       
    53         /**
       
    54          * Two phase construction
       
    55          */
       
    56         static UT_CMusCallStatusMonitor* NewL();
       
    57         static UT_CMusCallStatusMonitor* NewLC();
       
    58                 
       
    59         /**
       
    60          * Destructor
       
    61          */
       
    62         ~UT_CMusCallStatusMonitor();
       
    63         
       
    64     public:    // from MMusTsyPropertyObserver.
       
    65     
       
    66     /**
       
    67      * Notify call state changed
       
    68      * @param aVal The call status
       
    69      * @param aCallName The name of the call
       
    70      */
       
    71     virtual void NotifyCallStateChanged( NMusSessionInformationApi::TMusCallEvent aVal,
       
    72     									 TName& aCallName );
       
    73     
       
    74     public:    // from MMusCallStateObserver.
       
    75     
       
    76     virtual void MusCallStateChanged();
       
    77 
       
    78     private: // Constructors and destructors
       
    79 
       
    80         UT_CMusCallStatusMonitor();
       
    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_CMusCallStatusMonitor_NewLL();
       
    91         void UT_CMusCallStatusMonitor_CheckStateLL();
       
    92         void UT_CMusCallStatusMonitor_RunLL();
       
    93         void UT_CMusCallStatusMonitor_DoCancelL();
       
    94         void UT_CMusCallStatusMonitor_RunErrorL();        
       
    95     private:    // Data
       
    96         CMusCallStatusMonitor* iCallStatusMonitor;
       
    97         RMobileCall iCall;
       
    98         
       
    99 
       
   100         EUNIT_DECLARE_TEST_TABLE;
       
   101 
       
   102     };
       
   103 
       
   104 #endif      //  __UT_CMusCallStatusMonitor_H__
       
   105 
       
   106 // End of file