os/boardsupport/haitest/bspsvs/suite/common/inc/ActiveCallbackBase.h
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 #if (!defined __ACTIVE_CALLBACK_BASE__)
    20 #define __ACTIVE_CALLBACK_BASE__
    21 
    22 //	USER includes
    23 #include "DataWrapperBase.h"
    24 
    25 class CActiveCallbackBase : public CActiveCallback
    26 	{
    27 private:
    28 	class CActiveCallbackTimer : public CTimer
    29 		{
    30 	public:
    31 		static CActiveCallbackTimer*	NewL(CActive& aActive, TInt aPriority=EPriorityStandard);
    32 
    33 		//	CActive implementation
    34 		virtual void RunL();
    35 
    36 	protected:
    37 		CActiveCallbackTimer(CActive& aActive, TInt aPriority);
    38 
    39 	private:
    40 		CActive&	iActive;
    41 		};
    42 
    43 public:
    44 	virtual ~CActiveCallbackBase();
    45 	static CActiveCallbackBase*	NewL(CDataWrapperBase& aDataWrapperBase, TInt aPriority=EPriorityStandard);
    46 	static CActiveCallbackBase*	NewLC(CDataWrapperBase& aDataWrapperBase, TInt aPriority=EPriorityStandard);
    47 
    48 	void	Activate(TInt aIndex, TInt aTimeout=0);
    49 	void	KillTimer();
    50 
    51 protected:
    52 	CActiveCallbackBase(CDataWrapperBase& aDataWrapperBase, TInt aPriority);
    53 	void	ConstructL();
    54 
    55 public:
    56 	CDataWrapperBase&		iDataWrapperBase;
    57 
    58 private:
    59 	CActiveCallbackTimer*	iTimer;
    60 	};
    61 
    62 #endif /* __ACTIVE_CALLBACK_BASE__ */