mmserv/tms/tmscallserver/inc/tmseteldtmfstopmonitor.h
changeset 14 80975da52420
equal deleted inserted replaced
12:5a06f39ad45b 14:80975da52420
       
     1 /*
       
     2  * Copyright (c) 2009 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: Telephony Multimedia Service
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef TMSETELDTMFSTOPMONITOR_H
       
    19 #define TMSETELDTMFSTOPMONITOR_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <etelmm.h>
       
    23 
       
    24 namespace TMS {
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class TMSDTMFProvider;
       
    28 
       
    29 /**
       
    30  * TMSEtelDtmfStopMonitor class
       
    31  *
       
    32  * Monitors single ETel RMobilePhone for DTMF events.
       
    33  *
       
    34  * This monitor is applied only for listening incoming calls, i.e.
       
    35  * line capabilites are not monitored.
       
    36  *
       
    37  */
       
    38 class TMSEtelDtmfStopMonitor : public CActive
       
    39     {
       
    40 public:
       
    41     /**
       
    42      * Two-phased constructing for the monitor.
       
    43      *
       
    44      * @param aObserver the observer for getting notification
       
    45      * @param aPhone the line to monitor
       
    46      */
       
    47     static TMSEtelDtmfStopMonitor* NewL(TMSDTMFProvider& aObserver,
       
    48             RMobilePhone& aPhone);
       
    49 
       
    50     /**
       
    51      * C++ default destructor
       
    52      */
       
    53     virtual ~TMSEtelDtmfStopMonitor();
       
    54 
       
    55     /**
       
    56      * Start monitoring call events
       
    57      */
       
    58     void StartMonitoring();
       
    59 
       
    60 protected: // From CActive
       
    61     /**
       
    62      * From CActive
       
    63      * RunL
       
    64      */
       
    65     void RunL();
       
    66 
       
    67     /**
       
    68      * From CActive
       
    69      * Cancels the monitor
       
    70      */
       
    71     void DoCancel();
       
    72 
       
    73 private:
       
    74     /**
       
    75      * C++ default constructor
       
    76      * @param aObserver the observer for status change (incoming call)
       
    77      * @param aPhone the line associated with the call
       
    78      */
       
    79     TMSEtelDtmfStopMonitor(TMSDTMFProvider& aObserver, RMobilePhone& aPhone);
       
    80 
       
    81 private:
       
    82     /**
       
    83      * Forwards events.
       
    84      */
       
    85     TMSDTMFProvider& iObserver;
       
    86 
       
    87     /**
       
    88      * Phone that is being observed for incoming call.
       
    89      */
       
    90     RMobilePhone& iPhone;
       
    91 
       
    92     /**
       
    93      * Event received.
       
    94      */
       
    95     RMobilePhone::TMobilePhoneDTMFEvent iEventData;
       
    96 
       
    97     };
       
    98 
       
    99 } //namespace TMS
       
   100 
       
   101 #endif // TMSETELDTMFSTOPMONITOR_H
       
   102