tacticonserver/server/src/tacticonshutdown.cpp
changeset 0 d54f32e146dd
equal deleted inserted replaced
-1:000000000000 0:d54f32e146dd
       
     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: Tacticon server shutdown timer.
       
    15 * Part of    : Tacticon Server
       
    16 */
       
    17 
       
    18 #include "tacticonshutdown.h"
       
    19 #include "tacticondefs.h"
       
    20 
       
    21 // ---------------------------------------------------------------------------
       
    22 // Two phased constructor.
       
    23 // ---------------------------------------------------------------------------
       
    24 //
       
    25 CTacticonShutdown* CTacticonShutdown::NewL()
       
    26     {
       
    27     CTacticonShutdown* self = new ( ELeave ) CTacticonShutdown();
       
    28     CleanupStack::PushL( self );
       
    29     self->ConstructL();
       
    30     CleanupStack::Pop( self );
       
    31     return self;
       
    32     }
       
    33 
       
    34 // ---------------------------------------------------------------------------
       
    35 // Destructor.
       
    36 // ---------------------------------------------------------------------------
       
    37 //
       
    38 CTacticonShutdown::~CTacticonShutdown()
       
    39     {
       
    40     }
       
    41 
       
    42 // ---------------------------------------------------------------------------
       
    43 // Activates this timer.
       
    44 // ---------------------------------------------------------------------------
       
    45 //
       
    46 void CTacticonShutdown::Start()
       
    47     {
       
    48     After( KTacticonShutdownDelay );
       
    49     }
       
    50 
       
    51 // ---------------------------------------------------------------------------
       
    52 // Constructor of the shutdown timer.
       
    53 // ---------------------------------------------------------------------------
       
    54 //
       
    55 CTacticonShutdown::CTacticonShutdown()
       
    56     : CTimer( EPriorityStandard )
       
    57     {
       
    58     // add this active object to the active scheduler
       
    59     CActiveScheduler::Add( this );
       
    60     }
       
    61 
       
    62 // ---------------------------------------------------------------------------
       
    63 // Second phase construction.
       
    64 // ---------------------------------------------------------------------------
       
    65 //
       
    66 void CTacticonShutdown::ConstructL()
       
    67     {
       
    68     CTimer::ConstructL();
       
    69     }
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // Shuts down tacticon server by stopping the active scheduler.
       
    73 // ---------------------------------------------------------------------------
       
    74 //
       
    75 void CTacticonShutdown::RunL()
       
    76     {
       
    77     CActiveScheduler::Stop();
       
    78     }
       
    79 
       
    80 //  End of File