|
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // e32test\device\t_fir2.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 #include "t_fir2.h" |
|
19 |
|
20 |
|
21 void RunAppL(void) |
|
22 { |
|
23 // Construct and install the active scheduler |
|
24 CActiveScheduler *exampleScheduler = new (ELeave) CActiveScheduler(); |
|
25 // Push onto the cleanup stack |
|
26 CleanupStack::PushL(exampleScheduler); |
|
27 // Install as the active scheduler |
|
28 CActiveScheduler::Install(exampleScheduler); |
|
29 //Create Obex objects and console handler |
|
30 CConsoleBase* aConsole = |
|
31 Console::NewL(_L("Fir Test Code"),TSize(KConsFullScreen,KConsFullScreen));//KDefaultConsWidth,KDefaultConsHeight |
|
32 CleanupStack::PushL(aConsole); |
|
33 CActiveConsole* my_console = CActiveConsole::NewLC(aConsole); |
|
34 CleanupStack::PushL(my_console); |
|
35 my_console->RequestCharacter(); |
|
36 CActiveScheduler::Start(); |
|
37 User::After(2000000); |
|
38 CleanupStack::PopAndDestroy(3); |
|
39 } |
|
40 |
|
41 TInt E32Main() |
|
42 { |
|
43 __UHEAP_MARK; |
|
44 CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack |
|
45 TRAPD(error,RunAppL()); // more initialization, then do example |
|
46 __ASSERT_ALWAYS(!error,User::Panic(_L("EPOC32EX"),error)); |
|
47 delete cleanup; // destroy clean-up stack |
|
48 __UHEAP_MARKEND; |
|
49 |
|
50 return 0; // and return |
|
51 } |