diff -r 5ffdb8f2067f -r fa9941cf3867 featuremgmt/featuremgr/src/clientdll/featmgrresourcetester.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/featuremgmt/featuremgr/src/clientdll/featmgrresourcetester.cpp Fri Mar 12 15:51:02 2010 +0200 @@ -0,0 +1,68 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include +#include "featmgrtlsdata.h" +#include "featmgrresourcetester.h" + +#define UNUSED_ARG(arg) arg = arg + +//Defined in featurecontrol.cpp +extern CFeatMgrTlsData* TlsData(); + +/** +*/ +EXPORT_C void TFeatMgrResourceTester::Mark() + { +#ifdef EXTENDED_FEATURE_MANAGER_TEST + CFeatMgrTlsData* tlsData = ::TlsData(); + tlsData->ResourceMark(); +#endif + } + +/** +*/ +EXPORT_C void TFeatMgrResourceTester::Check() + { +#ifdef EXTENDED_FEATURE_MANAGER_TEST + CFeatMgrTlsData* tlsData = ::TlsData(); + tlsData->ResourceCheck(); +#endif + } + +/** +*/ +EXPORT_C TInt TFeatMgrResourceTester::Count() + { +#ifdef EXTENDED_FEATURE_MANAGER_TEST + CFeatMgrTlsData* tlsData = ::TlsData(); + return tlsData->ResourceCount(); +#else + return -1; +#endif + } + +/** +*/ +EXPORT_C void TFeatMgrResourceTester::SetHeapFailure(TInt aAllocFailType, TInt aRate) + { +#ifdef EXTENDED_FEATURE_MANAGER_TEST + CFeatMgrTlsData* tlsData = ::TlsData(); + return tlsData->SetHeapFailure(aAllocFailType, aRate); +#else + UNUSED_ARG(aAllocFailType); + UNUSED_ARG(aRate); +#endif + }