systemhealthmanagement/systemhealthmgr/sysmonsrc/logonbackofftimer.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __LOGONBACKOFFTIMER_H__
       
    17 #define __LOGONBACKOFFTIMER_H__
       
    18 
       
    19 
       
    20 #include "monitor.h"
       
    21 
       
    22 
       
    23 
       
    24 class MLogonCallback;
       
    25 
       
    26 /**
       
    27  In the event of CMonitor's call (via this class) to RProcess::Logon() completing its iStatus with 
       
    28  KErrNoMemory, this AO will retry the logon a number of times, each time after an 
       
    29  increased interval (up to a maximum). This is to ensure that if the low-memory 
       
    30  condition is cyclical in nature, we won't be unwittingly synchronised to it.
       
    31 
       
    32 @internalComponent
       
    33 @released
       
    34 */
       
    35 NONSHARABLE_CLASS(CLogonBackoffTimer) : public CActive
       
    36 	{
       
    37 	
       
    38 public:
       
    39 	static CLogonBackoffTimer* NewL( MLogonCallback& aMonitor );	
       
    40 	~CLogonBackoffTimer();
       
    41 
       
    42 	void ProcessLogon();		
       
    43 	
       
    44 protected:
       
    45 	void RunL();
       
    46 	void DoCancel();
       
    47 	TInt RunError( TInt aError );
       
    48 		
       
    49 private:
       
    50 	CLogonBackoffTimer( MLogonCallback& aMonitor );
       
    51 	void ConstructL();	
       
    52 	
       
    53 private:
       
    54 	MLogonCallback& iMonitor;
       
    55 	RTimer iTimer;
       
    56 	TInt iRetryInterval;
       
    57 	};
       
    58 
       
    59 #endif // __LOGONBACKOFFTIMER_H__