From 848347e1a29a2124eb594eab516827b1dfff9a92 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 12 Jul 2022 10:40:58 -0400 Subject: [PATCH] Remove Set/GetCHIPoBLEServiceMode. They are unused. Fixes https://github.com/project-chip/connectedhomeip/issues/20221 --- src/include/platform/ConnectivityManager.h | 12 ---------- src/include/platform/internal/BLEManager.h | 12 ---------- .../GenericConnectivityManagerImpl_BLE.h | 15 ------------ .../GenericConnectivityManagerImpl_NoBLE.h | 23 ------------------- src/platform/Ameba/BLEManagerImpl.cpp | 17 -------------- src/platform/Ameba/BLEManagerImpl.h | 7 ------ src/platform/CYW30739/BLEManagerImpl.cpp | 17 -------------- src/platform/CYW30739/BLEManagerImpl.h | 2 -- src/platform/Darwin/BLEManagerImpl.cpp | 12 ---------- src/platform/Darwin/BLEManagerImpl.h | 2 -- src/platform/EFR32/BLEManagerImpl.cpp | 17 -------------- src/platform/EFR32/BLEManagerImpl.h | 7 ------ src/platform/ESP32/BLEManagerImpl.h | 7 ------ .../ESP32/bluedroid/BLEManagerImpl.cpp | 17 -------------- src/platform/ESP32/nimble/BLEManagerImpl.cpp | 17 -------------- src/platform/Linux/BLEManagerImpl.cpp | 17 -------------- src/platform/Linux/BLEManagerImpl.h | 7 ------ src/platform/P6/BLEManagerImpl.cpp | 17 -------------- src/platform/P6/BLEManagerImpl.h | 2 -- src/platform/Tizen/BLEManagerImpl.cpp | 17 -------------- src/platform/Tizen/BLEManagerImpl.h | 7 ------ src/platform/Zephyr/BLEManagerImpl.cpp | 15 ------------ src/platform/Zephyr/BLEManagerImpl.h | 7 ------ src/platform/android/BLEManagerImpl.cpp | 18 --------------- src/platform/android/BLEManagerImpl.h | 2 -- .../bouffalolab/BL602/BLEManagerImpl.cpp | 17 -------------- .../bouffalolab/BL602/BLEManagerImpl.h | 7 ------ src/platform/cc13x2_26x2/BLEManagerImpl.cpp | 13 ----------- src/platform/cc13x2_26x2/BLEManagerImpl.h | 2 -- src/platform/mbed/BLEManagerImpl.cpp | 17 -------------- src/platform/mbed/BLEManagerImpl.h | 7 ------ .../nxp/k32w/k32w0/BLEManagerImpl.cpp | 17 -------------- src/platform/nxp/k32w/k32w0/BLEManagerImpl.h | 7 ------ src/platform/qpg/BLEManagerImpl.cpp | 17 -------------- src/platform/qpg/BLEManagerImpl.h | 7 ------ src/platform/telink/BLEManagerImpl.cpp | 5 ---- src/platform/telink/BLEManagerImpl.h | 7 ------ src/platform/webos/BLEManagerImpl.cpp | 17 -------------- src/platform/webos/BLEManagerImpl.h | 7 ------ 39 files changed, 440 deletions(-) diff --git a/src/include/platform/ConnectivityManager.h b/src/include/platform/ConnectivityManager.h index 162a31c3a3ab0e..d8638dcc237615 100644 --- a/src/include/platform/ConnectivityManager.h +++ b/src/include/platform/ConnectivityManager.h @@ -229,8 +229,6 @@ class ConnectivityManager // CHIPoBLE service methods Ble::BleLayer * GetBleLayer(); - CHIPoBLEServiceMode GetCHIPoBLEServiceMode(); - CHIP_ERROR SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool IsBLEAdvertisingEnabled(); /** * Enable or disable BLE advertising. @@ -532,16 +530,6 @@ inline Ble::BleLayer * ConnectivityManager::GetBleLayer() return static_cast(this)->_GetBleLayer(); } -inline ConnectivityManager::CHIPoBLEServiceMode ConnectivityManager::GetCHIPoBLEServiceMode() -{ - return static_cast(this)->_GetCHIPoBLEServiceMode(); -} - -inline CHIP_ERROR ConnectivityManager::SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - return static_cast(this)->_SetCHIPoBLEServiceMode(val); -} - inline bool ConnectivityManager::IsBLEAdvertisingEnabled() { return static_cast(this)->_IsBLEAdvertisingEnabled(); diff --git a/src/include/platform/internal/BLEManager.h b/src/include/platform/internal/BLEManager.h index 6525a507261f26..f37f2f3eb00743 100644 --- a/src/include/platform/internal/BLEManager.h +++ b/src/include/platform/internal/BLEManager.h @@ -55,8 +55,6 @@ class BLEManager CHIP_ERROR Init(); void Shutdown(); - CHIPoBLEServiceMode GetCHIPoBLEServiceMode(); - CHIP_ERROR SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool IsAdvertisingEnabled(); CHIP_ERROR SetAdvertisingEnabled(bool val); bool IsAdvertising(); @@ -125,16 +123,6 @@ inline void BLEManager::Shutdown() static_cast(this)->_Shutdown(); } -inline BLEManager::CHIPoBLEServiceMode BLEManager::GetCHIPoBLEServiceMode() -{ - return static_cast(this)->_GetCHIPoBLEServiceMode(); -} - -inline CHIP_ERROR BLEManager::SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - return static_cast(this)->_SetCHIPoBLEServiceMode(val); -} - inline bool BLEManager::IsAdvertisingEnabled() { return static_cast(this)->_IsAdvertisingEnabled(); diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_BLE.h b/src/include/platform/internal/GenericConnectivityManagerImpl_BLE.h index 8c0a9f97cd147e..13a13643b4f588 100644 --- a/src/include/platform/internal/GenericConnectivityManagerImpl_BLE.h +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_BLE.h @@ -52,8 +52,6 @@ class GenericConnectivityManagerImpl_BLE // ===== Methods that implement the ConnectivityManager abstract interface. Ble::BleLayer * _GetBleLayer(); - ConnectivityManager::CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(); - CHIP_ERROR _SetCHIPoBLEServiceMode(ConnectivityManager::CHIPoBLEServiceMode val); bool _IsBLEAdvertisingEnabled(); CHIP_ERROR _SetBLEAdvertisingEnabled(bool val); bool _IsBLEAdvertising(); @@ -76,19 +74,6 @@ inline Ble::BleLayer * GenericConnectivityManagerImpl_BLE::_GetBleLay return BLEMgr().GetBleLayer(); } -template -inline ConnectivityManager::CHIPoBLEServiceMode GenericConnectivityManagerImpl_BLE::_GetCHIPoBLEServiceMode() -{ - return BLEMgr().GetCHIPoBLEServiceMode(); -} - -template -inline CHIP_ERROR -GenericConnectivityManagerImpl_BLE::_SetCHIPoBLEServiceMode(ConnectivityManager::CHIPoBLEServiceMode val) -{ - return BLEMgr().SetCHIPoBLEServiceMode(val); -} - template inline bool GenericConnectivityManagerImpl_BLE::_IsBLEAdvertisingEnabled() { diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_NoBLE.h b/src/include/platform/internal/GenericConnectivityManagerImpl_NoBLE.h index 4ea56a00f56cb2..83817a7c385e4a 100644 --- a/src/include/platform/internal/GenericConnectivityManagerImpl_NoBLE.h +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_NoBLE.h @@ -37,14 +37,6 @@ namespace Internal { * * The members of this class are all inlined methods that do nothing, and return static return * values. This allows the compiler to optimize away dead code without the use of \#ifdef's. - * For example: - * - * ``` - * if (ConnectivityMgr().GetCHIPoBLEServiceMode() != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported) - * { - * // ... do something on devices that support CHIPoBLE ... - * } - * ``` */ template class GenericConnectivityManagerImpl_NoBLE @@ -53,8 +45,6 @@ class GenericConnectivityManagerImpl_NoBLE // ===== Methods that implement the ConnectivityManager abstract interface. Ble::BleLayer * _GetBleLayer(void); - ConnectivityManager::CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(ConnectivityManager::CHIPoBLEServiceMode val); bool _IsBLEAdvertisingEnabled(void); CHIP_ERROR _SetBLEAdvertisingEnabled(bool val); bool _IsBLEAdvertising(void); @@ -74,19 +64,6 @@ inline Ble::BleLayer * GenericConnectivityManagerImpl_NoBLE::_GetBleL return nullptr; } -template -inline ConnectivityManager::CHIPoBLEServiceMode GenericConnectivityManagerImpl_NoBLE::_GetCHIPoBLEServiceMode(void) -{ - return ConnectivityManager::kCHIPoBLEServiceMode_NotSupported; -} - -template -inline CHIP_ERROR -GenericConnectivityManagerImpl_NoBLE::_SetCHIPoBLEServiceMode(ConnectivityManager::CHIPoBLEServiceMode val) -{ - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; -} - template inline bool GenericConnectivityManagerImpl_NoBLE::_IsBLEAdvertisingEnabled(void) { diff --git a/src/platform/Ameba/BLEManagerImpl.cpp b/src/platform/Ameba/BLEManagerImpl.cpp index 449663268152e9..6987063539e708 100644 --- a/src/platform/Ameba/BLEManagerImpl.cpp +++ b/src/platform/Ameba/BLEManagerImpl.cpp @@ -352,23 +352,6 @@ BLEManagerImpl::CHIPoBLEConState * BLEManagerImpl::GetConnectionState(uint8_t co return NULL; } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; -} - CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/platform/Ameba/BLEManagerImpl.h b/src/platform/Ameba/BLEManagerImpl.h index 07cf5f22ad164a..693d1de8708d10 100755 --- a/src/platform/Ameba/BLEManagerImpl.h +++ b/src/platform/Ameba/BLEManagerImpl.h @@ -47,8 +47,6 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla CHIP_ERROR _Init(void); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(void); @@ -200,11 +198,6 @@ inline BleLayer * BLEManagerImpl::_GetBleLayer() return this; } -inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode(void) -{ - return mServiceMode; -} - inline bool BLEManagerImpl::_IsAdvertisingEnabled(void) { return mFlags.Has(Flags::kAdvertisingEnabled); diff --git a/src/platform/CYW30739/BLEManagerImpl.cpp b/src/platform/CYW30739/BLEManagerImpl.cpp index e218adc161abd6..290461bfc89aa6 100644 --- a/src/platform/CYW30739/BLEManagerImpl.cpp +++ b/src/platform/CYW30739/BLEManagerImpl.cpp @@ -98,23 +98,6 @@ CHIP_ERROR BLEManagerImpl::_Init() return err; } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; -} - bool BLEManagerImpl::_IsAdvertisingEnabled(void) { return mFlags.Has(Flags::kFlag_AdvertisingEnabled); diff --git a/src/platform/CYW30739/BLEManagerImpl.h b/src/platform/CYW30739/BLEManagerImpl.h index 2b5d8bcdacf232..64ecf3edafe28c 100644 --- a/src/platform/CYW30739/BLEManagerImpl.h +++ b/src/platform/CYW30739/BLEManagerImpl.h @@ -52,8 +52,6 @@ class BLEManagerImpl final : public BLEManager, CHIP_ERROR _Init(void); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsFastAdvertisingEnabled(void); diff --git a/src/platform/Darwin/BLEManagerImpl.cpp b/src/platform/Darwin/BLEManagerImpl.cpp index 91c3a813e9dfb5..49e2847a9dc2e3 100644 --- a/src/platform/Darwin/BLEManagerImpl.cpp +++ b/src/platform/Darwin/BLEManagerImpl.cpp @@ -56,18 +56,6 @@ CHIP_ERROR BLEManagerImpl::_Init() return err; } -ConnectivityManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode(void) -{ - ChipLogDetail(DeviceLayer, "%s", __FUNCTION__); - return ConnectivityManager::kCHIPoBLEServiceMode_NotSupported; -} - -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(ConnectivityManager::CHIPoBLEServiceMode val) -{ - ChipLogDetail(DeviceLayer, "%s", __FUNCTION__); - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; -} - bool BLEManagerImpl::_IsAdvertisingEnabled(void) { ChipLogDetail(DeviceLayer, "%s", __FUNCTION__); diff --git a/src/platform/Darwin/BLEManagerImpl.h b/src/platform/Darwin/BLEManagerImpl.h index 0554b2245bed98..83788bf4319d8f 100644 --- a/src/platform/Darwin/BLEManagerImpl.h +++ b/src/platform/Darwin/BLEManagerImpl.h @@ -48,8 +48,6 @@ class BLEManagerImpl final : public BLEManager, private BleLayer CHIP_ERROR _Init(void); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(void); diff --git a/src/platform/EFR32/BLEManagerImpl.cpp b/src/platform/EFR32/BLEManagerImpl.cpp index 1d59f76d725bbc..e79d403235ffdf 100644 --- a/src/platform/EFR32/BLEManagerImpl.cpp +++ b/src/platform/EFR32/BLEManagerImpl.cpp @@ -299,23 +299,6 @@ void BLEManagerImpl::bluetoothStackEventHandler(void * p_arg) } } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; -} - CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/platform/EFR32/BLEManagerImpl.h b/src/platform/EFR32/BLEManagerImpl.h index 19e3900e9adfc2..561e553acd0ca2 100644 --- a/src/platform/EFR32/BLEManagerImpl.h +++ b/src/platform/EFR32/BLEManagerImpl.h @@ -50,8 +50,6 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla CHIP_ERROR _Init(void); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(void); @@ -180,11 +178,6 @@ inline BleLayer * BLEManagerImpl::_GetBleLayer() return this; } -inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode(void) -{ - return mServiceMode; -} - inline bool BLEManagerImpl::_IsAdvertisingEnabled(void) { return mFlags.Has(Flags::kAdvertisingEnabled); diff --git a/src/platform/ESP32/BLEManagerImpl.h b/src/platform/ESP32/BLEManagerImpl.h index 284e0634cf5e03..9c3020f9b504bb 100644 --- a/src/platform/ESP32/BLEManagerImpl.h +++ b/src/platform/ESP32/BLEManagerImpl.h @@ -82,8 +82,6 @@ class BLEManagerImpl final : public BLEManager, CHIP_ERROR _Init(void); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(void); @@ -283,11 +281,6 @@ inline ::chip::Ble::BleLayer * BLEManagerImpl::_GetBleLayer() return this; } -inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode(void) -{ - return mServiceMode; -} - inline bool BLEManagerImpl::_IsAdvertisingEnabled(void) { return mFlags.Has(Flags::kAdvertisingEnabled); diff --git a/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp b/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp index 126f52455cc0fd..fdec550c48de76 100644 --- a/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp +++ b/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp @@ -152,23 +152,6 @@ CHIP_ERROR BLEManagerImpl::_Init() return err; } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; -} - CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/platform/ESP32/nimble/BLEManagerImpl.cpp b/src/platform/ESP32/nimble/BLEManagerImpl.cpp index 8952ac48662e2c..b3ec3b80ce8291 100644 --- a/src/platform/ESP32/nimble/BLEManagerImpl.cpp +++ b/src/platform/ESP32/nimble/BLEManagerImpl.cpp @@ -162,23 +162,6 @@ CHIP_ERROR BLEManagerImpl::_Init() return err; } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; -} - CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/platform/Linux/BLEManagerImpl.cpp b/src/platform/Linux/BLEManagerImpl.cpp index 4e1ad383e272cd..7de6ac8dba6e1d 100644 --- a/src/platform/Linux/BLEManagerImpl.cpp +++ b/src/platform/Linux/BLEManagerImpl.cpp @@ -99,23 +99,6 @@ void BLEManagerImpl::_Shutdown() mDeviceScanner.reset(); } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mServiceMode == ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; -} - CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/platform/Linux/BLEManagerImpl.h b/src/platform/Linux/BLEManagerImpl.h index 6d898dc7a62c1f..eed743e6c53b7c 100644 --- a/src/platform/Linux/BLEManagerImpl.h +++ b/src/platform/Linux/BLEManagerImpl.h @@ -113,8 +113,6 @@ class BLEManagerImpl final : public BLEManager, CHIP_ERROR _Init(); void _Shutdown(); - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(); @@ -233,11 +231,6 @@ inline Ble::BleLayer * BLEManagerImpl::_GetBleLayer() return this; } -inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode() -{ - return mServiceMode; -} - inline bool BLEManagerImpl::_IsAdvertisingEnabled() { return mFlags.Has(Flags::kAdvertisingEnabled); diff --git a/src/platform/P6/BLEManagerImpl.cpp b/src/platform/P6/BLEManagerImpl.cpp index d0f0c2f434ae42..134fc0123fc7a0 100644 --- a/src/platform/P6/BLEManagerImpl.cpp +++ b/src/platform/P6/BLEManagerImpl.cpp @@ -133,23 +133,6 @@ CHIP_ERROR BLEManagerImpl::_Init() return err; } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; -} - bool BLEManagerImpl::_IsAdvertisingEnabled(void) { return mFlags.Has(Flags::kFlag_AdvertisingEnabled); diff --git a/src/platform/P6/BLEManagerImpl.h b/src/platform/P6/BLEManagerImpl.h index 5f470962bf0ae8..d97fa47212cf1d 100644 --- a/src/platform/P6/BLEManagerImpl.h +++ b/src/platform/P6/BLEManagerImpl.h @@ -52,8 +52,6 @@ class BLEManagerImpl final : public BLEManager, CHIP_ERROR _Init(void); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsFastAdvertisingEnabled(void); diff --git a/src/platform/Tizen/BLEManagerImpl.cpp b/src/platform/Tizen/BLEManagerImpl.cpp index bcd6c862a24ad1..4fa9d66c1deab1 100644 --- a/src/platform/Tizen/BLEManagerImpl.cpp +++ b/src/platform/Tizen/BLEManagerImpl.cpp @@ -926,23 +926,6 @@ CHIP_ERROR BLEManagerImpl::_Init(void) return err; } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mServiceMode == ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; -} - CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { mFlags.Set(Flags::kAdvertisingEnabled, val); diff --git a/src/platform/Tizen/BLEManagerImpl.h b/src/platform/Tizen/BLEManagerImpl.h index 36dfa463f31510..a54d6ec9d7e792 100644 --- a/src/platform/Tizen/BLEManagerImpl.h +++ b/src/platform/Tizen/BLEManagerImpl.h @@ -88,8 +88,6 @@ class BLEManagerImpl final : public BLEManager, CHIP_ERROR _Init(void); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(void); @@ -253,11 +251,6 @@ inline Ble::BleLayer * BLEManagerImpl::_GetBleLayer() return this; } -inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode() -{ - return mServiceMode; -} - inline bool BLEManagerImpl::_IsAdvertisingEnabled() { return mFlags.Has(Flags::kAdvertisingEnabled); diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp index b95fcccdbeca79..8aa322afcfb16c 100644 --- a/src/platform/Zephyr/BLEManagerImpl.cpp +++ b/src/platform/Zephyr/BLEManagerImpl.cpp @@ -352,21 +352,6 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void) return CHIP_NO_ERROR; } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - VerifyOrReturnError(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, - CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - - return CHIP_NO_ERROR; -} - CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { VerifyOrReturnError(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, diff --git a/src/platform/Zephyr/BLEManagerImpl.h b/src/platform/Zephyr/BLEManagerImpl.h index e72adbfe604a60..a99847c9f90168 100644 --- a/src/platform/Zephyr/BLEManagerImpl.h +++ b/src/platform/Zephyr/BLEManagerImpl.h @@ -60,8 +60,6 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla CHIP_ERROR _Init(void); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(void); @@ -186,11 +184,6 @@ inline BleLayer * BLEManagerImpl::_GetBleLayer() return this; } -inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode(void) -{ - return mServiceMode; -} - inline bool BLEManagerImpl::_IsAdvertisingEnabled(void) { return mFlags.Has(Flags::kAdvertisingEnabled); diff --git a/src/platform/android/BLEManagerImpl.cpp b/src/platform/android/BLEManagerImpl.cpp index 2fa6556677cebd..4aab1c74c62aaa 100644 --- a/src/platform/android/BLEManagerImpl.cpp +++ b/src/platform/android/BLEManagerImpl.cpp @@ -161,24 +161,6 @@ CHIP_ERROR BLEManagerImpl::_Init() return err; } -BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode() -{ - bool has = false; - CHIP_ERROR err = HasFlag(Flags::kServiceModeEnabled, has); - - VerifyOrReturnError(err == CHIP_NO_ERROR, ConnectivityManager::kCHIPoBLEServiceMode_NotSupported); - return has ? ConnectivityManager::kCHIPoBLEServiceMode_Enabled : ConnectivityManager::kCHIPoBLEServiceMode_Disabled; -} - -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - ReturnErrorCodeIf(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, CHIP_ERROR_INVALID_ARGUMENT); - - bool isSet = (val == ConnectivityManager::kCHIPoBLEServiceMode_Enabled) ? true : false; - - return SetFlag(Flags::kServiceModeEnabled, isSet); -} - bool BLEManagerImpl::_IsAdvertisingEnabled() { bool has = false; diff --git a/src/platform/android/BLEManagerImpl.h b/src/platform/android/BLEManagerImpl.h index af014c1a10990e..718db85c71b147 100644 --- a/src/platform/android/BLEManagerImpl.h +++ b/src/platform/android/BLEManagerImpl.h @@ -57,8 +57,6 @@ class BLEManagerImpl final : public BLEManager, CHIP_ERROR _Init(); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(); diff --git a/src/platform/bouffalolab/BL602/BLEManagerImpl.cpp b/src/platform/bouffalolab/BL602/BLEManagerImpl.cpp index 947598e0d8c4f5..2ac59f4320f1dc 100644 --- a/src/platform/bouffalolab/BL602/BLEManagerImpl.cpp +++ b/src/platform/bouffalolab/BL602/BLEManagerImpl.cpp @@ -363,23 +363,6 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void) return CHIP_NO_ERROR; } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; -} - CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/platform/bouffalolab/BL602/BLEManagerImpl.h b/src/platform/bouffalolab/BL602/BLEManagerImpl.h index 0e7fc523c6ae0f..33ab32a4078cd6 100644 --- a/src/platform/bouffalolab/BL602/BLEManagerImpl.h +++ b/src/platform/bouffalolab/BL602/BLEManagerImpl.h @@ -51,8 +51,6 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla CHIP_ERROR _Init(void); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(void); @@ -166,11 +164,6 @@ inline BleLayer * BLEManagerImpl::_GetBleLayer() return this; } -inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode(void) -{ - return mServiceMode; -} - inline bool BLEManagerImpl::_IsAdvertisingEnabled(void) { return mFlags.Has(Flags::kAdvertisingEnabled); diff --git a/src/platform/cc13x2_26x2/BLEManagerImpl.cpp b/src/platform/cc13x2_26x2/BLEManagerImpl.cpp index 096d10e3198271..3f1ea583bdc716 100644 --- a/src/platform/cc13x2_26x2/BLEManagerImpl.cpp +++ b/src/platform/cc13x2_26x2/BLEManagerImpl.cpp @@ -125,19 +125,6 @@ CHIP_ERROR BLEManagerImpl::_Init(void) return err; } -BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode(void) -{ - return mServiceMode; -} - -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(BLEManager::CHIPoBLEServiceMode val) -{ - mServiceMode = val; - - /* Trigger state update */ - return DriveBLEState(); -} - bool BLEManagerImpl::_IsAdvertisingEnabled(void) { return mFlags.Has(Flags::kAdvertisingEnabled); diff --git a/src/platform/cc13x2_26x2/BLEManagerImpl.h b/src/platform/cc13x2_26x2/BLEManagerImpl.h index 42f2181d0dd2ad..668778e4084d9f 100644 --- a/src/platform/cc13x2_26x2/BLEManagerImpl.h +++ b/src/platform/cc13x2_26x2/BLEManagerImpl.h @@ -208,8 +208,6 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla CHIP_ERROR _Init(void); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(void); diff --git a/src/platform/mbed/BLEManagerImpl.cpp b/src/platform/mbed/BLEManagerImpl.cpp index d147a982bc2f47..4cb7214a11c875 100644 --- a/src/platform/mbed/BLEManagerImpl.cpp +++ b/src/platform/mbed/BLEManagerImpl.cpp @@ -831,23 +831,6 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void) return err; } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; -} - CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/platform/mbed/BLEManagerImpl.h b/src/platform/mbed/BLEManagerImpl.h index 31db5f9f5ef294..e642b1276493f0 100644 --- a/src/platform/mbed/BLEManagerImpl.h +++ b/src/platform/mbed/BLEManagerImpl.h @@ -47,8 +47,6 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla CHIP_ERROR _Init(void); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingMode(BLEAdvertisingMode mode); CHIP_ERROR _SetAdvertisingEnabled(bool val); @@ -151,11 +149,6 @@ inline BleLayer * BLEManagerImpl::_GetBleLayer() return this; } -inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode(void) -{ - return mServiceMode; -} - inline bool BLEManagerImpl::_IsAdvertisingEnabled(void) { return mFlags.Has(Flags::kFlag_AdvertisingEnabled); diff --git a/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp index 44a9c0c7890d46..ce2c4a235cdaa8 100644 --- a/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp @@ -308,23 +308,6 @@ BLEManagerImpl::CHIPoBLEConState * BLEManagerImpl::GetConnectionState(uint8_t co return NULL; } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; -} - CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/platform/nxp/k32w/k32w0/BLEManagerImpl.h b/src/platform/nxp/k32w/k32w0/BLEManagerImpl.h index 1ff7ba1910f452..b3b473337bf253 100644 --- a/src/platform/nxp/k32w/k32w0/BLEManagerImpl.h +++ b/src/platform/nxp/k32w/k32w0/BLEManagerImpl.h @@ -65,8 +65,6 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla CHIP_ERROR _Init(void); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(void); @@ -282,11 +280,6 @@ inline BleLayer * BLEManagerImpl::_GetBleLayer() return this; } -inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode(void) -{ - return mServiceMode; -} - } // namespace Internal } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/qpg/BLEManagerImpl.cpp b/src/platform/qpg/BLEManagerImpl.cpp index bbb7c8c4c96bb9..8f3aa45fd0a867 100644 --- a/src/platform/qpg/BLEManagerImpl.cpp +++ b/src/platform/qpg/BLEManagerImpl.cpp @@ -124,23 +124,6 @@ CHIP_ERROR BLEManagerImpl::_Init() return err; } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; -} - CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/platform/qpg/BLEManagerImpl.h b/src/platform/qpg/BLEManagerImpl.h index 5c5b571e1485f0..8038db590a5a41 100644 --- a/src/platform/qpg/BLEManagerImpl.h +++ b/src/platform/qpg/BLEManagerImpl.h @@ -49,8 +49,6 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla CHIP_ERROR _Init(void); void _Shutdown() {} - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(void); @@ -170,11 +168,6 @@ inline BleLayer * BLEManagerImpl::_GetBleLayer() return this; } -inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode(void) -{ - return mServiceMode; -} - inline bool BLEManagerImpl::_IsAdvertisingEnabled(void) { return mFlags.Has(Flags::kAdvertisingEnabled); diff --git a/src/platform/telink/BLEManagerImpl.cpp b/src/platform/telink/BLEManagerImpl.cpp index 68464a1fec8628..eaacb0250338a2 100644 --- a/src/platform/telink/BLEManagerImpl.cpp +++ b/src/platform/telink/BLEManagerImpl.cpp @@ -467,11 +467,6 @@ void BLEManagerImpl::_InitGatt(void) bls_att_setAttributeTable((u8 *) gattTable); } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - return CHIP_NO_ERROR; -} - CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) { ble_sts_t status = BLE_SUCCESS; diff --git a/src/platform/telink/BLEManagerImpl.h b/src/platform/telink/BLEManagerImpl.h index e3a0f458f59f17..86aae895197582 100644 --- a/src/platform/telink/BLEManagerImpl.h +++ b/src/platform/telink/BLEManagerImpl.h @@ -45,8 +45,6 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla CHIP_ERROR _Init(void); void _Shutdown(); - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(void); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(void); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(void); @@ -196,11 +194,6 @@ inline BleLayer * BLEManagerImpl::_GetBleLayer() return this; } -inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode(void) -{ - return mServiceMode; -} - inline bool BLEManagerImpl::_IsAdvertisingEnabled(void) { return mFlags.Has(Flags::kAdvertisingEnabled); diff --git a/src/platform/webos/BLEManagerImpl.cpp b/src/platform/webos/BLEManagerImpl.cpp index e98e38ba3ab35b..12376d82671c12 100644 --- a/src/platform/webos/BLEManagerImpl.cpp +++ b/src/platform/webos/BLEManagerImpl.cpp @@ -134,23 +134,6 @@ void BLEManagerImpl::_Shutdown() mDeviceScanner.reset(); } -CHIP_ERROR BLEManagerImpl::_SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrExit(val != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrExit(mServiceMode == ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, err = CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - - if (val != mServiceMode) - { - mServiceMode = val; - PlatformMgr().ScheduleWork(DriveBLEState, 0); - } - -exit: - return err; -} - CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/platform/webos/BLEManagerImpl.h b/src/platform/webos/BLEManagerImpl.h index e4f20dd431cacb..bc8ad739d82bf0 100644 --- a/src/platform/webos/BLEManagerImpl.h +++ b/src/platform/webos/BLEManagerImpl.h @@ -96,8 +96,6 @@ class BLEManagerImpl final : public BLEManager, CHIP_ERROR _Init(); void _Shutdown(); - CHIPoBLEServiceMode _GetCHIPoBLEServiceMode(); - CHIP_ERROR _SetCHIPoBLEServiceMode(CHIPoBLEServiceMode val); bool _IsAdvertisingEnabled(); CHIP_ERROR _SetAdvertisingEnabled(bool val); bool _IsAdvertising(); @@ -250,11 +248,6 @@ inline Ble::BleLayer * BLEManagerImpl::_GetBleLayer() return this; } -inline BLEManager::CHIPoBLEServiceMode BLEManagerImpl::_GetCHIPoBLEServiceMode() -{ - return mServiceMode; -} - inline bool BLEManagerImpl::_IsAdvertisingEnabled() { return mFlags.Has(Flags::kAdvertisingEnabled);