diff options
author | Daniel Erat <derat@chromium.org> | 2015-06-18 11:00:09 -0600 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-06-20 00:57:29 +0000 |
commit | 527b1f9a31f131c676d73e90062f2b3d3a085790 (patch) | |
tree | ca48f5a0beea4a12ce92a4ad5264fffac4fe9e1b | |
parent | 0f9ff0499aa7eaecc579c53c61ce872ebba8757a (diff) | |
download | system_api-527b1f9a31f131c676d73e90062f2b3d3a085790.tar.gz |
system_api: Describe the ports that power sources are using.
Make the PowerSupplyProperties protobuf's PowerSource
submessage include an enum describing the location of the
port that the power source is using.
BUG=chromium:501882
TEST=built it
Change-Id: If225e3d27d2e7d36b81faef15c8707e59e3b4da4
Reviewed-on: https://chromium-review.googlesource.com/280589
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Dan Erat <derat@chromium.org>
Trybot-Ready: Dan Erat <derat@chromium.org>
-rw-r--r-- | dbus/power_manager/power_supply_properties.proto | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/dbus/power_manager/power_supply_properties.proto b/dbus/power_manager/power_supply_properties.proto index 733e194..2a1906a 100644 --- a/dbus/power_manager/power_supply_properties.proto +++ b/dbus/power_manager/power_supply_properties.proto @@ -49,9 +49,35 @@ message PowerSupplyProperties { // Details about a potential source of power to the system. message PowerSource { + enum Port { + // The location of the port is unknown, or there's only one port. + UNKNOWN = 0; + + // Various positions on the device. The first word describes the side of + // the device where the port is located while the second clarifies the + // position. For example, LEFT_BACK means the farthest-back port on the + // left side, while BACK_LEFT means the leftmost port on the back of the + // device. + LEFT = 1; + RIGHT = 2; + BACK = 3; + FRONT = 4; + LEFT_FRONT = 5; + LEFT_BACK = 6; + RIGHT_FRONT = 7; + RIGHT_BACK = 8; + BACK_LEFT = 9; + BACK_RIGHT = 10; + + // Next value to use: 11 + } + // Opaque ID corresponding to the device; see |external_power_source_id|. optional string id = 1; + // The charging port to which this power source is connected. + optional Port port = 7; + // Raw strings read from |manufacturer| and |model_name| files in sysfs. optional string manufacturer_id = 4; optional string model_id = 5; @@ -65,7 +91,7 @@ message PowerSupplyProperties { // to do so by the user. optional bool active_by_default = 3; - // Next ID to use: 7 + // Next ID to use: 8 } // Current state of the external power source. |