|
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* vim: set sw=2 ts=8 et ft=cpp : */ |
|
3 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 #ifndef mozilla_HalInternal_h |
|
8 #define mozilla_HalInternal_h 1 |
|
9 |
|
10 /* |
|
11 * This file is included by HalImpl.h and HalSandbox.h with a mechanism similar |
|
12 * to Hal.h. That means those headers set MOZ_HAL_NAMESPACE to specify in which |
|
13 * namespace the internal functions should appear. |
|
14 * |
|
15 * The difference between Hal.h and HalInternal.h is that methods declared in |
|
16 * HalInternal.h don't appear in the hal namespace. That also means this file |
|
17 * should not be included except by HalInternal.h and HalSandbox.h. |
|
18 */ |
|
19 |
|
20 #ifndef MOZ_HAL_NAMESPACE |
|
21 # error "You shouldn't directly include HalInternal.h!" |
|
22 #endif |
|
23 |
|
24 namespace mozilla { |
|
25 namespace MOZ_HAL_NAMESPACE { |
|
26 |
|
27 /** |
|
28 * Enables battery notifications from the backend. |
|
29 */ |
|
30 void EnableBatteryNotifications(); |
|
31 |
|
32 /** |
|
33 * Disables battery notifications from the backend. |
|
34 */ |
|
35 void DisableBatteryNotifications(); |
|
36 |
|
37 /** |
|
38 * Enables network notifications from the backend. |
|
39 */ |
|
40 void EnableNetworkNotifications(); |
|
41 |
|
42 /** |
|
43 * Disables network notifications from the backend. |
|
44 */ |
|
45 void DisableNetworkNotifications(); |
|
46 |
|
47 /** |
|
48 * Enables screen orientation notifications from the backend. |
|
49 */ |
|
50 void EnableScreenConfigurationNotifications(); |
|
51 |
|
52 /** |
|
53 * Disables screen orientation notifications from the backend. |
|
54 */ |
|
55 void DisableScreenConfigurationNotifications(); |
|
56 |
|
57 /** |
|
58 * Enable switch notifications from the backend |
|
59 */ |
|
60 void EnableSwitchNotifications(hal::SwitchDevice aDevice); |
|
61 |
|
62 /** |
|
63 * Disable switch notifications from the backend |
|
64 */ |
|
65 void DisableSwitchNotifications(hal::SwitchDevice aDevice); |
|
66 |
|
67 /** |
|
68 * Enable alarm notifications from the backend. |
|
69 */ |
|
70 bool EnableAlarm(); |
|
71 |
|
72 /** |
|
73 * Disable alarm notifications from the backend. |
|
74 */ |
|
75 void DisableAlarm(); |
|
76 |
|
77 /** |
|
78 * Enable system clock change notifications from the backend. |
|
79 */ |
|
80 void EnableSystemClockChangeNotifications(); |
|
81 |
|
82 /** |
|
83 * Disable system clock change notifications from the backend. |
|
84 */ |
|
85 void DisableSystemClockChangeNotifications(); |
|
86 |
|
87 /** |
|
88 * Enable system timezone change notifications from the backend. |
|
89 */ |
|
90 void EnableSystemTimezoneChangeNotifications(); |
|
91 |
|
92 /** |
|
93 * Disable system timezone change notifications from the backend. |
|
94 */ |
|
95 void DisableSystemTimezoneChangeNotifications(); |
|
96 |
|
97 /** |
|
98 * Has the child-side HAL IPC object been destroyed? If so, you shouldn't send |
|
99 * messages to hal_sandbox. |
|
100 */ |
|
101 bool HalChildDestroyed(); |
|
102 } // namespace MOZ_HAL_NAMESPACE |
|
103 } // namespace mozilla |
|
104 |
|
105 #endif // mozilla_HalInternal_h |