equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 1997-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". |
22 */ |
22 */ |
23 |
23 |
24 |
24 |
25 #include <cusbclasscontrolleriterator.h> |
25 #include <cusbclasscontrolleriterator.h> |
26 #include <usb/usblogger.h> |
26 #include <usb/usblogger.h> |
27 #include "OstTraceDefinitions.h" |
27 |
28 #ifdef OST_TRACE_COMPILER_IN_USE |
28 #ifdef __FLOG_ACTIVE |
29 #include "CUsbClassControllerIteratorTraces.h" |
29 _LIT8(KLogComponent, "USBSVR"); |
30 #endif |
30 #endif |
31 |
|
32 |
|
33 |
31 |
34 // Panic category only used in debug builds |
32 // Panic category only used in debug builds |
35 #ifdef _DEBUG |
33 #ifdef _DEBUG |
36 _LIT( KUsbCcIteratorPanicCategory, "UsbCcIterator" ); |
34 _LIT( KUsbCcIteratorPanicCategory, "UsbCcIterator" ); |
37 #endif |
35 #endif |
130 * |
128 * |
131 * @return The current class the iterator refers to |
129 * @return The current class the iterator refers to |
132 */ |
130 */ |
133 EXPORT_C CUsbClassControllerBase* CUsbClassControllerIterator::Current() |
131 EXPORT_C CUsbClassControllerBase* CUsbClassControllerIterator::Current() |
134 { |
132 { |
135 #ifdef _DEBUG |
133 __ASSERT_DEBUG((iClassControllerIndex >= 0) && |
136 if(!((iClassControllerIndex >= 0) && (iClassControllerIndex < iClassControllerArray.Count()))) |
134 (iClassControllerIndex < iClassControllerArray.Count()), |
137 { |
135 _USB_PANIC(KUsbCcIteratorPanicCategory, EIndexOutOfRange)); |
138 OstTrace1( TRACE_FATAL, CUSBCLASSCONTROLLERITERATOR_CURRENT, "CUsbClassControllerIterator::Current;panic reason=%d", EIndexOutOfRange ); |
136 |
139 User::Panic(KUsbCcIteratorPanicCategory, EIndexOutOfRange ); |
|
140 } |
|
141 #endif |
|
142 return iClassControllerArray[iClassControllerIndex]; |
137 return iClassControllerArray[iClassControllerIndex]; |
143 } |
138 } |
144 |
139 |