mirror of
https://github.com/esphome/esphome.git
synced 2026-10-22 05:46:12 +00:00
[esp32_ble][esp32_ble_tracker][bluetooth_proxy][bluetooth_connection] Re-export ble_device_base types with using-declarations (#21337)
This commit is contained in:
@@ -22,8 +22,8 @@ class BluetoothProxy;
|
||||
|
||||
namespace esphome::bluetooth_connection {
|
||||
|
||||
using ClientState = ble_device_base::ClientState;
|
||||
using ConnectionType = ble_device_base::ConnectionType;
|
||||
using ble_device_base::ClientState;
|
||||
using ble_device_base::ConnectionType;
|
||||
|
||||
/// A refused GATT reply owed to the current subscriber. Payload-free only:
|
||||
/// these rebuild from address + handle + error, so a retry costs no buffered
|
||||
|
||||
@@ -30,8 +30,8 @@ using bluetooth_connection::INIT_SENDING_SERVICES;
|
||||
using bluetooth_connection::SERVICES_DONE_PENDING;
|
||||
|
||||
#ifdef USE_BLUETOOTH_PROXY_CONNECTIONS
|
||||
using BluetoothConnection = bluetooth_connection::BluetoothConnection;
|
||||
using ClientState = ble_device_base::ClientState;
|
||||
using bluetooth_connection::BluetoothConnection;
|
||||
using ble_device_base::ClientState;
|
||||
#endif
|
||||
|
||||
// Legacy versions:
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
namespace esphome::esp32_ble {
|
||||
|
||||
using ble_device_base::UUID_STR_LEN;
|
||||
using ESPBTUUID = ble_device_base::ESPBTUUID;
|
||||
using ble_device_base::ESPBTUUID;
|
||||
|
||||
} // namespace esphome::esp32_ble
|
||||
|
||||
|
||||
@@ -33,18 +33,18 @@ namespace esphome::esp32_ble_tracker {
|
||||
|
||||
using namespace esp32_ble;
|
||||
|
||||
using adv_data_t = ble_device_base::adv_data_t;
|
||||
using ble_device_base::adv_data_t;
|
||||
|
||||
#ifdef USE_ESP32_BLE_UUID
|
||||
using ServiceData = ble_device_base::ServiceData;
|
||||
using ble_device_base::ServiceData;
|
||||
#endif
|
||||
|
||||
#ifdef USE_ESP32_BLE_DEVICE
|
||||
// The advertisement device types are owned by the platform-neutral
|
||||
// ble_device_base layer; re-exported here (esp32 only) for backward
|
||||
// compatibility. ESPBTDevice::parse_scan_rst() (esp32-only) adapts BLEScanResult.
|
||||
using ESPBLEiBeacon = ble_device_base::ESPBLEiBeacon;
|
||||
using ESPBTDevice = ble_device_base::ESPBTDevice;
|
||||
using ble_device_base::ESPBLEiBeacon;
|
||||
using ble_device_base::ESPBTDevice;
|
||||
#endif // USE_ESP32_BLE_DEVICE
|
||||
|
||||
class ESP32BLETracker;
|
||||
@@ -82,12 +82,12 @@ struct ClientStateCounts {
|
||||
|
||||
// The client connection state types are owned by the platform-neutral
|
||||
// ble_device_base layer; re-exported here for backward compatibility.
|
||||
using ClientState = ble_device_base::ClientState;
|
||||
using ConnectionType = ble_device_base::ConnectionType;
|
||||
using ble_device_base::ClientState;
|
||||
using ble_device_base::ConnectionType;
|
||||
using ble_device_base::client_state_to_string;
|
||||
|
||||
// Neutral scanner lifecycle re-exported for backward compatibility.
|
||||
using ScannerState = ble_device_base::ScannerState;
|
||||
using ble_device_base::ScannerState;
|
||||
|
||||
/// Base class for BLE GATT clients that connect to remote devices.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user