mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_musaocalleventmonitor.h
changeset 22 496ad160a278
equal deleted inserted replaced
15:ccd8e69b5392 22:496ad160a278
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Monitor that observes the status of the current CS call
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef UT_MUSAOCALLEVENTMONITOR_H
       
    20 #define UT_MUSAOCALLEVENTMONITOR_H
       
    21 
       
    22 #include "muscallmonitorobserver.h"
       
    23 
       
    24 #include <etelmm.h>
       
    25 #include <digia/eunit/ceunittestsuiteclass.h>
       
    26 
       
    27 
       
    28 class CMusAoCallEventMonitor;
       
    29 
       
    30 /**
       
    31  * Monitor, which observes status of current cs call
       
    32  * Observers will be notified, when call status is idle
       
    33  * i.e. call has ended.
       
    34  *
       
    35  * @lib ut_mushaoplugin.dll
       
    36  */
       
    37 NONSHARABLE_CLASS( UT_CMusAoCallEventMonitor )
       
    38     : public CEUnitTestSuiteClass, public MMusCallMonitorObserver
       
    39     {
       
    40 
       
    41 public: // constructors and destructor
       
    42 
       
    43     /**
       
    44      * Destructor.
       
    45      */
       
    46     ~UT_CMusAoCallEventMonitor();
       
    47 
       
    48     /**
       
    49      * Two-phased constructor. Leaves on failure.
       
    50      * @return The constructed CMusAoCallMonitorTest object.
       
    51      */
       
    52     static UT_CMusAoCallEventMonitor* NewLC();
       
    53 
       
    54 private:
       
    55 
       
    56     /**
       
    57      * C++ constructor.
       
    58      */
       
    59     UT_CMusAoCallEventMonitor();
       
    60 
       
    61     /**
       
    62      * Symbian 2nd-phase constructor.
       
    63      */
       
    64     void ConstructL();
       
    65     
       
    66 
       
    67 private: // test MMusCallMonitorObserver      
       
    68     
       
    69     virtual void CallConnectedL( const TDesC& aTelNumber, TBool aIsSipUri );
       
    70     
       
    71     virtual void CallHoldL( const TDesC& aTelNumber, TBool aIsSipUri );
       
    72     
       
    73     virtual void ConferenceCallL();
       
    74     
       
    75     virtual void NoActiveCallL();
       
    76     
       
    77 
       
    78 public: 
       
    79 
       
    80     void UT_ConnectedCallCountLL();
       
    81     
       
    82     void UT_RunLL();    
       
    83 
       
    84     void UT_ExamineEventLL();
       
    85 
       
    86 private:
       
    87 
       
    88     void SetupL();
       
    89     
       
    90     void Teardown();
       
    91     
       
    92     void ResetObserverFlags();
       
    93 
       
    94 private: // data
       
    95 
       
    96     CMusAoCallEventMonitor* iMonitor;
       
    97     
       
    98     EUNIT_DECLARE_TEST_TABLE; 
       
    99     
       
   100     TBool iCallConnected;
       
   101     
       
   102     TBool iCallHold;
       
   103     
       
   104     TBool iConferenceCall;
       
   105     
       
   106     TBool iNoActiveCall;
       
   107     
       
   108     };
       
   109 
       
   110 #endif // UT_MUSAOCALLEVENTMONITOR_H