dvrengine/CommonRecordingEngine/DvrRtpUtils/inc/CRtpTimer.h
branchRCL_3
changeset 22 826cea16efd9
parent 21 798ee5f1972c
child 23 13a33d82ad98
equal deleted inserted replaced
21:798ee5f1972c 22:826cea16efd9
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    A timer.*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CRTPTIMER_H
       
    21 #define CRTPTIMER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // CONSTANTS
       
    27 _LIT( KPaniCRtpTimerError, "RTP Timer panic" );
       
    28 
       
    29 // MACROS
       
    30 // None
       
    31 
       
    32 // DATA TYPES
       
    33 // None
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 class MRtpTimerObserver;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 *  A timer for RTP handler.
       
    42 *
       
    43 *  @lib RtpClipHandler.lib
       
    44 *  @since Series 60 3.0
       
    45 */
       
    46 class CRtpTimer : public CTimer
       
    47     {
       
    48 
       
    49 public: // Constructors and destructor
       
    50 
       
    51     /**
       
    52     * Two-phased constructor.
       
    53     * @param aObs a notifier which informs when the time passed. 
       
    54     * @param aPrior a priority of the timer.
       
    55     */
       
    56     IMPORT_C static CRtpTimer* NewL( 
       
    57         MRtpTimerObserver& aObs, 
       
    58         const TPriority& aPrior = EPriorityStandard );
       
    59     
       
    60     /**
       
    61     * Destructor.
       
    62     */
       
    63     IMPORT_C virtual ~CRtpTimer();
       
    64 
       
    65 private: // Constructors and destructor
       
    66 
       
    67     /**
       
    68     * C++ parameter constructor.
       
    69     * @param aObs The notifier which informs when the time passed 
       
    70     * @param aPrior a priority of the timer.
       
    71     */
       
    72     CRtpTimer( MRtpTimerObserver& aObs, const TPriority& aPrior );
       
    73 
       
    74     /**
       
    75     * By default Symbian 2nd phase constructor is private.
       
    76     */
       
    77     void ConstructL();
       
    78 
       
    79 private: // Functions from base classes
       
    80 
       
    81     /**
       
    82     * From CActive : Called when request completion event occurs.
       
    83     * @since Series 60 3.0
       
    84     * @return none
       
    85     */
       
    86     void RunL();
       
    87 
       
    88     /**
       
    89     * From CActive : Handles a leave occurring in the request
       
    90     *                completion event handler RunL().
       
    91     * @since Series 60 3.0
       
    92     * @param aError the leave code
       
    93     * @return a status of function
       
    94     */
       
    95     TInt RunError( TInt aError );
       
    96 
       
    97 private: // Data
       
    98 
       
    99     // Observer
       
   100     MRtpTimerObserver& iObs;
       
   101 
       
   102   };
       
   103 
       
   104 #endif // CRTPTIMER_H
       
   105             
       
   106 // End of File