BLE: update to use whitelist_t from ble namespace

pull/12730/head
Lingkai Dong 2020-03-25 14:59:26 +00:00
parent e97582bd23
commit be3858cec2
5 changed files with 14 additions and 14 deletions

View File

@ -294,7 +294,7 @@ public:
*
* @param[in] whitelist pointer to the whitelist filled with entries based on bonding information
*/
virtual void whitelistFromBondTable(::Gap::Whitelist_t* whitelist) {
virtual void whitelistFromBondTable(::ble::whitelist_t* whitelist) {
(void)whitelist;
}
@ -516,7 +516,7 @@ public:
*
* @retval BLE_ERROR_NONE On success, else an error code indicating reason for failure
*/
ble_error_t generateWhitelistFromBondTable(::Gap::Whitelist_t *whitelist) const;
ble_error_t generateWhitelistFromBondTable(::ble::whitelist_t *whitelist) const;
////////////////////////////////////////////////////////////////////////////
// Pairing
@ -884,7 +884,7 @@ protected:
ble_error_t purgeAllBondingState_(void);
ble_error_t generateWhitelistFromBondTable_(
::Gap::Whitelist_t *whitelist
::ble::whitelist_t *whitelist
) const;
ble_error_t requestPairing_(

View File

@ -80,11 +80,11 @@ class GenericGap :
using LegacyGap::state;
typedef typename BLEProtocol::AddressBytes_t Address_t;
typedef typename ble::whitelist_t whitelist_t;
typedef typename LegacyGap::PeerAddressType_t PeerAddressType_t;
typedef typename LegacyGap::ConnectionParams_t ConnectionParams_t;
typedef typename LegacyGap::Handle_t Handle_t;
typedef typename LegacyGap::CodedSymbolPerBit_t CodedSymbolPerBit_t;
typedef typename LegacyGap::Whitelist_t Whitelist_t;
typedef typename LegacyGap::DisconnectionReason_t DisconnectionReason_t;
typedef typename LegacyGap::AdvertisingPolicyMode_t AdvertisingPolicyMode_t;
typedef typename LegacyGap::ScanningPolicyMode_t ScanningPolicyMode_t;
@ -492,12 +492,12 @@ public:
/**
* @see Gap::getWhitelist
*/
ble_error_t getWhitelist_(Whitelist_t &whitelist) const;
ble_error_t getWhitelist_(whitelist_t &whitelist) const;
/**
* @see Gap::setWhitelist
*/
ble_error_t setWhitelist_(const Whitelist_t &whitelist);
ble_error_t setWhitelist_(const whitelist_t &whitelist);
/**
* @see Gap::setAdvertisingPolicyMode
@ -756,7 +756,7 @@ private:
pal::initiator_policy_t _initiator_policy_mode;
pal::scanning_filter_policy_t _scanning_filter_policy;
pal::advertising_filter_policy_t _advertising_filter_policy;
mutable Whitelist_t _whitelist;
mutable whitelist_t _whitelist;
bool _privacy_enabled;
PeripheralPrivacyConfiguration_t _peripheral_privacy_configuration;

View File

@ -101,7 +101,7 @@ public:
ble_error_t purgeAllBondingState_();
ble_error_t generateWhitelistFromBondTable_(
::Gap::Whitelist_t *whitelist
::ble::whitelist_t *whitelist
) const;
////////////////////////////////////////////////////////////////////////////

View File

@ -123,7 +123,7 @@ public:
SecurityEntryIdentityDbCb_t;
typedef mbed::Callback<void(Span<SecurityEntryIdentity_t>&, size_t count)>
IdentitylistDbCb_t;
typedef mbed::Callback<void(::Gap::Whitelist_t*)>
typedef mbed::Callback<void(::ble::whitelist_t*)>
WhitelistDbCb_t;
SecurityDb() : _local_sign_counter(0) { };
@ -567,7 +567,7 @@ public:
*/
virtual void get_whitelist(
WhitelistDbCb_t cb,
::Gap::Whitelist_t *whitelist
::ble::whitelist_t *whitelist
) {
/*TODO: fill whitelist*/
cb(whitelist);
@ -582,7 +582,7 @@ public:
*/
virtual void generate_whitelist_from_bond_table(
WhitelistDbCb_t cb,
::Gap::Whitelist_t *whitelist
::ble::whitelist_t *whitelist
) {
for (size_t i = 0; i < get_entry_count() && whitelist->size < whitelist->capacity; i++) {
entry_handle_t db_handle = get_entry_handle_by_index(i);
@ -620,7 +620,7 @@ public:
*
* @param[in] whitelist
*/
virtual void set_whitelist(const ::Gap::Whitelist_t &whitelist) { };
virtual void set_whitelist(const ::ble::whitelist_t &whitelist) { };
/**
* Add a new entry to the whitelist in the NVM.

View File

@ -71,7 +71,7 @@ ble_error_t SecurityManager<Impl>::purgeAllBondingState(void) {
template <class Impl>
ble_error_t SecurityManager<Impl>::generateWhitelistFromBondTable(
::Gap::Whitelist_t *whitelist
::ble::whitelist_t *whitelist
) const {
return impl()->generateWhitelistFromBondTable_(whitelist);
}
@ -278,7 +278,7 @@ ble_error_t SecurityManager<Impl>::purgeAllBondingState_(void) {
template <class Impl>
ble_error_t SecurityManager<Impl>::generateWhitelistFromBondTable_(
::Gap::Whitelist_t *whitelist
::ble::whitelist_t *whitelist
) const {
return BLE_ERROR_NOT_IMPLEMENTED;
}