|
1 /* |
|
2 * Copyright (c) 2008 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 NSPTESTCONSOLEAPP_H |
|
19 #define NSPTESTCONSOLEAPP_H |
|
20 |
|
21 #include "nsptestconsoleactions.h" |
|
22 |
|
23 class CConsoleBase; |
|
24 class CNSPPlugin; |
|
25 class CNSPTestConsoleStateMachine; |
|
26 |
|
27 class CNSPTestConsoleApp : public CActive, public MNSPTestConsoleActions |
|
28 { |
|
29 public: // Methods |
|
30 |
|
31 static CNSPTestConsoleApp* NewL(); |
|
32 static CNSPTestConsoleApp* NewLC(); |
|
33 virtual ~CNSPTestConsoleApp(); |
|
34 void StartTesting(); |
|
35 |
|
36 // From CActive |
|
37 void RunL(); |
|
38 TInt RunError( TInt aError ); |
|
39 void DoCancel(); |
|
40 |
|
41 // From MNSPTestConsoleActions |
|
42 void DisplayMenu( const TDesC& aMenu, TInt aError ); |
|
43 void DisplaySelection( TInt aPrefix, const TDesC& aText, TBool aAddPreLinebreak ); |
|
44 void DisplaySelection( TInt aPrefix, const TDesC& aText, const TDesC& aSelect, TBool aAddPreLinebreak ); |
|
45 void DisplaySelection( TInt aPrefix, const TDesC& aText, TUint32 aSelect, TBool aAddPreLinebreak ); |
|
46 void DisplaySelection( TInt aPrefix, const TDesC& aText, TInt aSelect, TBool aAddPreLinebreak ); |
|
47 void DisplayPrompt( const TDesC& aText, TBool aAddPreLinebreak ); |
|
48 void DisplayPrompt( TBool aAddPreLinebreak ); |
|
49 void DisplayOne( TBool aAddPreLinebreak ); |
|
50 void DisplayTwo( TBool aAddPreLinebreak ); |
|
51 void DisplayThree( TBool aAddPreLinebreak ); |
|
52 void DisplayFour( TBool aAddPreLinebreak ); |
|
53 |
|
54 void DoRead(); |
|
55 TKeyCode GetStringFromConsoleL( TDes& aBuffer ); |
|
56 TKeyCode GetTUint32FromConsoleL( TUint32& aTUint32 ); |
|
57 CRepository& Cenrep(); |
|
58 CNSPTestManager& Manager(); |
|
59 CConsoleBase& Console(); |
|
60 |
|
61 private: // Methods |
|
62 |
|
63 CNSPTestConsoleApp(); |
|
64 void ConstructL(); |
|
65 |
|
66 private: // Data |
|
67 |
|
68 CRepository* iRepository; // own |
|
69 CNSPTestConsoleStateMachine* iStateMachine; // own |
|
70 CNSPPlugin* iPlugin; // own |
|
71 CConsoleBase* iConsole; // own |
|
72 CNSPTestManager* iTestManager; // own |
|
73 |
|
74 }; |
|
75 |
|
76 #endif // NSPTESTCONSOLEAPP_H |