phoneengine/phoneservices/inc/dtmfservice.h
changeset 21 92ab7f8d0eab
child 30 ebdbd102c78a
equal deleted inserted replaced
4:c84cf270c54f 21:92ab7f8d0eab
       
     1 /*!
       
     2 * Copyright (c) 2009 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 #ifndef DTMFSERVICE_H
       
    19 #define DTMFSERVICE_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <QString>
       
    23 #include <xqserviceprovider.h>
       
    24 #include "mpecallcontrolif.h"
       
    25 #include "mpecallsettersif.h"
       
    26 
       
    27 class DTMFService : public XQServiceProvider
       
    28 {
       
    29     Q_OBJECT
       
    30 public:
       
    31     DTMFService(MPECallControlIF &call, MPECallSettersIF &parameters, QObject *parent = 0);
       
    32     ~DTMFService();
       
    33     
       
    34 public slots:
       
    35     /*!
       
    36         \fn recognizeKeySequence(const QString& keySequence)
       
    37         
       
    38         Client can use this method to execute key sequence recognition.
       
    39         Key sequence may contain for example product codes etc. that
       
    40         may cause lower layers to do any specific things.
       
    41 
       
    42         If sequence isn't recognized this method doesn't do anything.
       
    43         If sequence is recognized then task related to the code is executed.
       
    44 
       
    45         Usage example:
       
    46         XQServiceRequest snd("com.nokia.services.telephony","executeKeySequence(QString)");
       
    47         snd << "*#0000#";
       
    48     */
       
    49     void executeKeySequence(const QString& keySequence);
       
    50     
       
    51     /*!
       
    52         \fn playDTMFTone(const QChar& keyToPlay)
       
    53         
       
    54         This method plays DTMF tone matching given character.
       
    55         If character doesn't match any supported DTMF tone
       
    56         it is ignored.
       
    57         
       
    58         Usage example:
       
    59         XQServiceRequest snd("com.nokia.services.telephony","playDTMFTone(QChar)");
       
    60         snd << "5";
       
    61     */
       
    62     void playDTMFTone(const QChar& keyToPlay);
       
    63 
       
    64     /*!
       
    65         \fn stopDTMFPlay()
       
    66         
       
    67         This method stops playing DTMF tone if it is currently played.
       
    68     */
       
    69     void stopDTMFPlay();
       
    70     
       
    71     
       
    72 private:
       
    73     MPECallControlIF &m_call;
       
    74     MPECallSettersIF &m_parameters;    
       
    75 };
       
    76 
       
    77 #endif // DTMFSERVICE_H