sl@0: // Copyright (c) 2004-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: // sl@0: sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #include "cusbhostserver.h" sl@0: sl@0: sl@0: static void RunServerL() sl@0: { sl@0: CActiveScheduler* scheduler = new(ELeave) CActiveScheduler; sl@0: CleanupStack::PushL(scheduler); sl@0: CActiveScheduler::Install(scheduler); sl@0: sl@0: CUsbHostServer::NewLC(); sl@0: RProcess::Rendezvous(KErrNone); sl@0: sl@0: CActiveScheduler::Start(); sl@0: sl@0: CleanupStack::PopAndDestroy(2); sl@0: RDebug::Printf("USB HOST server shutdown"); sl@0: } sl@0: sl@0: TInt E32Main() sl@0: // sl@0: // Server process entry-point sl@0: // sl@0: { sl@0: __UHEAP_MARK; sl@0: CTrapCleanup* cleanup = CTrapCleanup::New(); sl@0: TInt r = KErrNoMemory; sl@0: if (cleanup) sl@0: { sl@0: TRAP(r, RunServerL()); sl@0: delete cleanup; sl@0: } sl@0: __UHEAP_MARKEND; sl@0: return r; sl@0: } sl@0: