diff -r 2eacb6118286 -r ba76fc04e6c2 phoneengine/phoneservices/inc/keysequencerecognitionservice.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phoneengine/phoneservices/inc/keysequencerecognitionservice.h Fri Jun 04 10:19:18 2010 +0100 @@ -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 +#include +#include + +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