telutils/keysequencerecognitionservice/tsrc/ut_lifetimerkeysequencehandler/ut_lifetimerkeysequencehandler.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef UT_LIFETIMERKEYSEQUENCEHANDLER_H
       
    19 #define UT_LIFETIMERKEYSEQUENCEHANDLER_H
       
    20 
       
    21 #include <QtTest/QtTest>
       
    22 #include <mockservice.h>
       
    23 #include <etel.h>
       
    24 
       
    25 class LifeTimerKeySequenceHandler;
       
    26 
       
    27 class UT_LifeTimerKeySequenceHandler : public QObject, public MockService
       
    28 {
       
    29     Q_OBJECT
       
    30 
       
    31 public:    
       
    32     
       
    33     UT_LifeTimerKeySequenceHandler();
       
    34     ~UT_LifeTimerKeySequenceHandler();
       
    35 
       
    36 private:
       
    37     void setLifeTimerData(
       
    38         TUint32 aKey,
       
    39         TInt & aValue );
       
    40     void setMobilePhoneCount(
       
    41         TInt & aNoOfPhones);
       
    42     void setMobilePhoneInfo(
       
    43         const TInt aIndex,
       
    44         RTelServer::TPhoneInfo & aInfo );
       
    45     void setLifeTimeData(
       
    46         TDes8& aLifeTimeInfo);
       
    47     
       
    48 private slots:
       
    49 
       
    50     void init();
       
    51     void cleanup();
       
    52     
       
    53     void t_constructionFails();
       
    54     void t_keySequenceValidator();
       
    55     void t_executeValidKeySequence();
       
    56     void t_executeInvalidKeySequence();
       
    57     void t_executeKeySequenceEtelConnectionCreationFails();
       
    58     void t_executeKeySequenceLifeTimeDataQueryFails();
       
    59     
       
    60 private:
       
    61     LifeTimerKeySequenceHandler *m_handler;
       
    62 };
       
    63 
       
    64 #endif  // UT_LIFETIMERKEYSEQUENCEHANDLER_H