diff options
author | Sven Gothel <[email protected]> | 2021-07-28 10:50:12 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-07-28 10:50:12 +0200 |
commit | c7b62da9a528de1e032c5189178af0ab60fff5b1 (patch) | |
tree | e44ed239eafb4b8db8bd23f1281879d77a960679 /api/direct_bt/L2CAPComm.hpp | |
parent | d02d3d11d4a67b0951e671ff4273bda02594906f (diff) |
Add BTAdapter::[getV|v]isibleAddressAndType[()] and BTAdapter::get[Address->AddressAndType]() using BDAddressAndType, preparing for random address
Thoroughly changes
- 'EUI48 AdapterInfo::address' -> 'BDAddressAndType AdapterInfo::addressAndType'
- BTAdapter C++
- BTAdapter and its DBTAdapter/DBusAdapter implementations (Java)
Motivation:
- The adapter's address as initially reported by the system is always its public address, i.e. BDAddressType::BDADDR_LE_PUBLIC
- The adapter's visible BDAddressAndType might be set to BDAddressType::BDADDR_LE_RANDOM before scanning / discovery mode (TODO).
Diffstat (limited to 'api/direct_bt/L2CAPComm.hpp')
-rw-r--r-- | api/direct_bt/L2CAPComm.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/api/direct_bt/L2CAPComm.hpp b/api/direct_bt/L2CAPComm.hpp index e9922531..40e9a85e 100644 --- a/api/direct_bt/L2CAPComm.hpp +++ b/api/direct_bt/L2CAPComm.hpp @@ -122,11 +122,11 @@ namespace direct_bt { } private: - static int l2cap_open_dev(const EUI48 & adapterAddress, const L2CAP_PSM psm, const L2CAP_CID cid, const BDAddressType addrType); + static int l2cap_open_dev(const BDAddressAndType & adapterAddressAndType, const L2CAP_PSM psm, const L2CAP_CID cid); static int l2cap_close_dev(int dd); const L2CAPEnv & env; - const EUI48 adapterAddress; + const BDAddressAndType adapterAddressAndType; const L2CAP_PSM psm; const L2CAP_CID cid; @@ -146,7 +146,7 @@ namespace direct_bt { /** * Constructing a non connected L2CAP channel instance for the pre-defined PSM and CID. */ - L2CAPComm(const EUI48& adapterAddress, const L2CAP_PSM psm, const L2CAP_CID cid); + L2CAPComm(const BDAddressAndType& adapterAddressAndType, const L2CAP_PSM psm, const L2CAP_CID cid); L2CAPComm(const L2CAPComm&) = delete; void operator=(const L2CAPComm&) = delete; |