os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/src/T_ActiveNotifyChange.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2005-2009 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: 
    15 *
    16 */
    17 
    18 
    19 /**
    20 @test
    21 @internalComponent
    22 
    23 This contains CT_ActiveNotifyChange
    24 */
    25 
    26 //	User includes
    27 #include "T_ActiveNotifyChange.h"
    28 
    29 CT_ActiveNotifyChange* CT_ActiveNotifyChange::NewL(TInt aCount, TInt aAsyncErrorIndex, MActiveCallback& aCallback, TInt aPriority)
    30 /**
    31  * Two phase constructor
    32  */
    33 	{
    34 	CT_ActiveNotifyChange*	ret = new (ELeave) CT_ActiveNotifyChange(aCount, aAsyncErrorIndex, aCallback, aPriority);
    35 	CleanupStack::PushL(ret);
    36 	ret->ConstructL();
    37 	CleanupStack::Pop(ret);
    38 	return ret;	
    39 	}
    40 
    41 CT_ActiveNotifyChange* CT_ActiveNotifyChange::NewLC(TInt aCount, TInt aAsyncErrorIndex, MActiveCallback& aCallback, TInt aPriority)
    42 /**
    43  * Two phase constructor
    44  */
    45 	{
    46 	CT_ActiveNotifyChange*	ret = new (ELeave) CT_ActiveNotifyChange(aCount, aAsyncErrorIndex, aCallback, aPriority);
    47 	CleanupStack::PushL(ret);
    48 	ret->ConstructL();
    49 	return ret;	
    50 	}
    51 
    52 CT_ActiveNotifyChange::CT_ActiveNotifyChange(TInt aCount, TInt aAsyncErrorIndex, MActiveCallback& aCallback, TInt aPriority)
    53 /**
    54  * Protected constructor. First phase construction
    55  */
    56 :	CActiveCallback(aCallback, aPriority)
    57 ,	iCount(aCount)
    58 ,	iAsyncErrorIndex(aAsyncErrorIndex)
    59 	{
    60 	}
    61 
    62 void CT_ActiveNotifyChange::Activate()
    63 	{
    64 	CActiveCallback::Activate(iAsyncErrorIndex);
    65 	}
    66 
    67 TInt CT_ActiveNotifyChange::DecCount()
    68 	{
    69 	return --iCount;
    70 	}