locationmanager/ReverseGeocode/inc/connectiontimerhandler.h
changeset 51 87e65c44ff3a
parent 48 1389872e7c51
child 58 fe894bb075c2
equal deleted inserted replaced
48:1389872e7c51 51:87e65c44ff3a
     1 /*
       
     2 * Copyright (c) 2009 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:	Handle connection close
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CONNECTIONTIMERHANDLER_H__
       
    19 #define __CONNECTIONTIMERHANDLER_H__
       
    20 
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 
       
    26 class MConnectionTimeoutHandlerInterface
       
    27     {
       
    28     public:
       
    29 		
       
    30 	/**
       
    31 	  * Handles the timedout event
       
    32 	  * @param  aErrorCode  the errcode for time out
       
    33 	  */
       
    34     virtual void HandleTimedoutEvent(TInt aErrorCode) = 0;
       
    35     };
       
    36 
       
    37 class CConnectionTimerHandler : public CTimer
       
    38 {
       
    39     
       
    40 public:
       
    41 
       
    42 	/**
       
    43 	  * @param aConnectionTimeoutHandlerInterface the interace class that handles the timeout events
       
    44 	  */	
       
    45      static CConnectionTimerHandler* NewL(MConnectionTimeoutHandlerInterface& aConnectionTimeoutHandlerInterface); 
       
    46 
       
    47 	/**
       
    48 	  * Destructor
       
    49 	  */
       
    50      ~CConnectionTimerHandler();
       
    51 
       
    52 	/**
       
    53 	  * starts a timer
       
    54 	  * @param aTimeoutVal the time after which the timer will expire
       
    55 	  */	
       
    56      void StartTimer(const TInt aTimeoutVal);
       
    57 
       
    58      
       
    59 protected:
       
    60 
       
    61 	/**
       
    62 	  * RunL
       
    63 	  * from CActive
       
    64 	  */	
       
    65       void RunL();
       
    66       
       
    67  private:
       
    68 
       
    69 	/**
       
    70 	  * Second phase construction
       
    71 	  */	
       
    72       void ConstructL();
       
    73 
       
    74 	/**
       
    75 	  * @param aConnectionTimeoutHandlerInterface the interace class that handles the timeout events
       
    76 	  */	
       
    77       CConnectionTimerHandler(MConnectionTimeoutHandlerInterface& aConnectionTimeoutHandlerInterface);
       
    78       
       
    79 
       
    80 
       
    81 private:      
       
    82 
       
    83 	/**
       
    84 	  * An instance of the interace class that handles the timeout events
       
    85 	  */	
       
    86       MConnectionTimeoutHandlerInterface& iConnectionTimeoutHandlerInterface;
       
    87 };
       
    88 
       
    89 
       
    90 #endif /*__CONNECTIONTIMERHANDLER_H__*/
       
    91 
       
    92 // End of file