backupandrestore/backupengine/src/sbshutdown.cpp
changeset 47 63cf70d3ecd8
parent 0 d0791faffa3f
equal deleted inserted replaced
44:a5deb6b96675 47:63cf70d3ecd8
    20 */
    20 */
    21 
    21 
    22 #include <e32std.h>
    22 #include <e32std.h>
    23 #include <e32base.h>
    23 #include <e32base.h>
    24 #include "sbshutdown.h"
    24 #include "sbshutdown.h"
       
    25 #include "OstTraceDefinitions.h"
       
    26 #include "sbtrace.h"
       
    27 #ifdef OST_TRACE_COMPILER_IN_USE
       
    28 #include "sbshutdownTraces.h"
       
    29 #endif
    25 
    30 
    26 namespace conn
    31 namespace conn
    27 	{
    32 	{
    28 
       
    29 	/** Shutdown delay, in microseconds.
    33 	/** Shutdown delay, in microseconds.
    30 	 @internalComponent */
    34 	 @internalComponent */
    31 	const TUint KShutdownDelay = 0x200000;
    35 	const TUint KShutdownDelay = 0x200000;
    32 	
    36 	
    33 	CSBShutdown::CSBShutdown() : 
    37 	CSBShutdown::CSBShutdown() : 
    34 	CTimer(EPriorityNormal)
    38 	CTimer(EPriorityNormal)
    35     /**
    39     /**
    36     Class Constructor
    40     Class Constructor
    37     */
    41     */
    38 		{
    42 		{
       
    43 		OstTraceFunctionEntry0( CSBSHUTDOWN_CSBSHUTDOWN_CONS_ENTRY );
       
    44 		OstTraceFunctionExit0( CSBSHUTDOWN_CSBSHUTDOWN_CONS_EXIT );
    39 		}
    45 		}
    40 
    46 
    41 	void CSBShutdown::ConstructL()
    47 	void CSBShutdown::ConstructL()
    42 	/**
    48 	/**
    43 	Construct this instance of CSBShutdown.
    49 	Construct this instance of CSBShutdown.
    44 	*/
    50 	*/
    45 		{
    51 		{
       
    52 		OstTraceFunctionEntry0( CSBSHUTDOWN_CONSTRUCTL_ENTRY );
    46 		CTimer::ConstructL();
    53 		CTimer::ConstructL();
    47 		CActiveScheduler::Add(this);
    54 		CActiveScheduler::Add(this);
       
    55 		OstTraceFunctionExit0( CSBSHUTDOWN_CONSTRUCTL_EXIT );
    48 		}
    56 		}
    49 
    57 
    50 	void CSBShutdown::Start()
    58 	void CSBShutdown::Start()
    51 	/** Starts the timer. */
    59 	/** Starts the timer. */
    52 		{
    60 		{
       
    61 		OstTraceFunctionEntry0( CSBSHUTDOWN_START_ENTRY );
    53 		After(KShutdownDelay);
    62 		After(KShutdownDelay);
       
    63 		OstTraceFunctionExit0( CSBSHUTDOWN_START_EXIT );
    54 		}
    64 		}
    55 
    65 
    56 	void CSBShutdown::RunL()
    66 	void CSBShutdown::RunL()
    57 	/** Called after the timer has expired.
    67 	/** Called after the timer has expired.
    58 	
    68 	
    59 	Stop the active scheduler and shutdown the server.
    69 	Stop the active scheduler and shutdown the server.
    60 	*/
    70 	*/
    61 		{
    71 		{
       
    72 		OstTraceFunctionEntry0( CSBSHUTDOWN_RUNL_ENTRY );
    62 		CActiveScheduler::Stop();
    73 		CActiveScheduler::Stop();
       
    74 		OstTraceFunctionExit0( CSBSHUTDOWN_RUNL_EXIT );
    63 		}
    75 		}
    64 	}
    76 	}