1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/device/t_slowir.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,51 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// e32test\device\t_slowir.cpp
1.18 +//
1.19 +//
1.20 +
1.21 +#include "t_slowir.h"
1.22 +
1.23 +
1.24 +void RunAppL(void)
1.25 + {
1.26 + // Construct and install the active scheduler
1.27 + CActiveScheduler *exampleScheduler = new (ELeave) CActiveScheduler();
1.28 + // Push onto the cleanup stack
1.29 + CleanupStack::PushL(exampleScheduler);
1.30 + // Install as the active scheduler
1.31 + CActiveScheduler::Install(exampleScheduler);
1.32 + //Create Obex objects and console handler
1.33 + CConsoleBase* aConsole =
1.34 + Console::NewL(_L("SlowIR Test Code"),TSize(KConsFullScreen,KConsFullScreen));//KDefaultConsWidth,KDefaultConsHeight
1.35 + CleanupStack::PushL(aConsole);
1.36 + CActiveConsole* my_console = CActiveConsole::NewLC(aConsole);
1.37 + CleanupStack::PushL(my_console);
1.38 + my_console->RequestCharacter();
1.39 + CActiveScheduler::Start();
1.40 + User::After(2000000);
1.41 + CleanupStack::PopAndDestroy(3);
1.42 + }
1.43 +
1.44 +TInt E32Main()
1.45 + {
1.46 + __UHEAP_MARK;
1.47 + CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack
1.48 + TRAPD(error,RunAppL()); // more initialization, then do example
1.49 + __ASSERT_ALWAYS(!error,User::Panic(_L("EPOC32EX"),error));
1.50 + delete cleanup; // destroy clean-up stack
1.51 + __UHEAP_MARKEND;
1.52 +
1.53 + return 0; // and return
1.54 + }