equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include <e32base.h> |
18 #include <e32base.h> |
19 #include <usb/usbshared.h> |
19 #include <usb/usbshared.h> |
|
20 #include <usb/usblogger.h> |
20 #include "CUsbScheduler.h" |
21 #include "CUsbScheduler.h" |
21 #include "CUsbServer.h" |
22 #include "CUsbServer.h" |
22 #include <usb/usblogger.h> |
|
23 #include "rusb.h" |
23 #include "rusb.h" |
|
24 #include "OstTraceDefinitions.h" |
|
25 #ifdef OST_TRACE_COMPILER_IN_USE |
|
26 #include "UsbSvrTraces.h" |
|
27 #endif |
|
28 |
24 |
29 |
25 static void RunServerL(); |
30 static void RunServerL(); |
26 |
31 |
27 #ifdef __FLOG_ACTIVE |
|
28 _LIT8(KLogComponent, "USBSVR"); |
|
29 #endif |
|
30 |
32 |
31 |
33 |
32 GLDEF_C TInt E32Main() |
34 GLDEF_C TInt E32Main() |
33 /** |
35 /** |
34 * Entry-point for the USB Manager server. |
36 * Entry-point for the USB Manager server. |
58 // Perform all server initialisation, in particular creation of the |
60 // Perform all server initialisation, in particular creation of the |
59 // scheduler and server and then run the scheduler |
61 // scheduler and server and then run the scheduler |
60 // |
62 // |
61 { |
63 { |
62 // naming the server thread after the server helps to debug panics |
64 // naming the server thread after the server helps to debug panics |
63 LEAVEIFERRORL(User::RenameThread(KUsbServerName)); |
65 TInt err = User::RenameThread(KUsbServerName); |
|
66 if(err < 0) |
|
67 { |
|
68 OstTrace1( TRACE_NORMAL, USBSVR_RUNSERVERL, "::RunServerL; User::RenameThread(KUsbServerName) error, leave reason=%d", err ); |
|
69 User::Leave(err); |
|
70 } |
|
71 |
64 // |
72 // |
65 // create and install the active scheduler we need |
73 // create and install the active scheduler we need |
66 CUsbScheduler* scheduler = CUsbScheduler::NewL(); |
74 CUsbScheduler* scheduler = CUsbScheduler::NewL(); |
67 CleanupStack::PushL(scheduler); |
75 CleanupStack::PushL(scheduler); |
68 CUsbScheduler::Install(scheduler); |
76 CUsbScheduler::Install(scheduler); |