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_
10 #include "base/basictypes.h"
11 #include "chromeos/chromeos_export.h"
15 struct CHROMEOS_EXPORT PowerSupplyStatus
{
17 // Line power is connected and the battery is full or being charged.
20 // Line power is disconnected.
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
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.
36 bool battery_is_present
;
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
;
50 std::string
ToString() const;
53 } // namespace chromeos
55 #endif // CHROMEOS_DBUS_POWER_SUPPLY_STATUS_H_