mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/inc/ut_musaocalleventmonitor.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:31:01 +0100
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201032 Kit: 201035

/*
* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Monitor that observes the status of the current CS call
*
*/



#ifndef UT_MUSAOCALLEVENTMONITOR_H
#define UT_MUSAOCALLEVENTMONITOR_H

#include "muscallmonitorobserver.h"

#include <etelmm.h>
#include <digia/eunit/ceunittestsuiteclass.h>


class CMusAoCallEventMonitor;

/**
 * Monitor, which observes status of current cs call
 * Observers will be notified, when call status is idle
 * i.e. call has ended.
 *
 * @lib ut_mushaoplugin.dll
 */
NONSHARABLE_CLASS( UT_CMusAoCallEventMonitor )
    : public CEUnitTestSuiteClass, public MMusCallMonitorObserver
    {

public: // constructors and destructor

    /**
     * Destructor.
     */
    ~UT_CMusAoCallEventMonitor();

    /**
     * Two-phased constructor. Leaves on failure.
     * @return The constructed CMusAoCallMonitorTest object.
     */
    static UT_CMusAoCallEventMonitor* NewLC();

private:

    /**
     * C++ constructor.
     */
    UT_CMusAoCallEventMonitor();

    /**
     * Symbian 2nd-phase constructor.
     */
    void ConstructL();
    

private: // test MMusCallMonitorObserver      
    
    virtual void CallConnectedL( const TDesC& aTelNumber );
    
    virtual void CallHoldL( const TDesC& aTelNumber );
    
    virtual void ConferenceCallL();
    
    virtual void NoActiveCallL();
    

public: 

    void UT_ConnectedCallCountLL();
    
    void UT_RunLL();    

    void UT_ExamineEventLL();

private:

    void SetupL();
    
    void Teardown();
    
    void ResetObserverFlags();

private: // data

    CMusAoCallEventMonitor* iMonitor;
    
    EUNIT_DECLARE_TEST_TABLE; 
    
    TBool iCallConnected;
    
    TBool iCallHold;
    
    TBool iConferenceCall;
    
    TBool iNoActiveCall;
    
    };

#endif // UT_MUSAOCALLEVENTMONITOR_H