1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/boardsupport/haitest/bspsvs/suite/e32/inc/T_ActiveRConsoleRead.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,109 @@
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_ACTIVE_R_CONSOLE_READ_H__)
1.23 +#define __T_ACTIVE_R_CONSOLE_READ_H__
1.24 +
1.25 +// EPOC includes
1.26 +#include <e32twin.h>
1.27 +#include <e32keys.h>
1.28 +
1.29 +// User Includes
1.30 +#include "DataWrapperBase.h"
1.31 +#include "ActiveCallbackBase.h"
1.32 +#include "DrawUtils.h"
1.33 +
1.34 +class CT_ActiveRConsoleRead : public CActiveCallbackBase
1.35 +
1.36 +/**
1.37 +* Test Active Notification class
1.38 +@test
1.39 +@publishedPartner
1.40 +@see CActiveCallbackBase
1.41 +*/
1.42 + {
1.43 +protected:
1.44 + enum TEventOccurance
1.45 + {
1.46 + EEventOccuranceOnce,
1.47 + EEventOccuranceZeroOrMore,
1.48 + EEventOccuranceOneOrMore,
1.49 + };
1.50 +
1.51 + struct TEventConfig
1.52 + {
1.53 + TInt iEventType;
1.54 + TEventOccurance iEventOccurance;
1.55 + TBool iDataVerify;
1.56 + TBool iDataDraw;
1.57 + };
1.58 +
1.59 +public:
1.60 + /**
1.61 + * Public destructor
1.62 + */
1.63 + static CT_ActiveRConsoleRead* NewL(CDataWrapperBase& aDataWrapperBase);
1.64 + ~CT_ActiveRConsoleRead();
1.65 + TBool KickStartL (const TDesC& aSection, const TInt aAsyncErrorIndex,RConsole& aConsole);
1.66 + TBool VerifyDataAndKick(const TInt aAsyncErrorIndex, RConsole& aConsole);
1.67 + TConsoleKey GetConsoleKey();
1.68 +
1.69 +
1.70 +
1.71 +protected:
1.72 + CT_ActiveRConsoleRead(CDataWrapperBase& aDataWrapperBase);
1.73 + void DestroyData();
1.74 + TBool ExitEvent();
1.75 + void DrawData();
1.76 +
1.77 +private:
1.78 + TBool KickNext(const TInt aAsyncErrorIndex, RConsole& aConsole);
1.79 + void Kick (const TInt aAsyncErrorIndex, RConsole& aConsole);
1.80 +
1.81 +private:
1.82 + TPtrC iSection;
1.83 + TUint8 iColourValueBlack;
1.84 + TUint8 iColourValueWhite;
1.85 + TInt iEventIndex;
1.86 + TInt iEventCount;
1.87 + TInt iTimeOut;
1.88 + TInt iErrorMargin;
1.89 + TBool iHasExitKeyCode;
1.90 + TBool iHasExitRectangle;
1.91 + TInt iExitKeyCode;
1.92 + TRect iExitRectangle;
1.93 + TInt iTestIndex;
1.94 + TInt iNumberOfTests;
1.95 +
1.96 + TBool iHasExpectedKeyCode;
1.97 + TBool iHasExpectedRectangle;
1.98 + TInt iExpectedKeyCode;
1.99 + TRect iExpectedRectangle;
1.100 +
1.101 + RArray<TEventConfig> iEvent;
1.102 + TEventConfig iExpectedConfig;
1.103 + TConsoleKey iKey;
1.104 +
1.105 +
1.106 +
1.107 + static const CDataWrapperBase::TEnumEntryTable iEnumRawEventTable[];
1.108 + static const CDataWrapperBase::TEnumEntryTable iEnumKeyCodeTable[];
1.109 + static const CDataWrapperBase::TEnumEntryTable iEnumEventOccuranceTable[];
1.110 + };
1.111 +
1.112 +#endif /*__T_ACTIVE_R_CONSOLE_READ_H__ */