diff -r 63be7eb3fc78 -r f28ada11abbf wlanutilities/wlansniffer/wlansnifferkeepalive/inc/wsfkeepalivetimer.h --- a/wlanutilities/wlansniffer/wlansnifferkeepalive/inc/wsfkeepalivetimer.h Tue Aug 31 16:18:40 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Timer implementation. -*/ - -#ifndef WSFKEEPALIVETIMER_H -#define WSFKEEPALIVETIMER_H - -// System includes - -#include - -// User includes - -// Forward declarations - -// External data types - -// Global function prototypes - -// Constants - -// Class declaration - -/** - * Timer interface class. - * - * This is an interface class, which the Keepalive implementation needs - * to inherit in order to receive timer notifications. - */ -class MWsfKeepaliveTimerNotify - { -public: - - /** - * Pure virtual timer expiration function that needs to be - * implemented in the Keepalive implementation class. - * - * @param aError Status of the timer event - */ - virtual void TimerExpired( TInt aError ) = 0; - }; - -/** - * Timer implementation. - * - * This is the actual timer implementation class. - */ -class CWsfKeepaliveTimer: public CActive -{ - // Friend classes: - -public: - - // Data types - - /** Constructors */ - - /** - * Two-phased constructor. - * - * @param aNotify Timer expirations are notified to this class - * @return New object allocated from heap - */ - static CWsfKeepaliveTimer* NewL( MWsfKeepaliveTimerNotify& aNotify ); - - /**> Destructor */ - virtual ~CWsfKeepaliveTimer(); - -public: - - /** - * Sets the timer to expire after the given interval. - * - * @param aInterval Interval in microseconds - */ - void After( TTimeIntervalMicroSeconds32 aInterval ); - - /** - * Stops the timer. - */ - void Stop(); - -protected: - -private: - - CWsfKeepaliveTimer( MWsfKeepaliveTimerNotify& aNotify ); - - void ConstructL(); - - void RunL(); - - void DoCancel(); - -private: // Data - - /** - * Actual timer object - */ - RTimer iTimer; - - /** - * Timer expirations are notified to this class - */ - MWsfKeepaliveTimerNotify& iNotify; - }; - -#endif // WSFKEEPALIVETIMER_H