equal
deleted
inserted
replaced
|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "logging.h" |
|
20 #include "shutdowntimer.h" |
|
21 |
|
22 /** |
|
23 Constructor. Adds the timer to the thread's active scheduler, |
|
24 */ |
|
25 CShutdownTimer::CShutdownTimer() |
|
26 :CTimer(KActivePriorityShutdown) |
|
27 { |
|
28 LOG_MSG("CShutdownTimer::CShutdownTimer()\n"); |
|
29 CActiveScheduler::Add(this); |
|
30 } |
|
31 |
|
32 /** |
|
33 Initialisation of timer |
|
34 */ |
|
35 void CShutdownTimer::ConstructL() |
|
36 { |
|
37 LOG_MSG("CShutdownTimer::ConstructL()\n"); |
|
38 CTimer::ConstructL(); |
|
39 } |
|
40 |
|
41 /** |
|
42 Starts the timer which would expire after KShutdownDelay |
|
43 */ |
|
44 void CShutdownTimer::Start() |
|
45 { |
|
46 LOG_MSG("CShutdownTimer::Start()\n"); |
|
47 After(KShutdownDelay); |
|
48 } |
|
49 |
|
50 /** |
|
51 Stops the active scheduler. Stopping the active scheduler effectively closes |
|
52 the server |
|
53 */ |
|
54 void CShutdownTimer::RunL() |
|
55 { |
|
56 LOG_MSG("CShutdownTimer::RunL()\n"); |
|
57 CActiveScheduler::Stop(); |
|
58 } |
|
59 |