diff -r 2f8f8080a020 -r ebdbd102c78a phoneengine/phoneservices/src/keysequencerecognitionservicedepricated.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phoneengine/phoneservices/src/keysequencerecognitionservicedepricated.cpp Fri May 14 15:51:57 2010 +0300 @@ -0,0 +1,60 @@ +/*! +* 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. +* +*/ + +#include +#include +#include +#include "keysequencerecognitionservicedepricated.h" +#include "mpekeysequencerecognitionif.h" + +/*! + KeySequenceRecognitionServiceDepricated::KeySequenceRecognitionServiceDepricated. + */ +KeySequenceRecognitionServiceDepricated::KeySequenceRecognitionServiceDepricated( + MPEKeySequenceRecognitionIF &keySequenceRecognizer, + QObject* parent) + : + XQServiceProvider( + QLatin1String("com.nokia.services.telephony"), parent), + m_keySequenceRecognizer(keySequenceRecognizer) +{ + publishAll(); +} + + +/*! + KeySequenceRecognitionServiceDepricated::~KeySequenceRecognitionServiceDepricated. + */ +KeySequenceRecognitionServiceDepricated::~KeySequenceRecognitionServiceDepricated() +{ +} + + +/*! + KeySequenceRecognitionServiceDepricated::executeKeySequence. + */ +bool KeySequenceRecognitionServiceDepricated::executeKeySequence( + const QString &keySequence) +{ + TPtrC16 keySequencePtr( + reinterpret_cast(keySequence.utf16())); + bool sequenceProcessed = false; + TRAPD(leaveCode, sequenceProcessed = static_cast( + m_keySequenceRecognizer.ExecuteKeySequenceL(keySequencePtr))); + sequenceProcessed = (KErrNone == leaveCode) ? sequenceProcessed : false; + return sequenceProcessed; +}