searcher/searchserver/inc/cheartbeattimer.h
changeset 0 671dee74050a
equal deleted inserted replaced
-1:000000000000 0:671dee74050a
       
     1 /*
       
     2 * Copyright (c) 2010 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 *
       
    16 */
       
    17 
       
    18 #ifndef CHEARTBEATTIMER_H_
       
    19 #define CHEARTBEATTIMER_H_
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 class MHeartBeatObserver;
       
    24 
       
    25 class CHeartBeatTimer : public CTimer
       
    26 	{
       
    27 public:  // Constructors and destructors
       
    28     
       
    29     /**
       
    30      * Two-phased constructor.
       
    31      * @param aObserver Observer
       
    32      * @return Pointer to created CHeartBeatTimer object.
       
    33      */
       
    34     static CHeartBeatTimer* NewL(MHeartBeatObserver* aObserver);
       
    35 
       
    36     /**
       
    37      * Destructor.
       
    38      */
       
    39     virtual ~CHeartBeatTimer();
       
    40 
       
    41 public: // New methods
       
    42     
       
    43     /**
       
    44      * Stop timer
       
    45      */
       
    46     void StopTimer();
       
    47     
       
    48     /**
       
    49      * Continue timer.
       
    50      * Timer starts from initial value
       
    51      */
       
    52     void ContinueTimer();
       
    53     
       
    54 private:  // Constructors and destructors
       
    55 
       
    56     /**
       
    57      * C++ default constructor.
       
    58      * @param aObserver Observer
       
    59      */
       
    60     CHeartBeatTimer(MHeartBeatObserver* aObserver);
       
    61 
       
    62     /**
       
    63      * 2nd phase constructor.
       
    64      */
       
    65     void ConstructL();
       
    66 
       
    67 private: // From baseclass
       
    68     
       
    69     void RunL();
       
    70 	
       
    71 private: // Data
       
    72     
       
    73     // Observer
       
    74 	MHeartBeatObserver* iObserver;
       
    75 	};
       
    76 
       
    77 #endif /* CHEARTBEATTIMER_H_ */