|
1 // Copyright (c) 1997-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 "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 // |
|
15 |
|
16 #include "eikshtsv.h" |
|
17 #include <coemain.h> |
|
18 #include <savenotf.h> |
|
19 #include <savepriv.h> |
|
20 #include <hal.h> |
|
21 |
|
22 // |
|
23 // class CEikServShutdownServer |
|
24 // |
|
25 |
|
26 /** |
|
27 Static factory function to create new CEikServShutdownServer |
|
28 @return Instantiated and constructed server with priority EActivePriorityIpcEventsHigh |
|
29 @publishedAll |
|
30 @released |
|
31 */ |
|
32 EXPORT_C CEikServShutdownServer* CEikServShutdownServer::NewL() |
|
33 { // static |
|
34 CEikServShutdownServer* self=new(ELeave) CEikServShutdownServer(EActivePriorityIpcEventsHigh); |
|
35 return self; |
|
36 } |
|
37 |
|
38 /** |
|
39 Destructor |
|
40 */ |
|
41 CEikServShutdownServer::~CEikServShutdownServer() |
|
42 { |
|
43 delete iLafShutdown; |
|
44 } |
|
45 |
|
46 /** |
|
47 Private constructor |
|
48 @internalComponent |
|
49 */ |
|
50 CEikServShutdownServer::CEikServShutdownServer(TInt aPriority) |
|
51 : CServShutdownServer(aPriority) |
|
52 {} |
|
53 |
|
54 /** |
|
55 Second phase construction |
|
56 Framework function. Calls base class. |
|
57 @see CServShutdownServer::ConstructL() |
|
58 */ |
|
59 void CEikServShutdownServer::ConstructL() |
|
60 { |
|
61 CServShutdownServer::ConstructL(); |
|
62 iLafShutdown=LafShutdown::CreateShutdownManager(*this); |
|
63 } |
|
64 |
|
65 /** |
|
66 Framwork function |
|
67 @return A newly instantiated CEikServShutdownSession |
|
68 @see CServer2::NewSessionL(const TVersion& aVersion, const RMessage2&) |
|
69 */ |
|
70 CSession2* CEikServShutdownServer::NewSessionL(const TVersion& aVersion, const RMessage2&) const |
|
71 { |
|
72 TVersion version(KShutdownMajorVN,KShutdownMinorVN,KShutdownBuildVN); |
|
73 if (!User::QueryVersionSupported(version,aVersion)) |
|
74 { |
|
75 User::Leave(KErrNotSupported); |
|
76 } |
|
77 return CEikServShutdownSession::NewL(); |
|
78 } |
|
79 |
|
80 |
|
81 // |
|
82 // class CEikServShutdownSession |
|
83 // |
|
84 |
|
85 /** |
|
86 Static factory function. |
|
87 @internalTechnology |
|
88 */ |
|
89 CEikServShutdownSession* CEikServShutdownSession::NewL() |
|
90 { |
|
91 return new (ELeave) CEikServShutdownSession; |
|
92 } |
|
93 |
|
94 // |
|
95 // Main |
|
96 // |
|
97 |