equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2007-2010 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". |
20 @internalComponent |
20 @internalComponent |
21 */ |
21 */ |
22 |
22 |
23 #include "utils.h" |
23 #include "utils.h" |
24 #include <usb/usblogger.h> |
24 #include <usb/usblogger.h> |
25 |
25 #include "OstTraceDefinitions.h" |
26 #ifdef __FLOG_ACTIVE |
26 #ifdef OST_TRACE_COMPILER_IN_USE |
27 _LIT8(KLogComponent, "fdf "); |
27 #include "utilsTraces.h" |
28 #endif |
28 #endif |
29 |
29 |
30 #ifdef __FLOG_ACTIVE |
30 |
31 #define LOG Log() |
31 #define LOG Log() |
32 #else |
|
33 #define LOG |
|
34 #endif |
|
35 |
32 |
36 //***************************************************************************** |
33 //***************************************************************************** |
37 // Code relating to the cleanup stack item which 'Remove's a given TUint from |
34 // Code relating to the cleanup stack item which 'Remove's a given TUint from |
38 // an RArray. |
35 // an RArray. |
39 |
36 |
47 { |
44 { |
48 } |
45 } |
49 |
46 |
50 void Remove(TAny* aArrayRemove) |
47 void Remove(TAny* aArrayRemove) |
51 { |
48 { |
52 LOG_STATIC_FUNC_ENTRY |
49 OstTraceFunctionEntry0( FDF_UTILS_REMOVE_ENTRY ); |
53 |
50 |
54 TArrayRemove* arrayRemove = reinterpret_cast<TArrayRemove*>(aArrayRemove); |
51 TArrayRemove* arrayRemove = reinterpret_cast<TArrayRemove*>(aArrayRemove); |
55 |
52 |
56 const TUint count = arrayRemove->iDeviceIds.Count(); |
53 const TUint count = arrayRemove->iDeviceIds.Count(); |
57 for ( TUint ii = 0 ; ii < count ; ++ii ) |
54 for ( TUint ii = 0 ; ii < count ; ++ii ) |
58 { |
55 { |
59 if ( arrayRemove->iDeviceIds[ii] == arrayRemove->iDeviceId ) |
56 if ( arrayRemove->iDeviceIds[ii] == arrayRemove->iDeviceId ) |
60 { |
57 { |
61 LOGTEXT(_L8("\tmatching device id")); |
58 OstTrace0( TRACE_NORMAL, FDF_UTILS_REMOVE, "::matching device id" ); |
62 arrayRemove->iDeviceIds.Remove(ii); |
59 arrayRemove->iDeviceIds.Remove(ii); |
63 break; |
60 break; |
64 } |
61 } |
65 } |
62 } |
|
63 OstTraceFunctionExit0( FDF_UTILS_REMOVE_EXIT ); |
66 } |
64 } |
67 |
65 |
68 void CleanupRemovePushL(TArrayRemove& aArrayRemove) |
66 void CleanupRemovePushL(TArrayRemove& aArrayRemove) |
69 { |
67 { |
70 TCleanupItem item(Remove, &aArrayRemove); |
68 TCleanupItem item(Remove, &aArrayRemove); |