kerneltest/e32test/usbho/t_usbdi/src/testdeviceC.cpp
branchRCL_3
changeset 257 3e88ff8f41d5
parent 256 c1f20ce4abcf
equal deleted inserted replaced
256:c1f20ce4abcf 257:3e88ff8f41d5
     1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2007-2009 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 "testdeviceCTraces.h"
       
    25 #endif
       
    26 
       
    27 
    22 
    28 
    23 
    29 namespace NUnitTesting_USBDI
    24 namespace NUnitTesting_USBDI
    30 	{
    25 	{
    31 	
    26 	
    32 
    27 
    33 RUsbDeviceC::RUsbDeviceC()
    28 RUsbDeviceC::RUsbDeviceC()
    34 	{
    29 	{
    35 	OstTraceFunctionEntry1( RUSBDEVICEC_RUSBDEVICEC_ENTRY, this );
    30 	LOG_FUNC	
    36 	OstTraceFunctionExit1( RUSBDEVICEC_RUSBDEVICEC_EXIT, this );
       
    37 	}
    31 	}
    38 	
    32 	
    39 RUsbDeviceC::RUsbDeviceC(CBaseTestCase* aTestCase):RUsbDeviceVendor(aTestCase)
    33 RUsbDeviceC::RUsbDeviceC(CBaseTestCase* aTestCase):RUsbDeviceVendor(aTestCase)
    40 	{
    34 	{
    41 	OstTraceFunctionEntryExt( RUSBDEVICEC_RUSBDEVICEC_ENTRY_DUP01, this );
    35 	LOG_FUNC
    42 	OstTraceFunctionExit1( RUSBDEVICEC_RUSBDEVICEC_EXIT_DUP01, this );
       
    43 	}
    36 	}
    44 	
    37 	
    45 RUsbDeviceC::~RUsbDeviceC()
    38 RUsbDeviceC::~RUsbDeviceC()
    46 	{
    39 	{
    47 	OstTraceFunctionEntry1( RUSBDEVICEC_RUSBDEVICEC_ENTRY_DUP02, this );
    40 	LOG_FUNC	
    48 	OstTraceFunctionExit1( RUSBDEVICEC_RUSBDEVICEC_EXIT_DUP02, this );
       
    49 	}
    41 	}
    50 	
    42 	
    51 
    43 
    52 void RUsbDeviceC::OpenL(const TDesC16& aSerialNumber)
    44 void RUsbDeviceC::OpenL(const TDesC16& aSerialNumber)
    53 	{
    45 	{
    54 	OstTraceFunctionEntryExt( RUSBDEVICEC_OPENL_ENTRY, this );
    46 	LOG_FUNC
    55 	
    47 	
    56 	RUsbDeviceVendor::OpenL(aSerialNumber);
    48 	RUsbDeviceVendor::OpenL(aSerialNumber);
    57 	
    49 	
    58 	// Create another interface (interface1)	
    50 	// Create another interface (interface1)	
    59 	CInterfaceBase* interface1 = new (ELeave) CInterfaceBase(*this,_L("i1"));
    51 	CInterfaceBase* interface1 = new (ELeave) CInterfaceBase(*this,_L("i1"));
   110 	interface1->AddInterfaceSettingL(interface1s2);	
   102 	interface1->AddInterfaceSettingL(interface1s2);	
   111 	CleanupStack::Pop(interface1s2);
   103 	CleanupStack::Pop(interface1s2);
   112 	
   104 	
   113 	AddInterface(interface1);
   105 	AddInterface(interface1);
   114 	CleanupStack::Pop(interface1);
   106 	CleanupStack::Pop(interface1);
   115 	OstTraceFunctionExit1( RUSBDEVICEC_OPENL_EXIT, this );
       
   116 	}
   107 	}
   117 
   108 
   118 	
   109 	
   119 void RUsbDeviceC::OnStateChangeL(TUsbcDeviceState aNewState)
   110 void RUsbDeviceC::OnStateChangeL(TUsbcDeviceState aNewState)
   120 	{
   111 	{
   121 	OstTraceFunctionEntryExt( RUSBDEVICEC_ONSTATECHANGEL_ENTRY, this );
   112 	LOG_FUNC
   122 	OstTraceFunctionExit1( RUSBDEVICEC_ONSTATECHANGEL_EXIT, this );
       
   123 	}	
   113 	}	
   124 	
   114 	
   125 	
   115 	
   126 	}
   116 	}