diff -r c84cf270c54f -r 92ab7f8d0eab phoneengine/phoneservices/src/dtmfservice.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phoneengine/phoneservices/src/dtmfservice.cpp Fri Mar 19 09:28:42 2010 +0200 @@ -0,0 +1,51 @@ +/*! +* Copyright (c) 2009 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 +#include +#include +#include "dtmfservice.h" + +DTMFService::DTMFService(MPECallControlIF &call, MPECallSettersIF ¶meters, QObject* parent) : + XQServiceProvider(QLatin1String("com.nokia.services.telephony.dtmf"), parent), m_call (call), m_parameters (parameters) +{ + publishAll(); +} + +DTMFService::~DTMFService() +{ +} + +void DTMFService::executeKeySequence(const QString& keySequence) +{ + qDebug () << "DTMFService::executeKeySequence keySequence:" << keySequence; + TPtrC16 keySequencePtr (reinterpret_cast(keySequence.utf16 ())); + m_parameters.SetPhoneNumber (keySequencePtr); +} + +void DTMFService::playDTMFTone(const QChar& keyToPlay) +{ + qDebug () << "DTMFService::playDTMFTone keyToPlay:" << keyToPlay; + m_parameters.SetKeyCode(keyToPlay.unicode()); + TRAP_IGNORE( m_call.HandlePlayDTMFL() ); +} + +void DTMFService::stopDTMFPlay() +{ + qDebug () << "DTMFService::stopDTMFPlay"; + m_call.HandleEndDTMF(); +}