phoneengine/phoneservices/inc/keysequencerecognitionservice.h
branchGCC_SURGE
changeset 51 f39ed5e045e0
parent 40 bab96b7ed1a4
parent 46 bc5a64e5bc3c
equal deleted inserted replaced
40:bab96b7ed1a4 51:f39ed5e045e0
     1 /*!
       
     2 * Copyright (c) 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:  Provides key sequence recognition and execution services.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef KEYSEQUENCERECOGNITIONSERVICE_H
       
    19 #define KEYSEQUENCERECOGNITIONSERVICE_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <QString>
       
    23 #include <xqserviceprovider.h>
       
    24 
       
    25 class MPEKeySequenceRecognitionIF;
       
    26 
       
    27 class KeySequenceRecognitionService : public XQServiceProvider
       
    28 {
       
    29     Q_OBJECT
       
    30 
       
    31 public:
       
    32 
       
    33     KeySequenceRecognitionService(
       
    34         MPEKeySequenceRecognitionIF &keySequenceRecognizer,
       
    35         QObject *parent = 0);
       
    36     
       
    37     ~KeySequenceRecognitionService();
       
    38     
       
    39 public slots:
       
    40     
       
    41     /*!
       
    42         \fn executeKeySequence(const QString& keySequence)
       
    43         
       
    44         Client can use this method to execute key sequence recognition.
       
    45         Key sequence may contain for example product codes etc. that
       
    46         may cause lower layers to do any specific things.
       
    47 
       
    48         If sequence isn't recognized this method doesn't do anything.
       
    49         If sequence is recognized then task related to the code is executed.
       
    50         \param  keySequence          Key sequence to execute.
       
    51         \return True if key sequence was processed, false otherwise.
       
    52         
       
    53         Usage example:
       
    54         XQServiceRequest request(
       
    55             "com.nokia.symbian.IDtmfPlay",
       
    56             "executeKeySequence(QString)",
       
    57             true);
       
    58         request << "*#0000#";
       
    59         QVariant keySequenceProcessed;
       
    60         bool requestOk = request.send(keySequenceProcessed);
       
    61     */
       
    62     bool executeKeySequence(const QString &keySequence);
       
    63     
       
    64 private:
       
    65     
       
    66     MPEKeySequenceRecognitionIF &m_keySequenceRecognizer;
       
    67 };
       
    68 
       
    69 #endif // KEYSEQUENCERECOGNITIONSERVICE_H