diff -r 000000000000 -r 5a93021fdf25 connectionmonitoring/connmon/dataconnectionlogger/inc/dclTimer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectionmonitoring/connmon/dataconnectionlogger/inc/dclTimer.h Thu Dec 17 08:55:21 2009 +0200 @@ -0,0 +1,90 @@ +/* +* Copyright (c) 2004 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 active object needed in logging data in timer mode. +* +*/ + +#ifndef CDCLTIMERAO_H +#define CDCLTIMERAO_H + +#include +#include + +#include "dcl.h" + +class CEngine; + +/** +* CDclTimerAO +* Timer that logs data periodically in timer mode. +* @lib +* @since +*/ +class CDclTimerAO : public CActive + { + public: // Constructors and destructor + CDclTimerAO( CEngine* aEngine, TInt aTimerInterval ); + void ConstructL(); + virtual ~CDclTimerAO(); + + public: // New methods + /** + * Starts the timer mode logging for a connection. + * @param aConnectionId Id of the connection. + * @since + * @return void. + */ + void Add( const TUint& aConnectionId ); + + /** + * Stops the timer mode logging for a connection. + * @param aConnectionId Id of the connection. + * @since + * @return void. + */ + void Remove( const TUint& aConnectionId ); + + private: // New methods + /** + * Starts the timer. + * @since + * @return void. + */ + void NextTimerAfter(); + + private: // Methods from base classes + /** + * From CActive Cancels the timer. + * @since + * @return void + */ + void DoCancel(); + + /** + * From CActive Writes to the log databases. + * @since + * @return void + */ + void RunL(); + + private: // Data + RTimer iTimer; + CEngine* iEngine; + RArray iConnectionIds; + TInt iTimerInterval; + }; + +#endif // CDCLTIMERAO_H + +// end-of-file