convergedcallengine/csplugin/inc/cspetelcallstatusmonitor.h
branchRCL_3
changeset 19 7d48bed6ce0c
parent 18 594d59766373
child 20 987c9837762f
equal deleted inserted replaced
18:594d59766373 19:7d48bed6ce0c
     1 /*
       
     2 * Copyright (c) 2007 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:  Monitors call status changes from ETel
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CSPETELCALLSTATUSMONITOR_H
       
    20 #define CSPETELCALLSTATUSMONITOR_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <etelmm.h>
       
    24 
       
    25 class MCSPCallObserver;
       
    26 
       
    27 
       
    28 NONSHARABLE_CLASS(CSPEtelCallStatusMonitor) : public CActive
       
    29     {
       
    30     public: //Constructors and descructor
       
    31     
       
    32         /**
       
    33         * Two-phased constructing for the monitor.
       
    34         * @param aObserver observer for call status changes
       
    35         * @param aCall actual object of the monitoring
       
    36         */
       
    37         static CSPEtelCallStatusMonitor* NewL( MCSPCallObserver& aObserver, 
       
    38                                                RMobileCall& aCall );
       
    39         
       
    40         /**
       
    41         * Destructor of the monitor which cancels ongoing monitoring.
       
    42         */
       
    43         virtual ~CSPEtelCallStatusMonitor( );
       
    44         
       
    45         /**
       
    46         * Start monitoring call events
       
    47         * @since S60 3.2
       
    48         */
       
    49         void StartMonitoring();
       
    50         
       
    51         /**
       
    52         * State of call.
       
    53         * @return ETel state
       
    54         */
       
    55         RMobileCall::TMobileCallStatus State();
       
    56         
       
    57     protected: // From CActive
       
    58         /**
       
    59         * From CActive
       
    60         * RunL
       
    61         * @since S60 3.2
       
    62         */
       
    63         void RunL();
       
    64         
       
    65         
       
    66         /**
       
    67         * From CActive
       
    68         * Cancels the monitor
       
    69         * @since S60 3.2
       
    70         */
       
    71         void DoCancel();
       
    72 
       
    73         
       
    74     private:
       
    75     
       
    76         /**
       
    77         * C++ constructor for the monitor.
       
    78         * @param aObserver observer for status changes
       
    79         * @param aCall actual object of the monitoring
       
    80         */
       
    81         CSPEtelCallStatusMonitor( MCSPCallObserver& aObserver, RMobileCall& aCall );
       
    82         
       
    83     private: // data
       
    84         /**
       
    85         * Observer for state changes.
       
    86         */
       
    87         MCSPCallObserver& iObserver;
       
    88         
       
    89         /**
       
    90         * ETel call which this monitors
       
    91         */
       
    92         RMobileCall& iCall;
       
    93         
       
    94         /**
       
    95         * Pointer for recovering from a situation where CCE releases call 
       
    96         * during observer-call sequence.
       
    97         */
       
    98         TBool* iDestrPtr;
       
    99 
       
   100     protected:
       
   101         /**
       
   102         * ETel call status
       
   103         */
       
   104         RMobileCall::TMobileCallStatus iCallStatus;
       
   105 
       
   106     };
       
   107 
       
   108 #endif // CSPETELCALLSTATUSMONITOR_H