Source code

Revision control

Other Tools

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 HalImpl.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
* Has the child-side HAL IPC object been destroyed? If so, you shouldn't send
59
* messages to hal_sandbox.
60
*/
61
bool HalChildDestroyed();
62
} // namespace MOZ_HAL_NAMESPACE
63
} // namespace mozilla
64
65
#endif // mozilla_HalInternal_h