|
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_fir.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 #include "t_fir.h" |
|
19 |
|
20 void RunAppL(void) |
|
21 { |
|
22 // Construct and install the active scheduler |
|
23 CActiveScheduler *exampleScheduler = new (ELeave) CActiveScheduler(); |
|
24 // Push onto the cleanup stack |
|
25 CleanupStack::PushL(exampleScheduler); |
|
26 // Install as the active scheduler |
|
27 CActiveScheduler::Install(exampleScheduler); |
|
28 //Create Obex objects and console handler |
|
29 CConsoleBase* aConsole = |
|
30 Console::NewL(_L("Fir Test Code"),TSize(KConsFullScreen,KConsFullScreen));//KDefaultConsWidth,KDefaultConsHeight |
|
31 CleanupStack::PushL(aConsole); |
|
32 CActiveConsole* my_console = CActiveConsole::NewLC(aConsole); |
|
33 CleanupStack::PushL(my_console); |
|
34 my_console->RequestCharacter(); |
|
35 CActiveScheduler::Start(); |
|
36 User::After(2000000); |
|
37 CleanupStack::PopAndDestroy(3); |
|
38 } |
|
39 |
|
40 TInt E32Main() |
|
41 { |
|
42 __UHEAP_MARK; |
|
43 CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack |
|
44 TRAPD(error,RunAppL()); // more initialization, then do example |
|
45 __ASSERT_ALWAYS(!error,User::Panic(_L("EPOC32EX"),error)); |
|
46 delete cleanup; // destroy clean-up stack |
|
47 __UHEAP_MARKEND; |
|
48 |
|
49 return 0; // and return |
|
50 } |