Skip to content

Commit 555158c

Browse files
committed
BLE: update to use whitelist_t from ble namespace
1 parent 2113125 commit 555158c

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

features/FEATURE_BLE/ble/SecurityManager.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ class SecurityManager {
312312
*
313313
* @param[in] whitelist pointer to the whitelist filled with entries based on bonding information
314314
*/
315-
virtual void whitelistFromBondTable(::Gap::Whitelist_t* whitelist) {
315+
virtual void whitelistFromBondTable(::ble::whitelist_t* whitelist) {
316316
(void)whitelist;
317317
}
318318

@@ -534,7 +534,7 @@ class SecurityManager {
534534
*
535535
* @retval BLE_ERROR_NONE On success, else an error code indicating reason for failure
536536
*/
537-
ble_error_t generateWhitelistFromBondTable(::Gap::Whitelist_t *whitelist) const;
537+
ble_error_t generateWhitelistFromBondTable(::ble::whitelist_t *whitelist) const;
538538

539539
////////////////////////////////////////////////////////////////////////////
540540
// Pairing
@@ -896,7 +896,7 @@ class SecurityManager {
896896
* @retval BLE_ERROR_INVALID_STATE If the API is called without module initialization or
897897
* application registration.
898898
*/
899-
ble_error_t getAddressesFromBondTable(::Gap::Whitelist_t &addresses) const;
899+
ble_error_t getAddressesFromBondTable(::ble::whitelist_t &addresses) const;
900900

901901
/**
902902
* @deprecated
@@ -1037,7 +1037,7 @@ class SecurityManager {
10371037
ble_error_t purgeAllBondingState_(void);
10381038

10391039
ble_error_t generateWhitelistFromBondTable_(
1040-
::Gap::Whitelist_t *whitelist
1040+
::ble::whitelist_t *whitelist
10411041
) const;
10421042

10431043
ble_error_t requestPairing_(
@@ -1136,7 +1136,7 @@ class SecurityManager {
11361136
bool authenticated
11371137
);
11381138

1139-
ble_error_t getAddressesFromBondTable_(::Gap::Whitelist_t &addresses) const;
1139+
ble_error_t getAddressesFromBondTable_(::ble::whitelist_t &addresses) const;
11401140

11411141
private:
11421142
/* Legacy compatibility with old callbacks (from both sides so any

features/FEATURE_BLE/ble/generic/GenericGap.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ class GenericGap :
8080
using LegacyGap::state;
8181

8282
typedef typename BLEProtocol::AddressBytes_t Address_t;
83+
typedef typename ble::whitelist_t whitelist_t;
8384
typedef typename LegacyGap::PeerAddressType_t PeerAddressType_t;
8485
typedef typename LegacyGap::ConnectionParams_t ConnectionParams_t;
8586
typedef typename LegacyGap::Handle_t Handle_t;
8687
typedef typename LegacyGap::CodedSymbolPerBit_t CodedSymbolPerBit_t;
87-
typedef typename LegacyGap::Whitelist_t Whitelist_t;
8888
typedef typename LegacyGap::DisconnectionReason_t DisconnectionReason_t;
8989
typedef typename LegacyGap::AdvertisingPolicyMode_t AdvertisingPolicyMode_t;
9090
typedef typename LegacyGap::ScanningPolicyMode_t ScanningPolicyMode_t;
@@ -492,12 +492,12 @@ class GenericGap :
492492
/**
493493
* @see Gap::getWhitelist
494494
*/
495-
ble_error_t getWhitelist_(Whitelist_t &whitelist) const;
495+
ble_error_t getWhitelist_(whitelist_t &whitelist) const;
496496

497497
/**
498498
* @see Gap::setWhitelist
499499
*/
500-
ble_error_t setWhitelist_(const Whitelist_t &whitelist);
500+
ble_error_t setWhitelist_(const whitelist_t &whitelist);
501501

502502
/**
503503
* @see Gap::setAdvertisingPolicyMode
@@ -756,7 +756,7 @@ class GenericGap :
756756
pal::initiator_policy_t _initiator_policy_mode;
757757
pal::scanning_filter_policy_t _scanning_filter_policy;
758758
pal::advertising_filter_policy_t _advertising_filter_policy;
759-
mutable Whitelist_t _whitelist;
759+
mutable whitelist_t _whitelist;
760760

761761
bool _privacy_enabled;
762762
PeripheralPrivacyConfiguration_t _peripheral_privacy_configuration;

features/FEATURE_BLE/ble/generic/GenericSecurityManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class GenericSecurityManager :
101101
ble_error_t purgeAllBondingState_();
102102

103103
ble_error_t generateWhitelistFromBondTable_(
104-
::Gap::Whitelist_t *whitelist
104+
::ble::whitelist_t *whitelist
105105
) const;
106106

107107
////////////////////////////////////////////////////////////////////////////

features/FEATURE_BLE/ble/generic/SecurityDb.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class SecurityDb {
123123
SecurityEntryIdentityDbCb_t;
124124
typedef mbed::Callback<void(Span<SecurityEntryIdentity_t>&, size_t count)>
125125
IdentitylistDbCb_t;
126-
typedef mbed::Callback<void(::Gap::Whitelist_t*)>
126+
typedef mbed::Callback<void(::ble::whitelist_t*)>
127127
WhitelistDbCb_t;
128128

129129
SecurityDb() : _local_sign_counter(0) { };
@@ -567,7 +567,7 @@ class SecurityDb {
567567
*/
568568
virtual void get_whitelist(
569569
WhitelistDbCb_t cb,
570-
::Gap::Whitelist_t *whitelist
570+
::ble::whitelist_t *whitelist
571571
) {
572572
/*TODO: fill whitelist*/
573573
cb(whitelist);
@@ -582,7 +582,7 @@ class SecurityDb {
582582
*/
583583
virtual void generate_whitelist_from_bond_table(
584584
WhitelistDbCb_t cb,
585-
::Gap::Whitelist_t *whitelist
585+
::ble::whitelist_t *whitelist
586586
) {
587587
for (size_t i = 0; i < get_entry_count() && whitelist->size < whitelist->capacity; i++) {
588588
entry_handle_t db_handle = get_entry_handle_by_index(i);
@@ -620,7 +620,7 @@ class SecurityDb {
620620
*
621621
* @param[in] whitelist
622622
*/
623-
virtual void set_whitelist(const ::Gap::Whitelist_t &whitelist) { };
623+
virtual void set_whitelist(const ::ble::whitelist_t &whitelist) { };
624624

625625
/**
626626
* Add a new entry to the whitelist in the NVM.

features/FEATURE_BLE/source/SecurityManager.tpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ble_error_t SecurityManager<Impl>::purgeAllBondingState(void) {
7171

7272
template <class Impl>
7373
ble_error_t SecurityManager<Impl>::generateWhitelistFromBondTable(
74-
::Gap::Whitelist_t *whitelist
74+
::ble::whitelist_t *whitelist
7575
) const {
7676
return impl()->generateWhitelistFromBondTable_(whitelist);
7777
}
@@ -249,14 +249,14 @@ ble_error_t SecurityManager<Impl>::getSigningKey(
249249

250250
template <class Impl>
251251
ble_error_t SecurityManager<Impl>::getAddressesFromBondTable(
252-
::Gap::Whitelist_t &addresses
252+
::ble::whitelist_t &addresses
253253
) const {
254254
return impl()->getAddressesFromBondTable_(addresses);
255255
}
256256

257257
template <class Impl>
258258
ble_error_t SecurityManager<Impl>::getAddressesFromBondTable_(
259-
::Gap::Whitelist_t &addresses
259+
::ble::whitelist_t &addresses
260260
) const {
261261
return BLE_ERROR_NOT_IMPLEMENTED;
262262
}
@@ -292,7 +292,7 @@ ble_error_t SecurityManager<Impl>::purgeAllBondingState_(void) {
292292

293293
template <class Impl>
294294
ble_error_t SecurityManager<Impl>::generateWhitelistFromBondTable_(
295-
::Gap::Whitelist_t *whitelist
295+
::ble::whitelist_t *whitelist
296296
) const {
297297
return BLE_ERROR_NOT_IMPLEMENTED;
298298
}

0 commit comments

Comments
 (0)