diff -r 000000000000 -r a4daefaec16c convergedconnectionhandler/cchclientapi/inc/cchuitimer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/convergedconnectionhandler/cchclientapi/inc/cchuitimer.h Mon Jan 18 20:12:36 2010 +0200 @@ -0,0 +1,105 @@ +/* +* Copyright (c) 2009-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: Class for timer handling. +* +*/ + + + +#ifndef C_CCHUITIMER_H +#define C_CCHUITIMER_H + +#include + +#include "cchuicommon.hrh" + +class MCchUiTimerObserver; + +/** + * An instance of CCchUiTimer + * For timer handling. + * + * @lib cch.lib + * @since Series 60 5.0 + */ +NONSHARABLE_CLASS( CCchUiTimer ) : public CTimer + { + public: + + /** + * Enumeration which indicates timer type + */ + enum TTimerType + { + EReservedTimerType1 = 0 + }; + + /** + * Two-phased constructor. + */ + static CCchUiTimer* NewL( + MCchUiTimerObserver& aObserver ); + + + /** + * Destructor. + */ + virtual ~CCchUiTimer(); + + + /** + * Start timer. + * + * @since S60 v5.0 + * @return KErrNone when timer started successfully + */ + TInt StartTimer( TTimerType aType ); + + + /** + * Stop timer. + * + * @since S60 v5.0 + */ + void StopTimer(); + + + protected: + + // from base class CTimer + + /** + * From CTimer. Called when timer expires. + */ + void RunL(); + + + private: + + CCchUiTimer( MCchUiTimerObserver& aObserver ); + + void ConstructL(); + + + private: // data + + /** + * Reference for observer. + */ + MCchUiTimerObserver& iObserver; + + CCHUI_UNIT_TEST( UT_CchUi ) + }; + +#endif // C_CCHUITIMER_H