debugsrv/runmodedebug/securityserver/src/c_shutdown_timer.cpp
branchRCL_3
changeset 21 52e343bb8f80
parent 20 ca8a1b6995f6
child 22 e26895079d7c
equal deleted inserted replaced
20:ca8a1b6995f6 21:52e343bb8f80
     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 the License "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 // Provides the debug security server's shutdown timer implementation
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalTechnology
       
    21  @released
       
    22 */
       
    23 
       
    24 #include <rm_debug_api.h>
       
    25 #include "c_shutdown_timer.h"
       
    26 #include "rm_debug_logging.h"
       
    27 
       
    28 /**
       
    29 Constructor. Adds the timer to the thread's active scheduler,
       
    30 */
       
    31 CShutdownTimer::CShutdownTimer()
       
    32 	:CTimer(KActivePriorityShutdown)
       
    33 	{
       
    34 	LOG_MSG("CShutdownTimer::CShutdownTimer()\n");
       
    35 	CActiveScheduler::Add(this);
       
    36 	}
       
    37 
       
    38 /**
       
    39 Initialisation of timer
       
    40 */
       
    41 void CShutdownTimer::ConstructL()
       
    42 	{
       
    43 	LOG_MSG("CShutdownTimer::ConstructL()\n");
       
    44 	CTimer::ConstructL();
       
    45 	}
       
    46 
       
    47 /**
       
    48 Starts the timer which would expire after KShutdownDelay
       
    49 */
       
    50 void CShutdownTimer::Start()
       
    51 	{
       
    52 	LOG_MSG("CShutdownTimer::Start()\n");
       
    53 	After(KShutdownDelay);
       
    54 	}
       
    55 
       
    56 /**
       
    57 Stops the active scheduler. Stopping the active scheduler effectively closes
       
    58 the Debug Security Server
       
    59 */
       
    60 void CShutdownTimer::RunL()
       
    61 	{
       
    62 	LOG_MSG("CShutdownTimer::RunL()\n");
       
    63 	CActiveScheduler::Stop();
       
    64 	}
       
    65