kerneltest/e32test/usbho/t_usbdi/src/vendordevice.cpp
changeset 253 d37db4dcc88d
parent 0 a41df078684a
child 257 3e88ff8f41d5
equal deleted inserted replaced
252:0a40b8675b23 253:d37db4dcc88d
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    17 //
    17 //
    18 
    18 
    19 #include "modelleddevices.h"
    19 #include "modelleddevices.h"
    20 #include "testinterfacebase.h"
    20 #include "testinterfacebase.h"
    21 #include "testinterfacesettingbase.h"
    21 #include "testinterfacesettingbase.h"
       
    22 #include "OstTraceDefinitions.h"
       
    23 #ifdef OST_TRACE_COMPILER_IN_USE
       
    24 #include "vendordeviceTraces.h"
       
    25 #endif
    22 
    26 
    23 namespace NUnitTesting_USBDI
    27 namespace NUnitTesting_USBDI
    24 	{
    28 	{
    25 	
    29 	
    26 
    30 
    27 RUsbDeviceVendor::RUsbDeviceVendor()
    31 RUsbDeviceVendor::RUsbDeviceVendor()
    28 	{
    32 	{
       
    33 	OstTraceFunctionEntry1( RUSBDEVICEVENDOR_RUSBDEVICEVENDOR_ENTRY, this );
       
    34 	OstTraceFunctionExit1( RUSBDEVICEVENDOR_RUSBDEVICEVENDOR_EXIT, this );
    29 	}
    35 	}
    30 	
    36 	
    31 RUsbDeviceVendor::RUsbDeviceVendor(CBaseTestCase* aTestCase):RUsbTestDevice(aTestCase)
    37 RUsbDeviceVendor::RUsbDeviceVendor(CBaseTestCase* aTestCase):RUsbTestDevice(aTestCase)
    32 	{
    38 	{
    33 	LOG_FUNC
    39 	OstTraceFunctionEntryExt( RUSBDEVICEVENDOR_RUSBDEVICEVENDOR_ENTRY_DUP01, this );
    34 	RDebug::Printf("aTestCase = %d", aTestCase);
    40 	OstTrace1(TRACE_NORMAL, RUSBDEVICEVENDOR_RUSBDEVICEVENDOR, "aTestCase = %d", aTestCase);
       
    41 	OstTraceFunctionExit1( RUSBDEVICEVENDOR_RUSBDEVICEVENDOR_EXIT_DUP01, this );
    35 	}
    42 	}
    36 	
    43 	
    37 
    44 
    38 RUsbDeviceVendor::~RUsbDeviceVendor()
    45 RUsbDeviceVendor::~RUsbDeviceVendor()
    39 	{	
    46 	{	
       
    47 	OstTraceFunctionEntry1( RUSBDEVICEVENDOR_RUSBDEVICEVENDOR_ENTRY_DUP02, this );
       
    48 	OstTraceFunctionExit1( RUSBDEVICEVENDOR_RUSBDEVICEVENDOR_EXIT_DUP02, this );
    40 	}
    49 	}
    41 	
    50 	
    42 
    51 
    43 void RUsbDeviceVendor::OpenL(const TDesC& aSerialNumber)
    52 void RUsbDeviceVendor::OpenL(const TDesC& aSerialNumber)
    44 	{
    53 	{
    45 	LOG_FUNC
    54 	OstTraceFunctionEntryExt( RUSBDEVICEVENDOR_OPENL_ENTRY, this );
    46 	
    55 	
    47 	RUsbTestDevice::OpenL();
    56 	RUsbTestDevice::OpenL();
    48 	
    57 	
    49 	// Device/Product information
    58 	// Device/Product information
    50 	SetUsbSpecification(0x0200); // Usb spec. 2.0
    59 	SetUsbSpecification(0x0200); // Usb spec. 2.0
    65 	
    74 	
    66 	interface0->AddInterfaceSettingL(interface0s0);	
    75 	interface0->AddInterfaceSettingL(interface0s0);	
    67 	CleanupStack::Pop(interface0s0);
    76 	CleanupStack::Pop(interface0s0);
    68 	AddInterface(interface0);
    77 	AddInterface(interface0);
    69 	CleanupStack::Pop(interface0);
    78 	CleanupStack::Pop(interface0);
       
    79 	OstTraceFunctionExit1( RUSBDEVICEVENDOR_OPENL_EXIT, this );
    70 	}
    80 	}
    71 
    81 
    72 
    82 
    73 void RUsbDeviceVendor::OnStateChangeL(TUsbcDeviceState aNewState)
    83 void RUsbDeviceVendor::OnStateChangeL(TUsbcDeviceState aNewState)
    74 	{
    84 	{
    75 	LOG_FUNC
    85 	OstTraceFunctionEntryExt( RUSBDEVICEVENDOR_ONSTATECHANGEL_ENTRY, this );
       
    86 	OstTraceFunctionExit1( RUSBDEVICEVENDOR_ONSTATECHANGEL_EXIT, this );
    76 	}
    87 	}
    77 
    88 
    78 	
    89 	
    79 	}
    90 	}
    80 
    91