HalInternal.h 2.4 KB

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