Only fsync leveldb's directory when the manifest is being updated.
[chromium-blink-merge.git] / chromeos / dbus / power_supply_status.h
blob0cf5d71617ef21aa76a1dd78ecf9933b92f95d1b
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROMEOS_DBUS_POWER_SUPPLY_STATUS_H_
6 #define CHROMEOS_DBUS_POWER_SUPPLY_STATUS_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "chromeos/chromeos_export.h"
13 namespace chromeos {
15 struct CHROMEOS_EXPORT PowerSupplyStatus {
16 enum BatteryState {
17 // Line power is connected and the battery is full or being charged.
18 CHARGING = 0,
20 // Line power is disconnected.
21 DISCHARGING = 1,
23 // Line power is connected and the battery isn't full, but it also
24 // isn't charging (or discharging). This can occur if the EC believes
25 // that the battery isn't authentic and chooses to run directly off
26 // line power.
27 NEITHER_CHARGING_NOR_DISCHARGING = 2,
29 // A USB power source (DCP, CDP, or ACA) is connected. The battery may
30 // be charging or discharging depending on the negotiated current.
31 CONNECTED_TO_USB = 3,
34 bool line_power_on;
36 bool battery_is_present;
37 bool battery_is_full;
39 // Time in seconds until the battery is empty or full, 0 for unknown.
40 int64 battery_seconds_to_empty;
41 int64 battery_seconds_to_full;
43 double battery_percentage;
45 bool is_calculating_battery_time;
47 BatteryState battery_state;
49 PowerSupplyStatus();
50 std::string ToString() const;
53 } // namespace chromeos
55 #endif // CHROMEOS_DBUS_POWER_SUPPLY_STATUS_H_