|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include <e32std.h> |
|
17 #include "featmgrtlsdata.h" |
|
18 #include "featmgrresourcetester.h" |
|
19 |
|
20 #define UNUSED_ARG(arg) arg = arg |
|
21 |
|
22 //Defined in featurecontrol.cpp |
|
23 extern CFeatMgrTlsData* TlsData(); |
|
24 |
|
25 /** |
|
26 */ |
|
27 EXPORT_C void TFeatMgrResourceTester::Mark() |
|
28 { |
|
29 #ifdef EXTENDED_FEATURE_MANAGER_TEST |
|
30 CFeatMgrTlsData* tlsData = ::TlsData(); |
|
31 tlsData->ResourceMark(); |
|
32 #endif |
|
33 } |
|
34 |
|
35 /** |
|
36 */ |
|
37 EXPORT_C void TFeatMgrResourceTester::Check() |
|
38 { |
|
39 #ifdef EXTENDED_FEATURE_MANAGER_TEST |
|
40 CFeatMgrTlsData* tlsData = ::TlsData(); |
|
41 tlsData->ResourceCheck(); |
|
42 #endif |
|
43 } |
|
44 |
|
45 /** |
|
46 */ |
|
47 EXPORT_C TInt TFeatMgrResourceTester::Count() |
|
48 { |
|
49 #ifdef EXTENDED_FEATURE_MANAGER_TEST |
|
50 CFeatMgrTlsData* tlsData = ::TlsData(); |
|
51 return tlsData->ResourceCount(); |
|
52 #else |
|
53 return -1; |
|
54 #endif |
|
55 } |
|
56 |
|
57 /** |
|
58 */ |
|
59 EXPORT_C void TFeatMgrResourceTester::SetHeapFailure(TInt aAllocFailType, TInt aRate) |
|
60 { |
|
61 #ifdef EXTENDED_FEATURE_MANAGER_TEST |
|
62 CFeatMgrTlsData* tlsData = ::TlsData(); |
|
63 return tlsData->SetHeapFailure(aAllocFailType, aRate); |
|
64 #else |
|
65 UNUSED_ARG(aAllocFailType); |
|
66 UNUSED_ARG(aRate); |
|
67 #endif |
|
68 } |