phoneengine/phoneservices/src/dtmfservice.cpp
changeset 30 ebdbd102c78a
parent 22 6bb1b21d2484
child 51 f39ed5e045e0
equal deleted inserted replaced
27:2f8f8080a020 30:ebdbd102c78a
     1 /*!
     1 /*!
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    18 #include <xqserviceutil.h>
    18 #include <xqserviceutil.h>
    19 #include <e32base.h>
    19 #include <e32base.h>
    20 #include "dtmfservice.h"
    20 #include "dtmfservice.h"
    21 #include "qtphonelog.h"
    21 #include "qtphonelog.h"
    22 
    22 
    23 DTMFService::DTMFService(MPECallControlIF &call, MPECallSettersIF &parameters, QObject* parent) : 
    23 DTMFService::DTMFService(
    24     XQServiceProvider(QLatin1String("com.nokia.services.telephony.dtmf"), parent), m_call (call), m_parameters (parameters)
    24     MPECallControlIF &call, 
       
    25     MPECallSettersIF &parameters, 
       
    26     QObject* parent) 
       
    27     : 
       
    28     XQServiceProvider(
       
    29         QLatin1String("com.nokia.symbian.IDtmfPlay"), parent), 
       
    30     m_call(call), 
       
    31     m_parameters(parameters)
    25 {
    32 {
    26     publishAll();
    33     publishAll();
    27 }
    34 }
    28 
    35 
    29 DTMFService::~DTMFService()
    36 DTMFService::~DTMFService()
    30 {
    37 {
    31 }
       
    32 
       
    33 void DTMFService::executeKeySequence(const QString& keySequence)
       
    34 {
       
    35     PHONE_DEBUG2("DTMFService::executeKeySequence keySequence:", keySequence);
       
    36     TPtrC16 keySequencePtr (reinterpret_cast<const TUint16*>(keySequence.utf16 ()));
       
    37     m_parameters.SetPhoneNumber (keySequencePtr);   
       
    38 }
    38 }
    39 
    39 
    40 void DTMFService::playDTMFTone(const QChar& keyToPlay)
    40 void DTMFService::playDTMFTone(const QChar& keyToPlay)
    41 {
    41 {
    42     PHONE_DEBUG2("DTMFService::playDTMFTone keyToPlay:", keyToPlay);
    42     PHONE_DEBUG2("DTMFService::playDTMFTone keyToPlay:", keyToPlay);