sl@0: /* sl@0: * Copyright (c) 2002-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: sl@0: sl@0: #ifndef __PLUGINTIMER_H_ sl@0: #define __PLUGINTIMER_H_ sl@0: sl@0: #include sl@0: sl@0: /** sl@0: * An interface for handling timer expiration events. sl@0: */ sl@0: class MPluginTimerCallback sl@0: { sl@0: public: sl@0: /** sl@0: * Called when the timer fires sl@0: */ sl@0: virtual void GenericTimerFiredL( MFeatureInfoPluginCallback& aService, sl@0: FeatureInfoCommand::TFeatureInfoCmd aCommandId, sl@0: TUint8 aTransId, sl@0: TInt aRetVal ) = 0; sl@0: }; sl@0: sl@0: sl@0: class CPluginTimer : public CTimer sl@0: { sl@0: public: sl@0: CPluginTimer( TInt aPriority, sl@0: MFeatureInfoPluginCallback& aService, sl@0: FeatureInfoCommand::TFeatureInfoCmd aCommandId, sl@0: TUint8 aTransId, sl@0: TInt aRetVal, sl@0: MPluginTimerCallback* aCallback ); sl@0: sl@0: ~CPluginTimer(); sl@0: sl@0: CPluginTimer(TInt aPriority); sl@0: sl@0: static CPluginTimer* NewL( const TTimeIntervalMicroSeconds32& anInterval, sl@0: MFeatureInfoPluginCallback& aService, sl@0: FeatureInfoCommand::TFeatureInfoCmd aCommandId, sl@0: TUint8 aTransId, sl@0: TInt aRetVal, sl@0: MPluginTimerCallback* aCallback ); sl@0: sl@0: void ConstructL(); sl@0: sl@0: void RunL(); sl@0: sl@0: inline TUint8 TransId() const sl@0: { sl@0: return iTransId; sl@0: }; sl@0: sl@0: private: sl@0: sl@0: MFeatureInfoPluginCallback& iService; // Not owned sl@0: sl@0: FeatureInfoCommand::TFeatureInfoCmd iCommandId; sl@0: TUint8 iTransId; sl@0: TInt iRetVal; sl@0: sl@0: MPluginTimerCallback* iCallback; // Not owned sl@0: sl@0: }; sl@0: sl@0: sl@0: #endif // __PLUGINTIMER_H_