phoneengine/callhandling/inc/cpedtmfhandling.h
changeset 36 2eacb6118286
parent 30 ebdbd102c78a
child 37 ba76fc04e6c2
equal deleted inserted replaced
30:ebdbd102c78a 36:2eacb6118286
     1 /*
       
     2 * Copyright (c) 2002-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:  This file contains the header file of the CPEDtmfHandling class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CPEDTMFHANDLING_H
       
    21 #define CPEDTMFHANDLING_H
       
    22 
       
    23 //INCLUDES
       
    24 #include <pevirtualengine.h>
       
    25 #include <mccedtmfobserver.h>
       
    26 
       
    27 //CONSTANTS
       
    28 //None.
       
    29 
       
    30 // MACROS
       
    31 //None.
       
    32 
       
    33 // DATA TYPES
       
    34 //None.
       
    35 
       
    36 // FUNCTION PROTOTYPES
       
    37 //None.
       
    38 
       
    39 // FORWARD DECLARATIONS
       
    40 class CPECallHandling;
       
    41 class MCCEDtmfInterface;
       
    42 class CCCE;
       
    43 
       
    44 // CLASS DECLARATION
       
    45 
       
    46 /**
       
    47 *  Handles dtmf commands.
       
    48 *
       
    49 *  @lib callhandling.lib
       
    50 *  @since Series60_4.0
       
    51 */
       
    52 class CPEDtmfHandling : public CBase,
       
    53                         public MCCEDtmfObserver
       
    54     {
       
    55     public: //Constructors and descructor
       
    56         
       
    57         /**
       
    58         * Two-phased constructor.
       
    59         */
       
    60         IMPORT_C static CPEDtmfHandling* NewL( 
       
    61             CPECallHandling& aOwner, 
       
    62             MCCEDtmfInterface& aDtmfInterface );
       
    63 
       
    64         /**
       
    65         * Destructor.
       
    66         */
       
    67         virtual IMPORT_C ~CPEDtmfHandling();
       
    68 
       
    69     protected:  //Constructors and descructor
       
    70         /**
       
    71         * C++ default constructor.
       
    72         */
       
    73         IMPORT_C CPEDtmfHandling( 
       
    74             CPECallHandling& aOwner, 
       
    75             MCCEDtmfInterface& aDtmfInterface );
       
    76 
       
    77         /**
       
    78         * By default Symbian 2nd phase constructor is private.
       
    79         */
       
    80         virtual IMPORT_C void ConstructL();
       
    81 
       
    82     public: // From MCCEDtmfObserver
       
    83                                        
       
    84         /**
       
    85         * All the occurred DTMF events are notified through this interface
       
    86         *
       
    87         * @since S60 3.2
       
    88         * @param aEvent Event code
       
    89         * @param aError Error code
       
    90         * @param aTone tone 
       
    91         * @return none
       
    92         */
       
    93         IMPORT_C void HandleDTMFEvent( const MCCEDtmfObserver::TCCEDtmfEvent aEvent, 
       
    94                                        const TInt aError, 
       
    95                                        const TChar aTone );
       
    96                    
       
    97     public: // New functions
       
    98 
       
    99         /**
       
   100         * Cancels Dtmf String sending
       
   101         * @since Series60_4.0
       
   102         * @param  None.
       
   103         * @return None.
       
   104         */
       
   105         void CancelDtmfString();
       
   106 
       
   107         /**
       
   108         * Allows a client to continue the sending of a dtmf string when it was
       
   109         * stopped by use of 'w' char in the string
       
   110         * @since Series60_4.0
       
   111         * @param  None.
       
   112         * @return None.
       
   113         */
       
   114         void ContinueDtmfSending();
       
   115 
       
   116         /**
       
   117         * Send dtmf string to the etel 
       
   118         * @since Series60_4.0
       
   119         * @param  aTones dtmf string
       
   120         * @return None.
       
   121         */
       
   122         TInt SendDtmfString( const TDesC& aTones );
       
   123 
       
   124         /**
       
   125         * allows a client initiate the sending of a DTMF tone
       
   126         * @since Series60_4.0
       
   127         * @param  aTone dtmf tone
       
   128         * @return None.
       
   129         */
       
   130         TInt StartDtmfTone( const TChar& aTone ) const;
       
   131 
       
   132         /**
       
   133         * Allows a client to cancel the sending of a dtmf string when it was 
       
   134         * stopped by use of 'w' char in the string
       
   135         * @since Series60_4.0
       
   136         * @param  None.
       
   137         * @return None.
       
   138         */
       
   139         void StopDtmfSending();
       
   140 
       
   141         /**
       
   142         * allows a client terminate the sending of a DTMF tone
       
   143         * @since Series60_4.0
       
   144         * @param  None.
       
   145         * @return None.
       
   146         */
       
   147         TInt StopDtmfTone() const;
       
   148 
       
   149     protected:
       
   150     
       
   151         // CPECallHandling object which owns this Sender
       
   152         CPECallHandling& iOwner;
       
   153         // MCCEDtmfInterface& object which make dtmf requests to the mmetel.
       
   154         MCCEDtmfInterface& iDtmfInterface;
       
   155 };
       
   156 
       
   157 #endif // CPEDTMFHANDLING_H
       
   158 
       
   159 // End of File