author | sl@SLION-WIN7.fritz.box |
Fri, 15 Jun 2012 03:10:57 +0200 | |
changeset 0 | bde4ae8d615e |
permissions | -rw-r--r-- |
sl@0 | 1 |
/* |
sl@0 | 2 |
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
sl@0 | 3 |
* All rights reserved. |
sl@0 | 4 |
* This component and the accompanying materials are made available |
sl@0 | 5 |
* under the terms of "Eclipse Public License v1.0" |
sl@0 | 6 |
* which accompanies this distribution, and is available |
sl@0 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
sl@0 | 8 |
* |
sl@0 | 9 |
* Initial Contributors: |
sl@0 | 10 |
* Nokia Corporation - initial contribution. |
sl@0 | 11 |
* |
sl@0 | 12 |
* Contributors: |
sl@0 | 13 |
* |
sl@0 | 14 |
* Description: |
sl@0 | 15 |
* |
sl@0 | 16 |
*/ |
sl@0 | 17 |
|
sl@0 | 18 |
|
sl@0 | 19 |
#if (!defined __T_ACTIVE_R_CONSOLE_READ_H__) |
sl@0 | 20 |
#define __T_ACTIVE_R_CONSOLE_READ_H__ |
sl@0 | 21 |
|
sl@0 | 22 |
// EPOC includes |
sl@0 | 23 |
#include <e32twin.h> |
sl@0 | 24 |
#include <e32keys.h> |
sl@0 | 25 |
|
sl@0 | 26 |
// User Includes |
sl@0 | 27 |
#include "DataWrapperBase.h" |
sl@0 | 28 |
#include "ActiveCallbackBase.h" |
sl@0 | 29 |
#include "DrawUtils.h" |
sl@0 | 30 |
|
sl@0 | 31 |
class CT_ActiveRConsoleRead : public CActiveCallbackBase |
sl@0 | 32 |
|
sl@0 | 33 |
/** |
sl@0 | 34 |
* Test Active Notification class |
sl@0 | 35 |
@test |
sl@0 | 36 |
@publishedPartner |
sl@0 | 37 |
@see CActiveCallbackBase |
sl@0 | 38 |
*/ |
sl@0 | 39 |
{ |
sl@0 | 40 |
protected: |
sl@0 | 41 |
enum TEventOccurance |
sl@0 | 42 |
{ |
sl@0 | 43 |
EEventOccuranceOnce, |
sl@0 | 44 |
EEventOccuranceZeroOrMore, |
sl@0 | 45 |
EEventOccuranceOneOrMore, |
sl@0 | 46 |
}; |
sl@0 | 47 |
|
sl@0 | 48 |
struct TEventConfig |
sl@0 | 49 |
{ |
sl@0 | 50 |
TInt iEventType; |
sl@0 | 51 |
TEventOccurance iEventOccurance; |
sl@0 | 52 |
TBool iDataVerify; |
sl@0 | 53 |
TBool iDataDraw; |
sl@0 | 54 |
}; |
sl@0 | 55 |
|
sl@0 | 56 |
public: |
sl@0 | 57 |
/** |
sl@0 | 58 |
* Public destructor |
sl@0 | 59 |
*/ |
sl@0 | 60 |
static CT_ActiveRConsoleRead* NewL(CDataWrapperBase& aDataWrapperBase); |
sl@0 | 61 |
~CT_ActiveRConsoleRead(); |
sl@0 | 62 |
TBool KickStartL (const TDesC& aSection, const TInt aAsyncErrorIndex,RConsole& aConsole); |
sl@0 | 63 |
TBool VerifyDataAndKick(const TInt aAsyncErrorIndex, RConsole& aConsole); |
sl@0 | 64 |
TConsoleKey GetConsoleKey(); |
sl@0 | 65 |
|
sl@0 | 66 |
|
sl@0 | 67 |
|
sl@0 | 68 |
protected: |
sl@0 | 69 |
CT_ActiveRConsoleRead(CDataWrapperBase& aDataWrapperBase); |
sl@0 | 70 |
void DestroyData(); |
sl@0 | 71 |
TBool ExitEvent(); |
sl@0 | 72 |
void DrawData(); |
sl@0 | 73 |
|
sl@0 | 74 |
private: |
sl@0 | 75 |
TBool KickNext(const TInt aAsyncErrorIndex, RConsole& aConsole); |
sl@0 | 76 |
void Kick (const TInt aAsyncErrorIndex, RConsole& aConsole); |
sl@0 | 77 |
|
sl@0 | 78 |
private: |
sl@0 | 79 |
TPtrC iSection; |
sl@0 | 80 |
TUint8 iColourValueBlack; |
sl@0 | 81 |
TUint8 iColourValueWhite; |
sl@0 | 82 |
TInt iEventIndex; |
sl@0 | 83 |
TInt iEventCount; |
sl@0 | 84 |
TInt iTimeOut; |
sl@0 | 85 |
TInt iErrorMargin; |
sl@0 | 86 |
TBool iHasExitKeyCode; |
sl@0 | 87 |
TBool iHasExitRectangle; |
sl@0 | 88 |
TInt iExitKeyCode; |
sl@0 | 89 |
TRect iExitRectangle; |
sl@0 | 90 |
TInt iTestIndex; |
sl@0 | 91 |
TInt iNumberOfTests; |
sl@0 | 92 |
|
sl@0 | 93 |
TBool iHasExpectedKeyCode; |
sl@0 | 94 |
TBool iHasExpectedRectangle; |
sl@0 | 95 |
TInt iExpectedKeyCode; |
sl@0 | 96 |
TRect iExpectedRectangle; |
sl@0 | 97 |
|
sl@0 | 98 |
RArray<TEventConfig> iEvent; |
sl@0 | 99 |
TEventConfig iExpectedConfig; |
sl@0 | 100 |
TConsoleKey iKey; |
sl@0 | 101 |
|
sl@0 | 102 |
|
sl@0 | 103 |
|
sl@0 | 104 |
static const CDataWrapperBase::TEnumEntryTable iEnumRawEventTable[]; |
sl@0 | 105 |
static const CDataWrapperBase::TEnumEntryTable iEnumKeyCodeTable[]; |
sl@0 | 106 |
static const CDataWrapperBase::TEnumEntryTable iEnumEventOccuranceTable[]; |
sl@0 | 107 |
}; |
sl@0 | 108 |
|
sl@0 | 109 |
#endif /*__T_ACTIVE_R_CONSOLE_READ_H__ */ |