PageRenderTime 35ms CodeModel.GetById 18ms app.highlight 12ms RepoModel.GetById 2ms app.codeStats 0ms

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