featuremgmt/featuremgr/src/clientdll/featmgrresourcetester.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 12 Mar 2010 15:51:02 +0200
branchRCL_3
changeset 8 fa9941cf3867
child 9 667e88a979d7
permissions -rw-r--r--
Revision: 201008 Kit: 201008

// 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 <e32std.h>
#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    
    }