dvrengine/CommonRecordingEngine/DvrRtpUtils/inc/CRtpTimer.h
branchRCL_3
changeset 48 13a33d82ad98
parent 0 822a42b6c3f1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dvrengine/CommonRecordingEngine/DvrRtpUtils/inc/CRtpTimer.h	Wed Sep 01 12:20:37 2010 +0100
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "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:    A timer.*
+*/
+
+
+
+
+#ifndef CRTPTIMER_H
+#define CRTPTIMER_H
+
+// INCLUDES
+#include <e32base.h>
+
+// CONSTANTS
+_LIT( KPaniCRtpTimerError, "RTP Timer panic" );
+
+// MACROS
+// None
+
+// DATA TYPES
+// None
+
+// FORWARD DECLARATIONS
+class MRtpTimerObserver;
+
+// CLASS DECLARATION
+
+/**
+*  A timer for RTP handler.
+*
+*  @lib RtpClipHandler.lib
+*  @since Series 60 3.0
+*/
+class CRtpTimer : public CTimer
+    {
+
+public: // Constructors and destructor
+
+    /**
+    * Two-phased constructor.
+    * @param aObs a notifier which informs when the time passed. 
+    * @param aPrior a priority of the timer.
+    */
+    IMPORT_C static CRtpTimer* NewL( 
+        MRtpTimerObserver& aObs, 
+        const TPriority& aPrior = EPriorityStandard );
+    
+    /**
+    * Destructor.
+    */
+    IMPORT_C virtual ~CRtpTimer();
+
+private: // Constructors and destructor
+
+    /**
+    * C++ parameter constructor.
+    * @param aObs The notifier which informs when the time passed 
+    * @param aPrior a priority of the timer.
+    */
+    CRtpTimer( MRtpTimerObserver& aObs, const TPriority& aPrior );
+
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    */
+    void ConstructL();
+
+private: // Functions from base classes
+
+    /**
+    * From CActive : Called when request completion event occurs.
+    * @since Series 60 3.0
+    * @return none
+    */
+    void RunL();
+
+    /**
+    * From CActive : Handles a leave occurring in the request
+    *                completion event handler RunL().
+    * @since Series 60 3.0
+    * @param aError the leave code
+    * @return a status of function
+    */
+    TInt RunError( TInt aError );
+
+private: // Data
+
+    // Observer
+    MRtpTimerObserver& iObs;
+
+  };
+
+#endif // CRTPTIMER_H
+            
+// End of File