sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32test\device\t_fir.cpp sl@0: // sl@0: // sl@0: sl@0: #include "t_fir.h" sl@0: sl@0: void RunAppL(void) sl@0: { sl@0: // Construct and install the active scheduler sl@0: CActiveScheduler *exampleScheduler = new (ELeave) CActiveScheduler(); sl@0: // Push onto the cleanup stack sl@0: CleanupStack::PushL(exampleScheduler); sl@0: // Install as the active scheduler sl@0: CActiveScheduler::Install(exampleScheduler); sl@0: //Create Obex objects and console handler sl@0: CConsoleBase* aConsole = sl@0: Console::NewL(_L("Fir Test Code"),TSize(KConsFullScreen,KConsFullScreen));//KDefaultConsWidth,KDefaultConsHeight sl@0: CleanupStack::PushL(aConsole); sl@0: CActiveConsole* my_console = CActiveConsole::NewLC(aConsole); sl@0: CleanupStack::PushL(my_console); sl@0: my_console->RequestCharacter(); sl@0: CActiveScheduler::Start(); sl@0: User::After(2000000); sl@0: CleanupStack::PopAndDestroy(3); sl@0: } sl@0: sl@0: TInt E32Main() sl@0: { sl@0: __UHEAP_MARK; sl@0: CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack sl@0: TRAPD(error,RunAppL()); // more initialization, then do example sl@0: __ASSERT_ALWAYS(!error,User::Panic(_L("EPOC32EX"),error)); sl@0: delete cleanup; // destroy clean-up stack sl@0: __UHEAP_MARKEND; sl@0: sl@0: return 0; // and return sl@0: }