equal
deleted
inserted
replaced
|
1 // Copyright (c) 2007-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 /** |
|
17 @file |
|
18 @test |
|
19 @internalComponent - Internal Symbian test code |
|
20 */ |
|
21 |
|
22 #include "tpowerdownclient.h" |
|
23 |
|
24 CPowerdownClient* CPowerdownClient::NewL() |
|
25 { |
|
26 CPowerdownClient* self = new (ELeave) CPowerdownClient; |
|
27 return self; |
|
28 } |
|
29 |
|
30 /** |
|
31 Constructor |
|
32 */ |
|
33 CPowerdownClient::CPowerdownClient() |
|
34 { |
|
35 } |
|
36 |
|
37 /** |
|
38 Destructor |
|
39 */ |
|
40 CPowerdownClient::~CPowerdownClient() |
|
41 { |
|
42 } |
|
43 |
|
44 // With SYSLIBS_TEST macro defined, the method 'CSaveNotifier::ServerPowerState()' sends a request to query |
|
45 // the power state of the shutdown server. The syslibs component 'pwrcli' has to be built properly with |
|
46 // this test macro defined inside the system HRH file under the folder 'epoc32\include\variant\' before |
|
47 // running this test for ARMV5. Otherwise, it will cause the H4 board to crash. |
|
48 #ifdef SYSLIBS_TEST |
|
49 TInt CPowerdownClient::QueryServerPowerState(CSaveNotifier* aNotifier, TBool& aPowerOff) |
|
50 { |
|
51 |
|
52 return aNotifier->ServerPowerState(aPowerOff); |
|
53 |
|
54 } |
|
55 #else |
|
56 TInt CPowerdownClient::QueryServerPowerState(CSaveNotifier*, TBool&) |
|
57 { |
|
58 |
|
59 return 0; |
|
60 |
|
61 } |
|
62 #endif |
|
63 |
|
64 |