/hal/fallback/FallbackHal.cpp

http://github.com/zpao/v8monkey · C++ · 84 lines · 61 code · 18 blank · 5 comment · 0 complexity · 910eb9f8dad1cec48e24586e41a40ab2 MD5 · raw file

  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 file,
  5. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  6. #include "Hal.h"
  7. #include "mozilla/dom/battery/Constants.h"
  8. #include "mozilla/dom/network/Constants.h"
  9. using mozilla::hal::WindowIdentifier;
  10. namespace mozilla {
  11. namespace hal_impl {
  12. void
  13. Vibrate(const nsTArray<uint32>& pattern, const hal::WindowIdentifier &)
  14. {}
  15. void
  16. CancelVibrate(const hal::WindowIdentifier &)
  17. {}
  18. void
  19. EnableBatteryNotifications()
  20. {}
  21. void
  22. DisableBatteryNotifications()
  23. {}
  24. void
  25. GetCurrentBatteryInformation(hal::BatteryInformation* aBatteryInfo)
  26. {
  27. aBatteryInfo->level() = dom::battery::kDefaultLevel;
  28. aBatteryInfo->charging() = dom::battery::kDefaultCharging;
  29. aBatteryInfo->remainingTime() = dom::battery::kDefaultRemainingTime;
  30. }
  31. bool
  32. GetScreenEnabled()
  33. {
  34. return true;
  35. }
  36. void
  37. SetScreenEnabled(bool enabled)
  38. {}
  39. double
  40. GetScreenBrightness()
  41. {
  42. return 1;
  43. }
  44. void
  45. SetScreenBrightness(double brightness)
  46. {}
  47. void
  48. EnableNetworkNotifications()
  49. {}
  50. void
  51. DisableNetworkNotifications()
  52. {}
  53. void
  54. GetCurrentNetworkInformation(hal::NetworkInformation* aNetworkInfo)
  55. {
  56. aNetworkInfo->bandwidth() = dom::network::kDefaultBandwidth;
  57. aNetworkInfo->canBeMetered() = dom::network::kDefaultCanBeMetered;
  58. }
  59. void
  60. Reboot()
  61. {}
  62. void
  63. PowerOff()
  64. {}
  65. } // hal_impl
  66. } // namespace mozilla