phoneengine/phoneservices/inc/keysequencerecognitionservice.h
changeset 30 ebdbd102c78a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneengine/phoneservices/inc/keysequencerecognitionservice.h	Fri May 14 15:51:57 2010 +0300
@@ -0,0 +1,69 @@
+/*!
+* Copyright (c) 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:  Provides key sequence recognition and execution services.
+*
+*/
+
+#ifndef KEYSEQUENCERECOGNITIONSERVICE_H
+#define KEYSEQUENCERECOGNITIONSERVICE_H
+
+#include <QObject>
+#include <QString>
+#include <xqserviceprovider.h>
+
+class MPEKeySequenceRecognitionIF;
+
+class KeySequenceRecognitionService : public XQServiceProvider
+{
+    Q_OBJECT
+
+public:
+
+    KeySequenceRecognitionService(
+        MPEKeySequenceRecognitionIF &keySequenceRecognizer,
+        QObject *parent = 0);
+    
+    ~KeySequenceRecognitionService();
+    
+public slots:
+    
+    /*!
+        \fn executeKeySequence(const QString& keySequence)
+        
+        Client can use this method to execute key sequence recognition.
+        Key sequence may contain for example product codes etc. that
+        may cause lower layers to do any specific things.
+
+        If sequence isn't recognized this method doesn't do anything.
+        If sequence is recognized then task related to the code is executed.
+        \param  keySequence          Key sequence to execute.
+        \return True if key sequence was processed, false otherwise.
+        
+        Usage example:
+        XQServiceRequest request(
+            "com.nokia.symbian.IDtmfPlay",
+            "executeKeySequence(QString)",
+            true);
+        request << "*#0000#";
+        QVariant keySequenceProcessed;
+        bool requestOk = request.send(keySequenceProcessed);
+    */
+    bool executeKeySequence(const QString &keySequence);
+    
+private:
+    
+    MPEKeySequenceRecognitionIF &m_keySequenceRecognizer;
+};
+
+#endif // KEYSEQUENCERECOGNITIONSERVICE_H