hal/HalInternal.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     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/. */
     7 #ifndef mozilla_HalInternal_h
     8 #define mozilla_HalInternal_h 1
    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  */
    20 #ifndef MOZ_HAL_NAMESPACE
    21 # error "You shouldn't directly include HalInternal.h!"
    22 #endif
    24 namespace mozilla {
    25 namespace MOZ_HAL_NAMESPACE {
    27 /**
    28  * Enables battery notifications from the backend.
    29  */
    30 void EnableBatteryNotifications();
    32 /**
    33  * Disables battery notifications from the backend.
    34  */
    35 void DisableBatteryNotifications();
    37 /**
    38  * Enables network notifications from the backend.
    39  */
    40 void EnableNetworkNotifications();
    42 /**
    43  * Disables network notifications from the backend.
    44  */
    45 void DisableNetworkNotifications();
    47 /**
    48  * Enables screen orientation notifications from the backend.
    49  */
    50 void EnableScreenConfigurationNotifications();
    52 /**
    53  * Disables screen orientation notifications from the backend.
    54  */
    55 void DisableScreenConfigurationNotifications();
    57 /**
    58  * Enable switch notifications from the backend
    59  */
    60 void EnableSwitchNotifications(hal::SwitchDevice aDevice);
    62 /**
    63  * Disable switch notifications from the backend
    64  */
    65 void DisableSwitchNotifications(hal::SwitchDevice aDevice);
    67 /**
    68  * Enable alarm notifications from the backend.
    69  */
    70 bool EnableAlarm();
    72 /**
    73  * Disable alarm notifications from the backend.
    74  */
    75 void DisableAlarm();
    77 /**
    78  * Enable system clock change notifications from the backend.
    79  */
    80 void EnableSystemClockChangeNotifications();
    82 /**
    83  * Disable system clock change notifications from the backend.
    84  */
    85 void DisableSystemClockChangeNotifications();
    87 /**
    88  * Enable system timezone change notifications from the backend.
    89  */
    90 void EnableSystemTimezoneChangeNotifications();
    92 /**
    93  * Disable system timezone change notifications from the backend.
    94  */
    95 void DisableSystemTimezoneChangeNotifications();
    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
   105 #endif  // mozilla_HalInternal_h

mercurial