kerneltest/e32test/usbho/t_usbdi/src/testdeviceA.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 "testdeviceATraces.h"
       
    25 #endif
       
    26 
       
    27 
    22 
    28 
    23 
    29 
    24 namespace NUnitTesting_USBDI
    30 namespace NUnitTesting_USBDI
    25 	{
    31 	{
    26 	
    32 	
    27 RUsbDeviceA::RUsbDeviceA()
    33 RUsbDeviceA::RUsbDeviceA()
    28 	{
    34 	{
    29 	LOG_FUNC
    35 	OstTraceFunctionEntry1( RUSBDEVICEA_RUSBDEVICEA_ENTRY, this );
       
    36 	OstTraceFunctionExit1( RUSBDEVICEA_RUSBDEVICEA_EXIT, this );
    30 	}
    37 	}
    31 	
    38 	
    32 RUsbDeviceA::RUsbDeviceA(CBaseTestCase* aTestCase):RUsbDeviceVendor(aTestCase)
    39 RUsbDeviceA::RUsbDeviceA(CBaseTestCase* aTestCase):RUsbDeviceVendor(aTestCase)
    33 	{
    40 	{
    34 	LOG_FUNC
    41 	OstTraceFunctionEntryExt( RUSBDEVICEA_RUSBDEVICEA_ENTRY_DUP01, this );
       
    42 	OstTraceFunctionExit1( RUSBDEVICEA_RUSBDEVICEA_EXIT_DUP01, this );
    35 	}
    43 	}
    36 	
    44 	
    37 RUsbDeviceA::~RUsbDeviceA()
    45 RUsbDeviceA::~RUsbDeviceA()
    38 	{
    46 	{
    39 	LOG_FUNC	
    47 	OstTraceFunctionEntry1( RUSBDEVICEA_RUSBDEVICEA_ENTRY_DUP02, this );
       
    48 	OstTraceFunctionExit1( RUSBDEVICEA_RUSBDEVICEA_EXIT_DUP02, this );
    40 	}
    49 	}
    41 	
    50 	
    42 
    51 
    43 void RUsbDeviceA::OpenL(const TDesC16& aSerialNumber)
    52 void RUsbDeviceA::OpenL(const TDesC16& aSerialNumber)
    44 	{
    53 	{
    45 	LOG_FUNC
    54 	OstTraceFunctionEntryExt( RUSBDEVICEA_OPENL_ENTRY, this );
    46 	
    55 	
    47 	RUsbDeviceVendor::OpenL(aSerialNumber);
    56 	RUsbDeviceVendor::OpenL(aSerialNumber);
    48 	
    57 	
    49 	// Create another interface (interface1)
    58 	// Create another interface (interface1)
    50 	
    59 	
    87 	interface1->AddInterfaceSettingL(interface1s1);	
    96 	interface1->AddInterfaceSettingL(interface1s1);	
    88 	CleanupStack::Pop(interface1s1);
    97 	CleanupStack::Pop(interface1s1);
    89 	
    98 	
    90 	AddInterface(interface1);
    99 	AddInterface(interface1);
    91 	CleanupStack::Pop(interface1);
   100 	CleanupStack::Pop(interface1);
       
   101 	OstTraceFunctionExit1( RUSBDEVICEA_OPENL_EXIT, this );
    92 	}
   102 	}
    93 
   103 
    94 	
   104 	
    95 void RUsbDeviceA::OnStateChangeL(TUsbcDeviceState aNewState)
   105 void RUsbDeviceA::OnStateChangeL(TUsbcDeviceState aNewState)
    96 	{
   106 	{
    97 	LOG_FUNC
   107 	OstTraceFunctionEntryExt( RUSBDEVICEA_ONSTATECHANGEL_ENTRY, this );
       
   108 	OstTraceFunctionExit1( RUSBDEVICEA_ONSTATECHANGEL_EXIT, this );
    98 	}	
   109 	}	
    99 	
   110 	
   100 	
   111 	
   101 	}
   112 	}