2020-08-03 23:59:38

by Yu Liu

[permalink] [raw]
Subject: [RFC PATCH v1 1/1] adapter - D-Bus API for querying the adapter's capability

From: Archie Pusaka <[email protected]>

Initially this is introduced to query whether WBS is supported by the adapter,
the API is generic enough to be extended to support querying others in
the future.

Reviewed-by: [email protected]

---

Changes in v1:
- Initial change

doc/adapter-api.txt | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt
index 1a7255750..250d0e9b3 100644
--- a/doc/adapter-api.txt
+++ b/doc/adapter-api.txt
@@ -204,6 +204,23 @@ Methods void StartDiscovery()
org.bluez.Error.NotReady
org.bluez.Error.Failed

+ dict GetSupportedCapabilities()
+
+ This method returns a dictionary of supported
+ capabilities that is populated when the adapter
+ initiated.
+
+ The dictionary is following the format
+ {capability : value}, where:
+
+ string capability: The supported capability under
+ discussion.
+ variant value: A more detailed description of
+ the capability.
+
+ Possible errors: org.bluez.Error.NotReady
+ org.bluez.Error.Failed
+
Properties string Address [readonly]

The Bluetooth device address.
--
2.28.0.163.g6104cc2f0b6-goog


2020-08-11 18:23:28

by Yu Liu

[permalink] [raw]
Subject: Re: [RFC PATCH v1 1/1] adapter - D-Bus API for querying the adapter's capability

Friendly ping for comments, thanks.


On Mon, Aug 3, 2020 at 4:58 PM Yu Liu <[email protected]> wrote:
>
> From: Archie Pusaka <[email protected]>
>
> Initially this is introduced to query whether WBS is supported by the adapter,
> the API is generic enough to be extended to support querying others in
> the future.
>
> Reviewed-by: [email protected]
>
> ---
>
> Changes in v1:
> - Initial change
>
> doc/adapter-api.txt | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt
> index 1a7255750..250d0e9b3 100644
> --- a/doc/adapter-api.txt
> +++ b/doc/adapter-api.txt
> @@ -204,6 +204,23 @@ Methods void StartDiscovery()
> org.bluez.Error.NotReady
> org.bluez.Error.Failed
>
> + dict GetSupportedCapabilities()
> +
> + This method returns a dictionary of supported
> + capabilities that is populated when the adapter
> + initiated.
> +
> + The dictionary is following the format
> + {capability : value}, where:
> +
> + string capability: The supported capability under
> + discussion.
> + variant value: A more detailed description of
> + the capability.
> +
> + Possible errors: org.bluez.Error.NotReady
> + org.bluez.Error.Failed
> +
> Properties string Address [readonly]
>
> The Bluetooth device address.
> --
> 2.28.0.163.g6104cc2f0b6-goog
>

2020-08-12 12:13:46

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [RFC PATCH v1 1/1] adapter - D-Bus API for querying the adapter's capability

Hi Yu,

> Initially this is introduced to query whether WBS is supported by the adapter,
> the API is generic enough to be extended to support querying others in
> the future.
>
> Reviewed-by: [email protected]
>
> ---
>
> Changes in v1:
> - Initial change
>
> doc/adapter-api.txt | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt
> index 1a7255750..250d0e9b3 100644
> --- a/doc/adapter-api.txt
> +++ b/doc/adapter-api.txt
> @@ -204,6 +204,23 @@ Methods void StartDiscovery()
> org.bluez.Error.NotReady
> org.bluez.Error.Failed
>
> + dict GetSupportedCapabilities()
> +
> + This method returns a dictionary of supported
> + capabilities that is populated when the adapter
> + initiated.
> +
> + The dictionary is following the format
> + {capability : value}, where:
> +
> + string capability: The supported capability under
> + discussion.
> + variant value: A more detailed description of
> + the capability.
> +
> + Possible errors: org.bluez.Error.NotReady
> + org.bluez.Error.Failed

can’t this be just an array{string} that lists the capabilities?

And if we introduce it, then lets introduce it also with the first user of it. Otherwise we end up forgetting to comment on the actual possible capabilities.

Regards

Marcel

2020-08-17 23:05:45

by Yu Liu

[permalink] [raw]
Subject: Re: [RFC PATCH v1 1/1] adapter - D-Bus API for querying the adapter's capability

Hi Marcel,

Thanks for the suggestion, after talking to the original author we
dropped the original idea and added the new API as suggested. Thanks.


On Wed, Aug 12, 2020 at 5:13 AM Marcel Holtmann <[email protected]> wrote:
>
> Hi Yu,
>
> > Initially this is introduced to query whether WBS is supported by the adapter,
> > the API is generic enough to be extended to support querying others in
> > the future.
> >
> > Reviewed-by: [email protected]
> >
> > ---
> >
> > Changes in v1:
> > - Initial change
> >
> > doc/adapter-api.txt | 17 +++++++++++++++++
> > 1 file changed, 17 insertions(+)
> >
> > diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt
> > index 1a7255750..250d0e9b3 100644
> > --- a/doc/adapter-api.txt
> > +++ b/doc/adapter-api.txt
> > @@ -204,6 +204,23 @@ Methods void StartDiscovery()
> > org.bluez.Error.NotReady
> > org.bluez.Error.Failed
> >
> > + dict GetSupportedCapabilities()
> > +
> > + This method returns a dictionary of supported
> > + capabilities that is populated when the adapter
> > + initiated.
> > +
> > + The dictionary is following the format
> > + {capability : value}, where:
> > +
> > + string capability: The supported capability under
> > + discussion.
> > + variant value: A more detailed description of
> > + the capability.
> > +
> > + Possible errors: org.bluez.Error.NotReady
> > + org.bluez.Error.Failed
>
> can’t this be just an array{string} that lists the capabilities?
>
> And if we introduce it, then lets introduce it also with the first user of it. Otherwise we end up forgetting to comment on the actual possible capabilities.
>
> Regards
>
> Marcel
>