diff options
author | Sven Gothel <[email protected]> | 2020-10-14 18:43:27 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-10-14 18:43:27 +0200 |
commit | 6ee66ac954a7e2c9f909e1f27debd02cf9954a4e (patch) | |
tree | 3e40e0cf4ed053735d8c50a3718815b15feb4996 /examples | |
parent | db056cb4c7dd114aa11adecb0b660d86a3612650 (diff) |
AdapterInfo Cleanup: AdapterSetting current_setting -> atomic, drop its atomic-copy in DBTAdapter. Simplify related method[-names]s.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/direct_bt_scanner00/dbt_scanner00.cpp | 6 | ||||
-rw-r--r-- | examples/direct_bt_scanner01/dbt_scanner01.cpp | 6 | ||||
-rw-r--r-- | examples/direct_bt_scanner10/dbt_scanner10.cpp | 12 |
3 files changed, 12 insertions, 12 deletions
diff --git a/examples/direct_bt_scanner00/dbt_scanner00.cpp b/examples/direct_bt_scanner00/dbt_scanner00.cpp index 0940de7e..db42d2e6 100644 --- a/examples/direct_bt_scanner00/dbt_scanner00.cpp +++ b/examples/direct_bt_scanner00/dbt_scanner00.cpp @@ -54,9 +54,9 @@ class MyAdapterStatusListener : public AdapterStatusListener { void adapterSettingsChanged(DBTAdapter &a, const AdapterSetting oldmask, const AdapterSetting newmask, const AdapterSetting changedmask, const uint64_t timestamp) override { fprintf(stderr, "****** Native Adapter SETTINGS_CHANGED: %s -> %s, changed %s\n", - getAdapterSettingsString(oldmask).c_str(), - getAdapterSettingsString(newmask).c_str(), - getAdapterSettingsString(changedmask).c_str()); + getAdapterSettingMaskString(oldmask).c_str(), + getAdapterSettingMaskString(newmask).c_str(), + getAdapterSettingMaskString(changedmask).c_str()); fprintf(stderr, "Status DBTAdapter:\n"); fprintf(stderr, "%s\n", a.toString().c_str()); (void)timestamp; diff --git a/examples/direct_bt_scanner01/dbt_scanner01.cpp b/examples/direct_bt_scanner01/dbt_scanner01.cpp index a63deb25..7c666b28 100644 --- a/examples/direct_bt_scanner01/dbt_scanner01.cpp +++ b/examples/direct_bt_scanner01/dbt_scanner01.cpp @@ -51,9 +51,9 @@ class MyAdapterStatusListener : public AdapterStatusListener { void adapterSettingsChanged(DBTAdapter &a, const AdapterSetting oldmask, const AdapterSetting newmask, const AdapterSetting changedmask, const uint64_t timestamp) override { fprintf(stderr, "****** Native Adapter SETTINGS_CHANGED: %s -> %s, changed %s\n", - getAdapterSettingsString(oldmask).c_str(), - getAdapterSettingsString(newmask).c_str(), - getAdapterSettingsString(changedmask).c_str()); + getAdapterSettingMaskString(oldmask).c_str(), + getAdapterSettingMaskString(newmask).c_str(), + getAdapterSettingMaskString(changedmask).c_str()); fprintf(stderr, "Status DBTAdapter:\n"); fprintf(stderr, "%s\n", a.toString().c_str()); (void)timestamp; diff --git a/examples/direct_bt_scanner10/dbt_scanner10.cpp b/examples/direct_bt_scanner10/dbt_scanner10.cpp index a8a60646..f68b2e58 100644 --- a/examples/direct_bt_scanner10/dbt_scanner10.cpp +++ b/examples/direct_bt_scanner10/dbt_scanner10.cpp @@ -151,19 +151,19 @@ class MyAdapterStatusListener : public AdapterStatusListener { const AdapterSetting changedmask, const uint64_t timestamp) override { const bool initialSetting = AdapterSetting::NONE == oldmask; if( initialSetting ) { - fprintf(stderr, "****** SETTINGS_INITIAL: %s -> %s, changed %s\n", getAdapterSettingsString(oldmask).c_str(), - getAdapterSettingsString(newmask).c_str(), getAdapterSettingsString(changedmask).c_str()); + fprintf(stderr, "****** SETTINGS_INITIAL: %s -> %s, changed %s\n", getAdapterSettingMaskString(oldmask).c_str(), + getAdapterSettingMaskString(newmask).c_str(), getAdapterSettingMaskString(changedmask).c_str()); } else { - fprintf(stderr, "****** SETTINGS_CHANGED: %s -> %s, changed %s\n", getAdapterSettingsString(oldmask).c_str(), - getAdapterSettingsString(newmask).c_str(), getAdapterSettingsString(changedmask).c_str()); + fprintf(stderr, "****** SETTINGS_CHANGED: %s -> %s, changed %s\n", getAdapterSettingMaskString(oldmask).c_str(), + getAdapterSettingMaskString(newmask).c_str(), getAdapterSettingMaskString(changedmask).c_str()); } fprintf(stderr, "Status DBTAdapter:\n"); fprintf(stderr, "%s\n", a.toString().c_str()); (void)timestamp; if( !initialSetting && - isAdapterSettingSet(changedmask, AdapterSetting::POWERED) && - isAdapterSettingSet(newmask, AdapterSetting::POWERED) ) + isAdapterSettingBitSet(changedmask, AdapterSetting::POWERED) && + isAdapterSettingBitSet(newmask, AdapterSetting::POWERED) ) { HCIStatusCode status = a.startDiscovery( true ); if( HCIStatusCode::SUCCESS != status ) { |