First public contribution.
1 // Copyright (c) 2004-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
20 #include "cusbotgserver.h"
23 static void RunServerL()
25 CActiveScheduler* scheduler = new(ELeave) CActiveScheduler;
26 CleanupStack::PushL(scheduler);
27 CActiveScheduler::Install(scheduler);
29 CUsbOtgServer::NewLC();
30 RProcess::Rendezvous(KErrNone);
32 CActiveScheduler::Start();
33 CleanupStack::PopAndDestroy(2);
34 RDebug::Printf("USB OTG Server shutdown");
39 // Server process entry-point
43 CTrapCleanup* cleanup = CTrapCleanup::New();
44 TInt r = KErrNoMemory;
47 TRAP(r, RunServerL());