|
1 /* |
|
2 * Copyright (c) 2005-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 "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 * Main log server engine. |
|
16 * Process log requests from multiple clients simultaneously. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <e32base.h> |
|
24 #include <e32cons.h> |
|
25 |
|
26 #include "utils.h" |
|
27 #include "wrapperapplication.h" |
|
28 |
|
29 _LIT( KConsoleTitle, "TestExecute2" ); |
|
30 CConsoleBase* console; |
|
31 |
|
32 LOCAL_C void startTEFTestL() |
|
33 { |
|
34 |
|
35 CTefWrapperApplication* app = CTefWrapperApplication::NewLC(); |
|
36 |
|
37 app->ParseCommandLineL(); |
|
38 app->WriteConfigFileL(); |
|
39 app->ExecuteL(); |
|
40 app->DeleteConfigFile(); |
|
41 |
|
42 CleanupStack::PopAndDestroy( app ); |
|
43 } |
|
44 |
|
45 LOCAL_C void callTEFTestL() |
|
46 { |
|
47 console = Console::NewL( KConsoleTitle,TSize( KConsFullScreen,KConsFullScreen ) ); |
|
48 |
|
49 TRAPD( error, startTEFTestL() ); |
|
50 switch( error ) |
|
51 { |
|
52 case Utils::EErrBadParam: |
|
53 console->Printf( _L("Bad Params Input.\n") ); |
|
54 console->Getch(); |
|
55 break; |
|
56 case Utils::EErrFileNotFound: |
|
57 console->Printf( _L("Script file not found.\n") ); |
|
58 console->Getch(); |
|
59 break; |
|
60 case Utils::EErrHelp: |
|
61 case Utils::EErrVersion: |
|
62 console->Printf( _L("Press any key to continue...\n") ); |
|
63 console->Getch(); |
|
64 } |
|
65 |
|
66 delete console; |
|
67 } |
|
68 |
|
69 GLDEF_C TInt E32Main() |
|
70 { |
|
71 __UHEAP_MARK; |
|
72 |
|
73 CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack |
|
74 |
|
75 TRAPD( error, callTEFTestL() ); |
|
76 |
|
77 |
|
78 delete cleanup; // destroy clean-up stack |
|
79 __UHEAP_MARKEND; |
|
80 return error; |
|
81 } |