voipplugins/accountcreationplugin/inc/acptimer.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/voipplugins/accountcreationplugin/inc/acptimer.h	Wed Sep 01 12:29:57 2010 +0100
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 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_ACPTIMER_H
+#define C_ACPTIMER_H
+
+#include <e32base.h> 
+
+class MAcpTimerObserver;
+
+/**
+ * An instance of CAcpTimer
+ * For timer handling.
+ *
+ * @lib accountcreationplugin.lib
+ * @since Series 60 5.0
+ */
+NONSHARABLE_CLASS( CAcpTimer ) : public CTimer
+    {    
+    public:
+
+        /**
+         * Enumeration which indicates timer type
+         */
+        enum TTimerType
+            {
+            EPhonebookStartupDelayTimer = 0
+            };
+    
+        /**
+         * Two-phased constructor.
+         */ 
+        static CAcpTimer* NewL( 
+            MAcpTimerObserver& aObserver );
+
+
+        /**
+         * Destructor.
+         */
+        virtual ~CAcpTimer();
+
+        
+        /**
+         * Start timer.
+         *
+         * @since S60 v5.0
+         * @return KErrNone when timer started successfully
+         */
+        TInt StartTimer( TTimerType aType );
+        
+        
+        /**
+         * Stop timer.
+         *
+         * @since S60 v5.0
+         */
+        void StopTimer();
+        
+        /**
+         * Is timer active
+         *
+         * @since S60 v5.0
+         * @return ETrue if timer is active.
+         */
+        TBool IsActive();
+        
+
+    protected: 
+    
+        // from base class CTimer
+        
+        /**
+         * From CTimer. Called when timer expires.
+         */
+        void RunL();
+        
+               
+    private:
+
+        CAcpTimer( MAcpTimerObserver& aObserver );
+
+        void ConstructL();
+        
+        
+    private:  // data
+        
+        /**
+         * Reference for observer.
+         */
+        MAcpTimerObserver& iObserver;
+    };
+
+#endif // C_ACPTIMER_H