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