convergedcallengine/csplugin/inc/cspetellinestatusmonitor.h
branchRCL_3
changeset 20 987c9837762f
parent 0 ff3b6d0fd310
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Declarations for class CSPEtelLineStatusMonitor
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CSPETELLINESTATUSMONITOR_H_
       
    20 #define CSPETELLINESTATUSMONITOR_H_
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <etelmm.h>
       
    24 #include "rcsplinecontainer.h"
       
    25 
       
    26 class MCSPLineStatusObserver;
       
    27 
       
    28 /**
       
    29 * Monitors single ETel RMobileLine for calls.
       
    30 *
       
    31 *  This monitor is applied only for listening line status changes 
       
    32 *
       
    33 *  @lib csplugin.dll
       
    34 *  @since S60 5.0
       
    35 */
       
    36 NONSHARABLE_CLASS(CSPEtelLineStatusMonitor): public CActive
       
    37     {
       
    38     
       
    39     public: //Constructors and descructor    
       
    40     
       
    41         /**
       
    42         * Two-phased constructing for the monitor.
       
    43         *
       
    44         * @param aObserver the observer for getting notification
       
    45         * @param aLine the line to monitor
       
    46         * @param aLineId line identifier
       
    47         */
       
    48         static CSPEtelLineStatusMonitor* NewL( 
       
    49                 MCSPLineStatusObserver& aObserver,
       
    50                 RMobileLine& aLine,
       
    51                 RCSPLineContainer::TCSPLineId aLineId );
       
    52 
       
    53         /**
       
    54         * C++ default destructor
       
    55         */
       
    56         virtual ~CSPEtelLineStatusMonitor( );
       
    57 
       
    58         /**
       
    59         * Start monitoring call events
       
    60         * @since S60 5.0
       
    61         */
       
    62         void StartMonitoring();
       
    63     
       
    64     protected: // From CActive
       
    65         /**
       
    66         * From CActive
       
    67         * RunL
       
    68         * @since S60 5.0 
       
    69         */
       
    70         void RunL();
       
    71         
       
    72         /**
       
    73         * From CActive
       
    74         * Cancels the monitor
       
    75         * @since S60 5.0 
       
    76         */
       
    77         void DoCancel();
       
    78 
       
    79     private:
       
    80         
       
    81         /**
       
    82         * C++ default constructor
       
    83         * @param aObserver the observer for status change
       
    84         * @param aLine the line associated with the call
       
    85         * @param aLineId line identifier
       
    86         */
       
    87         CSPEtelLineStatusMonitor( MCSPLineStatusObserver& aObserver, 
       
    88                                  RMobileLine& aLine,
       
    89                                  RCSPLineContainer::TCSPLineId aLineId );
       
    90                                                   
       
    91     private: // data
       
    92 
       
    93         /**
       
    94         * Line status from ETel.
       
    95         */         
       
    96         RMobileCall::TMobileCallStatus iLineStatus; 
       
    97         
       
    98         /**
       
    99         * Line that is being observed for status changes.
       
   100         */
       
   101         RMobileLine& iLine;
       
   102         
       
   103         /**
       
   104         * Line identifier / type.
       
   105         */
       
   106         RCSPLineContainer::TCSPLineId iLineId;
       
   107         
       
   108         /**
       
   109         * Line status notifications observer.
       
   110         */
       
   111         MCSPLineStatusObserver& iObserver;
       
   112         
       
   113     };
       
   114 
       
   115 #endif /*CSPETELLINESTATUSMONITOR_H_*/