mmshplugins/mmshaoplugin/inc/muscallconferencemonitor.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 the status of the call.
*
*/



#ifndef MUSCALLCONFERENCEMONITOR_H
#define MUSCALLCONFERENCEMONITOR_H

#include "musunittesting.h"
#include "mussesseioninformationapi.h"
#include "muscallmonitor.h"

#include <etelmm.h>
#include <e32base.h>

class CMusCallConferenceEventMonitor;

/**
 * Monitors the event of call and set the state to property. 
 *
 * @lib musaoplugin.dll
 */
class CMusCallConferenceMonitor : public CActive
    {

    public: 
        /**
         * Two-phased constructor. Leaves on failure.
         * aCall is not owned.
         * @return CMusCallConferenceMonitor object.
         */
        static CMusCallConferenceMonitor* NewL(
                               RMobilePhone& aPhone, RMobileLine& aLine,
                               RPointerArray<CMusCallMonitor>& aCallMonitorArray);
                                
        /**
         * Destructor.
         */
        ~CMusCallConferenceMonitor();     

         /**
          * Checks the Conference Status and 
          * sets the multimediasharing propery key value          
          */
        void SetStateL();  

    private:

        /**
         * C++ constructor.
         */
        CMusCallConferenceMonitor(
                             RMobileLine& aLine,
                             RPointerArray<CMusCallMonitor>& aCallMonitorArray );

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

        /**
          * Sets the multimediasharing propery key value
          * if the value is same before then dont report it.
          */
        void SetStateL(NMusSessionInformationApi::TMusCallEvent aVal);

        /**
          * Add / Remove Call Monitors based on Mus criteria          
          */
        void MonitorCallL();

    private:

        /**
         * Handles an active object's request completion event.
         */
        void RunL();
        
        /**
         * cancels of an outstanding request
         */        
        void DoCancel();

         /*
         * Handles a leave occurring in the request completion 
         * event handler RunL().
         * Always return KErrNone since it must handle this error
         * if it comes to this place.
         */
        TInt RunError( TInt aError );


    private: 

        /**
         * Reference of RMobileLine.Not Owned.
         */
        
        RMobileLine& iLine;
       
        /**
         * Reference of RMobileConferenceCall.
         */
        RMobileConferenceCall iConfCall;

        /**
         * Conference Event.
         */
        RMobileConferenceCall::TMobileConferenceStatus iConfStatus;

         /**
         * Array of Call Monitors.Not Owned
         */
        RPointerArray<CMusCallMonitor>& iCallMonitorArray;

        /**
         * Monitors the conference call events. For example a particular call
         * which is in conference dropped will be reported as part of
         * conference event.
         */
        CMusCallConferenceEventMonitor* iConfCallEvent;
      
        MUS_UNITTEST( UT_CMusCallConferenceMonitor )        
        
    };

#endif // MUSCALLCONFERENCEMONITOR_H