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