1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/boardsupport/haitest/bspsvs/suite/bsp/keypad/inc/T_KeypadDriverData.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,127 @@
1.4 +/*
1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#if (!defined __T_KEYPAD_DRIVER_DATA_H__)
1.23 +#define __T_KEYPAD_DRIVER_DATA_H__
1.24 +
1.25 +// User Includes
1.26 +#include "T_HALData.h"
1.27 +#include "ActiveCallbackBase.h"
1.28 +
1.29 +// Epoc Includes
1.30 +#include <e32twin.h>
1.31 +
1.32 +/**
1.33 + * Test Active Notification class
1.34 + *
1.35 + */
1.36 +class CT_KeypadDriverData : public CT_HALData
1.37 + {
1.38 +public:
1.39 + /**
1.40 + * Public destructor
1.41 + */
1.42 + ~CT_KeypadDriverData();
1.43 +
1.44 + /**
1.45 + * Two phase constructor
1.46 + *
1.47 + * @leave system wide error
1.48 + */
1.49 + static CT_KeypadDriverData* NewL();
1.50 +
1.51 + virtual TAny* GetObject();
1.52 + virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
1.53 +
1.54 +protected:
1.55 + /**
1.56 + * Protected constructor. First phase construction
1.57 + */
1.58 + CT_KeypadDriverData();
1.59 +
1.60 + void ConstructL();
1.61 +
1.62 + static TBool GetPrepareNothing(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValueStart, TInt& aValueEnd);
1.63 +
1.64 + static void SetKeyboardState(CDataWrapperBase* aThis, TInt aValue);
1.65 + static void SetKeyboard(CDataWrapperBase* aThis, TInt aValue);
1.66 + static void SetKeyboardDeviceKeys(CDataWrapperBase* aThis, TInt aValue);
1.67 + static void SetKeyboardAppKeys(CDataWrapperBase* aThis, TInt aValue);
1.68 + static void SetKeyboardClick(CDataWrapperBase* aThis, TInt aValue);
1.69 + static void SetKeyboardClickVolumeMax(CDataWrapperBase* aThis, TInt aValue);
1.70 + static void SetKeyboardClickState(CDataWrapperBase* aThis, TInt aValue);
1.71 + static void SetKeyboardClickVolume(CDataWrapperBase* aThis, TInt aValue);
1.72 +
1.73 +private:
1.74 +
1.75 + void DoCmdGetScanCodesL(const TDesC& aSection);
1.76 + void DoCmdGetModifiersL(const TDesC& aSection);
1.77 + void DoCmdTestAllKeysL(const TInt aAsyncErrorIndex);
1.78 + void DoCmdTestOneModifierOneOtherKeyL(const TDesC& aSection, const TInt aAsyncErrorIndex);
1.79 + void DoCmdTestTwoKeysL(const TDesC& aSection, const TInt aAsyncErrorIndex);
1.80 + void DoCmdTestMultipleKeysL(const TDesC& aSection, const TInt aAsyncErrorIndex);
1.81 + void DoCmdVerifyKeypadState(const TDesC& aSection, const TInt aAsyncErrorIndex);
1.82 + void DoCmdPromptUser(const TDesC& aSection, const TInt aAsyncErrorIndex);
1.83 + void DoCancel(CActive* aActive, TInt aIndex); // cancel the request
1.84 + void RunL(CActive* aActive, TInt aIndex); // handle completed request
1.85 +
1.86 + //utility functions
1.87 + void ProcessResults();
1.88 +
1.89 +protected:
1.90 + TInt iKeyboardState;
1.91 + TInt iKeyboard;
1.92 + TInt iKeyboardDeviceKeys;
1.93 + TInt iKeyboardAppKeys;
1.94 + TInt iKeyboardClick;
1.95 + TInt iKeyboardClickVolumeMax;
1.96 + TInt iKeyboardClickState;
1.97 + TInt iKeyboardClickVolume;
1.98 + CActiveCallback* iActiveKey;
1.99 + CActiveCallback* iActiveCombination;
1.100 + CActiveCallbackBase* iActiveKeypadState;
1.101 + CActiveCallback* iActivePrompt;
1.102 + TInt iExpectedState;
1.103 + TInt iKeyCount;
1.104 + TInt iCombinationCount;
1.105 + TInt iCombinationKeyCount;
1.106 + TBool iFailTest;
1.107 + TPtrC iUserPromptStr;
1.108 + TPtrC iPassKeyStr;
1.109 + TInt iPassKey;
1.110 +
1.111 +
1.112 +private:
1.113 + RConsole iConsole;
1.114 + TConsoleKey iKey;
1.115 + static const TEnumEntryTable iEnumTableScanCodes[];
1.116 + static const TEnumEntryTable iEnumTableCoverage[];
1.117 + static const THalTableLookup iTableLookup[];
1.118 + RArray<TPtrC> iPossibleScanCodeStrStore;
1.119 + RArray<TInt> iPossibleScanCodeStore;
1.120 + RArray<TPtrC> iPossibleModifierStrStore;
1.121 + RArray<TInt> iPossibleModifierStore;
1.122 + RArray<TPtrC> iAllPossibleKeysStrStore;
1.123 + RArray<TInt> iAllPossibleKeysStore;
1.124 + RArray<TIniDataName> iCombinationStrStore;
1.125 + RArray<TInt> iExpectedStore;
1.126 + RArray<TInt> iActualStore;
1.127 + RArray<TInt> iEventStore;
1.128 + };
1.129 +
1.130 +#endif /* __T_KEYPAD_DRIVER_DATA_H__ */