sl@0: /* sl@0: * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #if (!defined __ACTIVE_CALLBACK_BASE__) sl@0: #define __ACTIVE_CALLBACK_BASE__ sl@0: sl@0: // USER includes sl@0: #include "DataWrapperBase.h" sl@0: sl@0: class CActiveCallbackBase : public CActiveCallback sl@0: { sl@0: private: sl@0: class CActiveCallbackTimer : public CTimer sl@0: { sl@0: public: sl@0: static CActiveCallbackTimer* NewL(CActive& aActive, TInt aPriority=EPriorityStandard); sl@0: sl@0: // CActive implementation sl@0: virtual void RunL(); sl@0: sl@0: protected: sl@0: CActiveCallbackTimer(CActive& aActive, TInt aPriority); sl@0: sl@0: private: sl@0: CActive& iActive; sl@0: }; sl@0: sl@0: public: sl@0: virtual ~CActiveCallbackBase(); sl@0: static CActiveCallbackBase* NewL(CDataWrapperBase& aDataWrapperBase, TInt aPriority=EPriorityStandard); sl@0: static CActiveCallbackBase* NewLC(CDataWrapperBase& aDataWrapperBase, TInt aPriority=EPriorityStandard); sl@0: sl@0: void Activate(TInt aIndex, TInt aTimeout=0); sl@0: void KillTimer(); sl@0: sl@0: protected: sl@0: CActiveCallbackBase(CDataWrapperBase& aDataWrapperBase, TInt aPriority); sl@0: void ConstructL(); sl@0: sl@0: public: sl@0: CDataWrapperBase& iDataWrapperBase; sl@0: sl@0: private: sl@0: CActiveCallbackTimer* iTimer; sl@0: }; sl@0: sl@0: #endif /* __ACTIVE_CALLBACK_BASE__ */