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 the License "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 * Implementation of Boot Reason API dummy. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDES |
|
21 #include <e32def.h> |
|
22 #include <kernel/kernel.h> // Kern::Printf |
|
23 #include "boot_reason_api.h" |
|
24 |
|
25 // MACROS |
|
26 #ifdef _DEBUG |
|
27 #define DUMMY_TRACE(a) Kern::Printf a |
|
28 |
|
29 #else // _DEBUG |
|
30 |
|
31 #define DUMMY_TRACE(a) |
|
32 #endif // _DEBUG |
|
33 |
|
34 |
|
35 class TBootReasonDummy |
|
36 { |
|
37 public: |
|
38 TBootReasonDummy(); |
|
39 }; |
|
40 |
|
41 DECLARE_STANDARD_EXTENSION() |
|
42 { |
|
43 Kern::Printf("DMC:DUMMY_BOOT: DECLARE_STANDARD_EXTENSION()"); |
|
44 |
|
45 |
|
46 TBootReasonDummy* bootReasonAptPtr = new TBootReasonDummy; |
|
47 |
|
48 Kern::Printf("DMC:KERN_EXTEN: DECLARE_STANDARD_EXTENSION() - bootReasonAptPtr: 0x%x ", |
|
49 bootReasonAptPtr); |
|
50 |
|
51 return KErrNone; |
|
52 } |
|
53 |
|
54 |
|
55 TBootReasonDummy::TBootReasonDummy() |
|
56 { |
|
57 DUMMY_TRACE(("DMC:DUMMY_BOOT: TBootReasonDummy() # IN")); |
|
58 |
|
59 DUMMY_TRACE(("DMC:DUMMY_BOOT: TBootReasonDummy() # OUT")); |
|
60 } |
|
61 |
|
62 /** |
|
63 * Boot Reason API dummy imlementations |
|
64 */ |
|
65 EXPORT_C void TBootReason::GetStartupMode(TStartupMode& aStartupMode) |
|
66 { |
|
67 DUMMY_TRACE(("DMC:DUMMY_BOOT: GetStartupMode() # IN")); |
|
68 |
|
69 aStartupMode = TBootReason::EStartupModeCharging; |
|
70 |
|
71 DUMMY_TRACE((("DMC:DUMMY_BOOT: GetStartupMode() - aStartupMode: %d"), |
|
72 aStartupMode)); |
|
73 |
|
74 DUMMY_TRACE(("DMC:DUMMY_BOOT: GetStartupMode() # OUT")); |
|
75 } |
|
76 |
|
77 |
|
78 EXPORT_C void TBootReason::SetTargetStartupMode(TStartupMode aTargetStartupMode) |
|
79 { |
|
80 DUMMY_TRACE((("DMC:DUMMY_BOOT: SetTargetStartupMode() # IN - aTargetStartupMode: %d"), |
|
81 aTargetStartupMode)); |
|
82 |
|
83 DUMMY_TRACE(("DMC:DUMMY_BOOT: SetTargetStartupMode() # OUT")); |
|
84 } |
|
85 |
|
86 |
|
87 EXPORT_C void TBootReason::GetTargetStartupMode(TStartupMode& aStartupMode) |
|
88 { |
|
89 DUMMY_TRACE(("DMC:DUMMY_BOOT: GetTargetStartupMode() # IN")); |
|
90 |
|
91 aStartupMode = TBootReason::EStartupModeAlarm; |
|
92 |
|
93 DUMMY_TRACE((("DMC:DUMMY_BOOT: SetTargetStartupMode() # OUT - aStartupMode: %d"), |
|
94 aStartupMode)); |
|
95 } |
|
96 |
|
97 |
|
98 EXPORT_C TBool TBootReason::IsHiddenReset() |
|
99 { |
|
100 DUMMY_TRACE(("DMC:DUMMY_BOOT: IsHiddenReset() # IN")); |
|
101 |
|
102 DUMMY_TRACE((("DMC:DUMMY_BOOT: IsHiddenReset() # OUT - IsHidden: %d"), |
|
103 ETrue)); |
|
104 |
|
105 return ETrue; |
|
106 } |
|
107 |
|
108 |
|
109 EXPORT_C void TBootReason::SetSleepTest(TUint16 aTimeout) |
|
110 { |
|
111 DUMMY_TRACE((("DMC:DUMMY_BOOT: SetSleepTest() # IN - aTimeout: %d"), |
|
112 aTimeout)); |
|
113 |
|
114 DUMMY_TRACE(("DMC:DUMMY_BOOT: # OUT")); |
|
115 } |
|
116 |
|
117 // End of File |
|