mmsengine/mmswatcher/inc/mmspollingtimer.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2004 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 "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:  
       
    15 *     This creates an event at regular intervals.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CMMSPOLLINGTIMER_H
       
    22 #define CMMSPOLLINGTIMER_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 // CONSTANTS
       
    28 // MACROS
       
    29 // DATA TYPES
       
    30 // FUNCTION PROTOTYPES
       
    31 // FORWARD DECLARATIONS
       
    32 class MMsvSessionObserver;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 * CMmsPollingTimer creates an event at regular intervals and calls requester's
       
    38 * HandleSessionEvent method. I.e. MMsvSessionObserver interface is reused here.
       
    39 * NOTE: THIS CLASS IS USED ONLY IN EMULATOR ENVIRONMENT, AND ONLY IF PARTICULAR
       
    40 * CONFIGURATION FILE IS FOUND AT STARTUP.
       
    41 * @lib mmswatcher.lib
       
    42 * @since 2.6
       
    43 */
       
    44 class CMmsPollingTimer : public CTimer
       
    45     {
       
    46     public:  // Constructors and destructor
       
    47             
       
    48         /**
       
    49         * Two-phased constructor.
       
    50         */
       
    51         static CMmsPollingTimer* NewL();
       
    52         
       
    53         /**
       
    54         * Destructor.
       
    55         */
       
    56         virtual ~CMmsPollingTimer();
       
    57 
       
    58     public: // New functions
       
    59             
       
    60         /**
       
    61         * Start the timer.
       
    62         * @param aRequester Caller object
       
    63         * @param aTimerValue Value for the timer
       
    64         */
       
    65         void Start( MMsvSessionObserver* aRequester, const TInt aTimerValue );
       
    66 
       
    67     protected:  // Functions from base classes
       
    68         
       
    69         /**
       
    70         * Stops the timer.
       
    71         */
       
    72         void DoCancel();
       
    73 
       
    74     private:
       
    75 
       
    76         /**
       
    77         * C++ default constructor.
       
    78         */
       
    79         CMmsPollingTimer();
       
    80 
       
    81         /**
       
    82         * By default Symbian OS constructor is private.
       
    83         */
       
    84         void ConstructL();
       
    85 
       
    86         /**
       
    87         * Active object completion
       
    88         */
       
    89         void RunL();
       
    90 
       
    91     private:    // Data
       
    92 
       
    93         MMsvSessionObserver* iRequester;
       
    94         TInt iTimeout;
       
    95     };
       
    96     
       
    97 #endif // CMMSPOLLINGTIMER_H
       
    98 
       
    99 // End of File