usbmgmt/usbmgr/usbman/server/SRC/UsbSvr.cpp
branchRCL_3
changeset 43 012cc2ee6408
parent 42 f92a4f87e424
equal deleted inserted replaced
42:f92a4f87e424 43:012cc2ee6408
     1 /*
     1 /*
     2 * Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2003-2009 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>
       
    21 #include "CUsbScheduler.h"
    20 #include "CUsbScheduler.h"
    22 #include "CUsbServer.h"
    21 #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 
       
    29 
    24 
    30 static void RunServerL();
    25 static void RunServerL();
    31 
    26 
       
    27 #ifdef __FLOG_ACTIVE
       
    28 _LIT8(KLogComponent, "USBSVR");
       
    29 #endif
    32 
    30 
    33 
    31 
    34 GLDEF_C TInt E32Main()
    32 GLDEF_C TInt E32Main()
    35 /**
    33 /**
    36  * Entry-point for the USB Manager server.
    34  * Entry-point for the USB Manager server.
    60 // Perform all server initialisation, in particular creation of the
    58 // Perform all server initialisation, in particular creation of the
    61 // scheduler and server and then run the scheduler
    59 // scheduler and server and then run the scheduler
    62 //
    60 //
    63 	{
    61 	{
    64 	// naming the server thread after the server helps to debug panics
    62 	// naming the server thread after the server helps to debug panics
    65     TInt err = User::RenameThread(KUsbServerName);
    63 	LEAVEIFERRORL(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 
       
    72 	//
    64 	//
    73 	// create and install the active scheduler we need
    65 	// create and install the active scheduler we need
    74 	CUsbScheduler* scheduler = CUsbScheduler::NewL();
    66 	CUsbScheduler* scheduler = CUsbScheduler::NewL();
    75 	CleanupStack::PushL(scheduler);
    67 	CleanupStack::PushL(scheduler);
    76 	CUsbScheduler::Install(scheduler);
    68 	CUsbScheduler::Install(scheduler);