hal/HalInternal.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/hal/HalInternal.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,105 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim: set sw=2 ts=8 et ft=cpp : */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef mozilla_HalInternal_h
    1.11 +#define mozilla_HalInternal_h 1
    1.12 +
    1.13 +/*
    1.14 + * This file is included by HalImpl.h and HalSandbox.h with a mechanism similar
    1.15 + * to Hal.h. That means those headers set MOZ_HAL_NAMESPACE to specify in which
    1.16 + * namespace the internal functions should appear.
    1.17 + *
    1.18 + * The difference between Hal.h and HalInternal.h is that methods declared in
    1.19 + * HalInternal.h don't appear in the hal namespace. That also means this file
    1.20 + * should not be included except by HalInternal.h and HalSandbox.h.
    1.21 + */
    1.22 +
    1.23 +#ifndef MOZ_HAL_NAMESPACE
    1.24 +# error "You shouldn't directly include HalInternal.h!"
    1.25 +#endif
    1.26 +
    1.27 +namespace mozilla {
    1.28 +namespace MOZ_HAL_NAMESPACE {
    1.29 +
    1.30 +/**
    1.31 + * Enables battery notifications from the backend.
    1.32 + */
    1.33 +void EnableBatteryNotifications();
    1.34 +
    1.35 +/**
    1.36 + * Disables battery notifications from the backend.
    1.37 + */
    1.38 +void DisableBatteryNotifications();
    1.39 +
    1.40 +/**
    1.41 + * Enables network notifications from the backend.
    1.42 + */
    1.43 +void EnableNetworkNotifications();
    1.44 +
    1.45 +/**
    1.46 + * Disables network notifications from the backend.
    1.47 + */
    1.48 +void DisableNetworkNotifications();
    1.49 +
    1.50 +/**
    1.51 + * Enables screen orientation notifications from the backend.
    1.52 + */
    1.53 +void EnableScreenConfigurationNotifications();
    1.54 +
    1.55 +/**
    1.56 + * Disables screen orientation notifications from the backend.
    1.57 + */
    1.58 +void DisableScreenConfigurationNotifications();
    1.59 +
    1.60 +/**
    1.61 + * Enable switch notifications from the backend
    1.62 + */
    1.63 +void EnableSwitchNotifications(hal::SwitchDevice aDevice);
    1.64 +
    1.65 +/**
    1.66 + * Disable switch notifications from the backend
    1.67 + */
    1.68 +void DisableSwitchNotifications(hal::SwitchDevice aDevice);
    1.69 +
    1.70 +/**
    1.71 + * Enable alarm notifications from the backend.
    1.72 + */
    1.73 +bool EnableAlarm();
    1.74 +
    1.75 +/**
    1.76 + * Disable alarm notifications from the backend.
    1.77 + */
    1.78 +void DisableAlarm();
    1.79 +
    1.80 +/**
    1.81 + * Enable system clock change notifications from the backend.
    1.82 + */
    1.83 +void EnableSystemClockChangeNotifications();
    1.84 +
    1.85 +/**
    1.86 + * Disable system clock change notifications from the backend.
    1.87 + */
    1.88 +void DisableSystemClockChangeNotifications();
    1.89 +
    1.90 +/**
    1.91 + * Enable system timezone change notifications from the backend.
    1.92 + */
    1.93 +void EnableSystemTimezoneChangeNotifications();
    1.94 +
    1.95 +/**
    1.96 + * Disable system timezone change notifications from the backend.
    1.97 + */
    1.98 +void DisableSystemTimezoneChangeNotifications();
    1.99 +
   1.100 +/**
   1.101 + * Has the child-side HAL IPC object been destroyed?  If so, you shouldn't send
   1.102 + * messages to hal_sandbox.
   1.103 + */
   1.104 +bool HalChildDestroyed();
   1.105 +} // namespace MOZ_HAL_NAMESPACE
   1.106 +} // namespace mozilla
   1.107 +
   1.108 +#endif  // mozilla_HalInternal_h

mercurial