Message ID | 32554e8adb382a7e5051f09cd06ca4e0dfe1f86b.1675103676.git.pav@iki.fi (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [BlueZ,1/8] doc: add MGMT setting for CIS features, remove Quality Report | expand |
Context | Check | Description |
---|---|---|
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
Hi Pauli, On Mon, Jan 30, 2023 at 10:58 AM Pauli Virtanen <pav@iki.fi> wrote: > > --- > src/adapter.c | 16 ++++++++++++++++ > src/adapter.h | 3 +++ > 2 files changed, 19 insertions(+) > > diff --git a/src/adapter.c b/src/adapter.c > index aadad4016..4f06bce53 100644 > --- a/src/adapter.c > +++ b/src/adapter.c > @@ -9033,6 +9033,22 @@ bool btd_adapter_ssp_enabled(struct btd_adapter *adapter) > return false; > } > > +bool btd_adapter_cis_central_capable(struct btd_adapter *adapter) > +{ > + if (adapter->current_settings & MGMT_SETTING_CIS_CENTRAL) > + return true; > + > + return false; > +} > + > +bool btd_adapter_cis_peripheral_capable(struct btd_adapter *adapter) > +{ > + if (adapter->current_settings & MGMT_SETTING_CIS_PERIPHERAL) > + return true; > + > + return false; > +} > + > void btd_adapter_set_oob_handler(struct btd_adapter *adapter, > struct oob_handler *handler) > { > diff --git a/src/adapter.h b/src/adapter.h > index 78eb069ae..3fcee30bc 100644 > --- a/src/adapter.h > +++ b/src/adapter.h > @@ -226,6 +226,9 @@ void btd_adapter_gatt_server_stop(struct btd_adapter *adapter); > > bool btd_adapter_ssp_enabled(struct btd_adapter *adapter); > > +bool btd_adapter_cis_central_capable(struct btd_adapter *adapter); > +bool btd_adapter_cis_peripheral_capable(struct btd_adapter *adapter); Lets just have btd_adapter_capable(struct btd_adapter *adapter, int flags) to make it simple to check multiple flags if needed. > int adapter_connect_list_add(struct btd_adapter *adapter, > struct btd_device *device); > void adapter_connect_list_remove(struct btd_adapter *adapter, > -- > 2.39.1 >
diff --git a/src/adapter.c b/src/adapter.c index aadad4016..4f06bce53 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -9033,6 +9033,22 @@ bool btd_adapter_ssp_enabled(struct btd_adapter *adapter) return false; } +bool btd_adapter_cis_central_capable(struct btd_adapter *adapter) +{ + if (adapter->current_settings & MGMT_SETTING_CIS_CENTRAL) + return true; + + return false; +} + +bool btd_adapter_cis_peripheral_capable(struct btd_adapter *adapter) +{ + if (adapter->current_settings & MGMT_SETTING_CIS_PERIPHERAL) + return true; + + return false; +} + void btd_adapter_set_oob_handler(struct btd_adapter *adapter, struct oob_handler *handler) { diff --git a/src/adapter.h b/src/adapter.h index 78eb069ae..3fcee30bc 100644 --- a/src/adapter.h +++ b/src/adapter.h @@ -226,6 +226,9 @@ void btd_adapter_gatt_server_stop(struct btd_adapter *adapter); bool btd_adapter_ssp_enabled(struct btd_adapter *adapter); +bool btd_adapter_cis_central_capable(struct btd_adapter *adapter); +bool btd_adapter_cis_peripheral_capable(struct btd_adapter *adapter); + int adapter_connect_list_add(struct btd_adapter *adapter, struct btd_device *device); void adapter_connect_list_remove(struct btd_adapter *adapter,