phoneengine/phoneservices/src/dtmfservice.cpp
author William Roberts <williamr@symbian.org>
Thu, 22 Jul 2010 16:33:21 +0100
branchGCC_SURGE
changeset 51 f39ed5e045e0
parent 30 ebdbd102c78a
parent 37 ba76fc04e6c2
permissions -rw-r--r--
Catchup to latest Symbian^4

/*!
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  DTMF API to be used through Qt Highway.
*
*/

#include <xqserviceutil.h>
#include <e32base.h>
#include "dtmfservice.h"
#include "qtphonelog.h"

DTMFService::DTMFService(
    MPECallControlIF &call, 
    MPECallSettersIF &parameters, 
    QObject* parent) 
    : 
    XQServiceProvider(
        QLatin1String("com.nokia.symbian.IDtmfPlay"), parent), 
    m_call(call), 
    m_parameters(parameters)
{
    publishAll();
}

DTMFService::~DTMFService()
{
}

void DTMFService::playDTMFTone(const QChar& keyToPlay)
{
    PHONE_DEBUG2("DTMFService::playDTMFTone keyToPlay:", keyToPlay);
    m_parameters.SetKeyCode(keyToPlay.unicode());
    TRAP_IGNORE( m_call.HandlePlayDTMFL() );
}

void DTMFService::stopDTMFPlay()
{
    PHONE_DEBUG("DTMFService::stopDTMFPlay");
    m_call.HandleEndDTMF(); 
}