servicewidget/servicewidgetdatapublisher/inc/cservicewidgettimer.h
changeset 0 5e5d6b214f4f
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Event listener implementation presence
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CSERVICEWIDGETTIMER_H
       
    20 #define CSERVICEWIDGETTIMER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 // forward declaration
       
    25 class MServiceWidgetTimerObserver;
       
    26 // class declaration
       
    27 
       
    28 /**
       
    29  * @class timer class
       
    30  * @since 5.0
       
    31  */
       
    32  
       
    33 class CServiceWidgetTimer : public CActive
       
    34     {
       
    35 public :
       
    36         // Constructor
       
    37         /**
       
    38          * Creates a new CServiceWidgetTimer.
       
    39          * @param aObserver, reference to timer 
       
    40          * @return New instance of this class         
       
    41          */
       
    42         static CServiceWidgetTimer* NewL(MServiceWidgetTimerObserver& aObserver );
       
    43         
       
    44           /**
       
    45            * Standard C++ destructor.
       
    46            */
       
    47          ~CServiceWidgetTimer();
       
    48          
       
    49          /**
       
    50          * start listening
       
    51          * @param a time interval
       
    52          */
       
    53          void StartListening(TTimeIntervalMicroSeconds32 anInterval);
       
    54          
       
    55           
       
    56          /**
       
    57          * stop listening
       
    58          */
       
    59          void StopListening();     
       
    60                  
       
    61 private : // From CActive
       
    62 
       
    63         /**
       
    64         *  RunL
       
    65         */
       
    66         void RunL();  
       
    67         
       
    68         /**
       
    69         *  DoCancel
       
    70         */
       
    71         void DoCancel();
       
    72 
       
    73         
       
    74 private: // Implementation
       
    75        
       
    76        /**
       
    77         * Standard C++ constructor
       
    78         * @param aObserver, reference to timer
       
    79        */
       
    80         CServiceWidgetTimer(MServiceWidgetTimerObserver& aObserver );
       
    81 
       
    82        /**
       
    83         * Performs the 2nd phase of construction.
       
    84         */
       
    85        void ConstructL();
       
    86        
       
    87 private :
       
    88     	    
       
    89        	// not owns : reference to contact update observer
       
    90         MServiceWidgetTimerObserver& iObserver;
       
    91         
       
    92 		/**
       
    93 		 *  owns : timer to trigger message queue uptation checking
       
    94 		 */
       
    95 		RTimer iTimer;
       
    96 	
       
    97 	    };
       
    98 
       
    99 #endif /*CSERVICEWIDGETTIMER_H*/
       
   100 
       
   101 //end of file