|
1 /* |
|
2 * Copyright (c) 2003-2009 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 the License "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 * smoke.h - basic build & sanity test main |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #include <e32test.h> |
|
21 #include <f32file.h> |
|
22 #include <caf/caf.h> |
|
23 |
|
24 class CTestData: public CBase |
|
25 |
|
26 { |
|
27 public: |
|
28 static CTestData* NewL(const TDesC& aFilename); |
|
29 enum TType { EMessage, EData, EFinished,EError=-1 } ; |
|
30 TType Type(void); |
|
31 HBufC* Message(void); |
|
32 HBufC8* operator [] (TInt aIndex); |
|
33 ~CTestData(void); |
|
34 private: |
|
35 CTestData(void); |
|
36 TInt iCurrentPlace; |
|
37 void ConstructL(const TDesC& aFilename); |
|
38 HBufC8* iLine; |
|
39 HBufC8* iFile; |
|
40 }; |
|
41 |
|
42 class CTestConsole:public CConsoleBase |
|
43 { |
|
44 public: |
|
45 static CTestConsole* NewL(CConsoleBase* aCon); |
|
46 TInt Create(const TDesC16& aTitle,TSize aSize) {return iCon->Create(aTitle,aSize);}; |
|
47 void Read(TRequestStatus& aStatus) {iCon->Read(aStatus);}; |
|
48 void ReadCancel(void) {iCon->ReadCancel();}; |
|
49 void Write(const TDesC16& aString); |
|
50 TPoint CursorPos(void) const {return iCon->CursorPos();}; |
|
51 void SetCursorPosAbs(const TPoint& aPos) {iCon->SetCursorPosAbs(aPos);}; |
|
52 void SetCursorPosRel(const TPoint& aPos) {iCon->SetCursorPosRel(aPos);}; |
|
53 void SetCursorHeight(TInt aHeight) {iCon->SetCursorHeight(aHeight);}; |
|
54 void SetTitle(const TDesC16& aTitle) {iCon->SetTitle(aTitle);}; |
|
55 void ClearScreen(void) {iCon->ClearScreen();}; |
|
56 void ClearToEndOfLine(void) {iCon->ClearToEndOfLine();}; |
|
57 TSize ScreenSize(void) const {return iCon->ScreenSize();}; |
|
58 TKeyCode KeyCode(void) const {return iCon->KeyCode();}; |
|
59 TUint KeyModifiers(void) const {return iCon->KeyModifiers();}; |
|
60 ~CTestConsole(void); |
|
61 void SetLogFile(RFile* aFile); |
|
62 private: |
|
63 CTestConsole(void); |
|
64 CConsoleBase* iCon; |
|
65 RFile* iFile; |
|
66 }; |
|
67 |