From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Sonny Sasaka <sonnysasaka@chromium.org>
Cc: "linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
Miao-chen Chou <mcchou@chromium.org>
Subject: Re: [PATCH BlueZ v4 4/7] doc: Add Battery Provider API doc
Date: Mon, 30 Nov 2020 13:28:35 -0800 [thread overview]
Message-ID: <CABBYNZJQebV4_CWjaFUVC4Ab6ZWKqWz0K-sp0sdKgMGxVgtZLQ@mail.gmail.com> (raw)
In-Reply-To: <20201130200307.386410-4-sonnysasaka@chromium.org>
Hi Sonny,
On Mon, Nov 30, 2020 at 12:09 PM Sonny Sasaka <sonnysasaka@chromium.org> wrote:
>
> This patch add the documentation of the Battery Provider which lets
> external clients feed battery information to BlueZ if they are able to
> decode battery reporting via any profile. BlueZ UI clients can then use
> the org.bluez.Battery1 API as a single source of battery information
> coming from many different profiles.
>
> Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
>
> ---
> doc/battery-api.txt | 55 +++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/doc/battery-api.txt b/doc/battery-api.txt
> index dc7dbeda2..9a6b4fd39 100644
> --- a/doc/battery-api.txt
> +++ b/doc/battery-api.txt
> @@ -12,3 +12,58 @@ Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
> Properties byte Percentage [readonly]
>
> The percentage of battery left as an unsigned 8-bit integer.
> +
> + string Source [readonly, optional, experimental]
> +
> + Describes where the battery information comes from
> + This property is informational only and may be useful
> + for debugging purposes.
> + Providers from BatteryProvider1 may make use of this
> + property to indicate where the battery report comes from
> + (e.g. "HFP 1.7", "HID", or the profile UUID).
It seems you didn't address my concern related to use of friendly
names and version numbers here, although this is just an example. I'd
suggest we only accept UUIDs.
> +
> +
> +Battery Provider Manager hierarchy
> +==================================
> +A battery provider starts by registering itself as a battery provider with the
> +RegisterBatteryProvider method passing an object path as the provider ID. Then,
> +it can start exposing org.bluez.BatteryProvider1 objects having the path
> +starting with the given provider ID. It can also remove objects at any time.
> +The objects and their properties exposed by battery providers will be reflected
> +on org.bluez.Battery1 interface.
> +
> +BlueZ will stop monitoring these exposed and removed objects after
> +UnregisterBatteryProvider is called for that provider ID.
> +
> +Service org.bluez
> +Interface org.bluez.BatteryProviderManager1 [experimental]
> +Object path /org/bluez/{hci0,hci1,...}
> +
> +Methods void RegisterBatteryProvider(object provider)
> +
> + This registers a battery provider. A registered
> + battery provider can then expose objects with
> + org.bluez.BatteryProvider1 interface described below.
> +
> + void UnregisterBatteryProvider(object provider)
> +
> + This unregisters a battery provider. After
> + unregistration, the BatteryProvider1 objects provided
> + by this client are ignored by BlueZ.
> +
> +
> +Battery Provider hierarchy
> +==========================
> +
> +Service <client D-Bus address>
> +Interface org.bluez.BatteryProvider1 [experimental]
> +Object path {provider_root}/{unique battery object path}
> +
> +Properties Objects provided on this interface contain the same properties
> + as org.bluez.Battery1 interface. Additionally, this interface
> + needs to have the Device property indicating the object path
> + of the device this battery provides.
> +
> + object Device [readonly]
> +
> + The object path of the device that has this battery.
> --
> 2.26.2
>
--
Luiz Augusto von Dentz
next prev parent reply other threads:[~2020-11-30 21:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-30 20:03 [PATCH BlueZ v4 1/7] battery: Add the internal Battery API Sonny Sasaka
2020-11-30 20:03 ` [PATCH BlueZ v4 2/7] profiles/battery: Refactor to use battery library Sonny Sasaka
2020-11-30 20:03 ` [PATCH BlueZ v4 3/7] battery: Add Source property to Battery API Sonny Sasaka
2020-11-30 20:03 ` [PATCH BlueZ v4 4/7] doc: Add Battery Provider API doc Sonny Sasaka
2020-11-30 21:28 ` Luiz Augusto von Dentz [this message]
2020-11-30 21:56 ` Sonny Sasaka
2020-11-30 20:03 ` [PATCH BlueZ v4 5/7] test: Add test app for Battery Provider API Sonny Sasaka
2020-11-30 20:03 ` [PATCH BlueZ v4 6/7] adapter: Add a public function to find a device by path Sonny Sasaka
2020-11-30 20:03 ` [PATCH BlueZ v4 7/7] battery: Implement Battery Provider API Sonny Sasaka
2020-11-30 20:32 ` [BlueZ,v4,1/7] battery: Add the internal Battery API bluez.test.bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABBYNZJQebV4_CWjaFUVC4Ab6ZWKqWz0K-sp0sdKgMGxVgtZLQ@mail.gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=mcchou@chromium.org \
--cc=sonnysasaka@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).