mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioPlaybackTestModule/src/ObjectCountDown.cpp
changeset 0 71ca22bcf22a
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  mmftsplay test component
       
    15 *
       
    16 */
       
    17 
       
    18 #include "ObjectCountDown.h"
       
    19 
       
    20 TObjectCountDown::TObjectCountDown () : iObjectCount(0) {}
       
    21 
       
    22 TInt TObjectCountDown::NotifyCreation()
       
    23 	{
       
    24 	return ++iObjectCount;
       
    25 	}
       
    26 
       
    27 TInt TObjectCountDown::GetCount()
       
    28 	{
       
    29 	return iObjectCount;
       
    30 	}
       
    31 
       
    32 TInt TObjectCountDown::NotifyDestruction()
       
    33 	{
       
    34 	if (--iObjectCount <= 0)
       
    35 		{
       
    36 		CActiveScheduler::Stop();
       
    37 		}
       
    38 	return iObjectCount;
       
    39 	}