diff -r 000000000000 -r c53acadfccc6 harvester/monitorplugins/fileplugin/inc/movetimer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/monitorplugins/fileplugin/inc/movetimer.h Mon Jan 18 20:34:07 2010 +0200 @@ -0,0 +1,78 @@ +/* +* Copyright (c) 2002-2009 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: +* +*/ + +#ifndef MOVETIMER_H +#define MOVETIMER_H + +#include // For CActive, link against: euser.lib +#include // For RTimer, link against: euser.lib + +// FORWARD DECLARATION +class CHarvesterData; + +class MMoveTimerObserver + { +public: + virtual void NotMoveEvent(RPointerArray& aHDArray) = 0; + }; + +class CMoveTimer : public CActive +{ +public: + // Cancel and destroy + ~CMoveTimer(); + + // Two-phased constructor. + static CMoveTimer* NewL( MMoveTimerObserver* aObserver = NULL); + + // Two-phased constructor. + static CMoveTimer* NewLC( MMoveTimerObserver* aObserver = NULL); + +public: // New functions + + void AddHarvesterDataL( CHarvesterData* aHD ); + + CHarvesterData* CheckUriL( const TDesC& aUri ); + +private: + // C++ constructor + CMoveTimer( MMoveTimerObserver* aObserver = NULL ); + + // Second-phase constructor + void ConstructL(); + + // Function for making the initial request + void StartL(); + +private: // From CActive + // Handle completion + void RunL(); + + // How to cancel me + void DoCancel(); + + // Override to handle leaves from RunL(). Default implementation causes + // the active scheduler to panic. + TInt RunError( TInt aError ); + +private: + RTimer iTimer; // Provides async timing service + MMoveTimerObserver* iObserver; + RPointerArray iHDArray; +}; + +#endif // MOVETIMER_H