phoneengine/phoneservices/src/dtmfservicedepricated.cpp
changeset 30 ebdbd102c78a
child 50 377c906a8701
equal deleted inserted replaced
27:2f8f8080a020 30:ebdbd102c78a
       
     1 /*!
       
     2 * Copyright (c) 2009-2010 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:  DTMF API to be used through Qt Highway.
       
    15 *
       
    16 */
       
    17 
       
    18 #include <xqserviceutil.h>
       
    19 #include <e32base.h>
       
    20 #include "dtmfservicedepricated.h"
       
    21 #include "qtphonelog.h"
       
    22 
       
    23 DTMFServiceDepricated::DTMFServiceDepricated(
       
    24     MPECallControlIF &call, 
       
    25     MPECallSettersIF &parameters, 
       
    26     QObject* parent) 
       
    27     : 
       
    28     XQServiceProvider(
       
    29         QLatin1String("com.nokia.services.telephony.dtmf"), parent), 
       
    30     m_call(call), 
       
    31     m_parameters(parameters)
       
    32 {
       
    33     publishAll();
       
    34 }
       
    35 
       
    36 DTMFServiceDepricated::~DTMFServiceDepricated()
       
    37 {
       
    38 }
       
    39 
       
    40 void DTMFServiceDepricated::playDTMFTone(const QChar& keyToPlay)
       
    41 {
       
    42     PHONE_DEBUG2("DTMFServiceDepricated::playDTMFTone keyToPlay:", keyToPlay);
       
    43     m_parameters.SetKeyCode(keyToPlay.unicode());
       
    44     TRAP_IGNORE( m_call.HandlePlayDTMFL() );
       
    45 }
       
    46 
       
    47 void DTMFServiceDepricated::stopDTMFPlay()
       
    48 {
       
    49     PHONE_DEBUG("DTMFServiceDepricated::stopDTMFPlay");
       
    50     m_call.HandleEndDTMF(); 
       
    51 }