|
1 /* |
|
2 * Copyright (c) 2005 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: Class to handle server delayed shutdown |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <e32base.h> |
|
22 #include <centralrepository.h> |
|
23 |
|
24 #include "epos_csuplserverdelayedshutdown.h" |
|
25 #include "epos_csuplserver.h" |
|
26 #include "epos_csuplglobal.h" |
|
27 |
|
28 //#ifdef _DEBUG |
|
29 _LIT(KTraceFileName, "SUPL_GW::epos_cposserverdelayedshutdown.cpp"); |
|
30 //#endif |
|
31 |
|
32 |
|
33 // CONSTANTS |
|
34 |
|
35 // ================= MEMBER FUNCTIONS ======================= |
|
36 |
|
37 // C++ default constructor can NOT contain any code, that |
|
38 // might leave. |
|
39 // |
|
40 CSuplServerDelayedShutdown::CSuplServerDelayedShutdown(CSuplServer& aServer) |
|
41 : CTimer(EPriorityLow), |
|
42 iSuplServer(aServer) |
|
43 { |
|
44 DEBUG_TRACE("CSuplServerDelayedShutdown", __LINE__) |
|
45 CActiveScheduler::Add(this); |
|
46 } |
|
47 |
|
48 // Destructor |
|
49 CSuplServerDelayedShutdown::~CSuplServerDelayedShutdown() |
|
50 { |
|
51 DEBUG_TRACE("~CSuplServerDelayedShutdown", __LINE__) |
|
52 Cancel(); |
|
53 } |
|
54 |
|
55 // Two-phased constructor |
|
56 CSuplServerDelayedShutdown* CSuplServerDelayedShutdown::NewL(CSuplServer& aServer) |
|
57 { |
|
58 DEBUG_TRACE("NewL", __LINE__) |
|
59 CSuplServerDelayedShutdown* self = new (ELeave) CSuplServerDelayedShutdown(aServer); |
|
60 CleanupStack::PushL(self); |
|
61 self->ConstructL(); |
|
62 CleanupStack::Pop(); |
|
63 return self; |
|
64 } |
|
65 |
|
66 // EPOC default constructor |
|
67 void CSuplServerDelayedShutdown::ConstructL() |
|
68 { |
|
69 DEBUG_TRACE("ConstructL", __LINE__) |
|
70 CTimer::ConstructL(); |
|
71 } |
|
72 |
|
73 // --------------------------------------------------------- |
|
74 // CSuplServerDelayedShutdown::Start |
|
75 // |
|
76 // (other items were commented in a header). |
|
77 // --------------------------------------------------------- |
|
78 // |
|
79 void CSuplServerDelayedShutdown::Start(TTimeIntervalMicroSeconds32 aDelay) |
|
80 { |
|
81 DEBUG_TRACE("Start", __LINE__) |
|
82 After(aDelay); |
|
83 } |
|
84 |
|
85 // --------------------------------------------------------- |
|
86 // CSuplServerDelayedShutdown::RunL |
|
87 // |
|
88 // (other items were commented in a header). |
|
89 // --------------------------------------------------------- |
|
90 // |
|
91 void CSuplServerDelayedShutdown::RunL() |
|
92 { |
|
93 DEBUG_TRACE("RunL", __LINE__) |
|
94 iSuplServer.DeInitialize(); |
|
95 } |
|
96 |
|
97 // End of File |