@@ -340,13 +340,13 @@ Gap::Gap(
340
340
ble::PalGap &pal_gap,
341
341
ble::PalGenericAccessService &generic_access_service
342
342
#if BLE_FEATURE_PRIVACY
343
- , ble::PrivateAddressController &pal_addr_reg
343
+ , ble::PrivateAddressController &private_address_controller
344
344
#endif // BLE_FEATURE_PRIVACY
345
345
) : _event_queue(event_queue),
346
346
_pal_gap (pal_gap),
347
347
_gap_service(generic_access_service),
348
348
#if BLE_FEATURE_PRIVACY
349
- _address_registry (pal_addr_reg ),
349
+ _private_address_controller (private_address_controller ),
350
350
#endif // BLE_FEATURE_PRIVACY
351
351
_address_type (own_address_type_t ::PUBLIC),
352
352
_initiator_policy_mode(initiator_policy_t ::NO_FILTER),
@@ -378,7 +378,7 @@ Gap::Gap(
378
378
379
379
_pal_gap.set_event_handler (this );
380
380
#if BLE_FEATURE_PRIVACY
381
- _address_registry .set_event_handler (this );
381
+ _private_address_controller .set_event_handler (this );
382
382
#endif // BLE_FEATURE_PRIVACY
383
383
}
384
384
@@ -973,9 +973,9 @@ ble_error_t Gap::enablePrivacy(bool enable)
973
973
_privacy_enabled = enable;
974
974
975
975
if (_privacy_enabled) {
976
- _address_registry .start_private_address_generation ();
977
- if (_address_registry .get_non_resolvable_private_address () != address_t {} &&
978
- _address_registry .get_resolvable_private_address () != address_t {}
976
+ _private_address_controller .start_private_address_generation ();
977
+ if (_private_address_controller .get_non_resolvable_private_address () != address_t {} &&
978
+ _private_address_controller .get_resolvable_private_address () != address_t {}
979
979
) {
980
980
_event_queue.post ([this ] {
981
981
if (_event_handler) {
@@ -986,12 +986,12 @@ ble_error_t Gap::enablePrivacy(bool enable)
986
986
_privacy_initialization_pending = true ;
987
987
}
988
988
} else {
989
- _address_registry .stop_private_address_generation ();
989
+ _private_address_controller .stop_private_address_generation ();
990
990
_privacy_initialization_pending = false ;
991
991
}
992
992
993
993
#if !BLE_GAP_HOST_BASED_PRIVATE_ADDRESS_RESOLUTION
994
- if (_address_registry .is_controller_privacy_supported ()) {
994
+ if (_private_address_controller .is_controller_privacy_supported ()) {
995
995
update_ll_address_resolution_setting ();
996
996
}
997
997
#endif // !BLE_GAP_HOST_BASED_PRIVATE_ADDRESS_RESOLUTION
@@ -1010,7 +1010,7 @@ ble_error_t Gap::setPeripheralPrivacyConfiguration(
1010
1010
_peripheral_privacy_configuration = *configuration;
1011
1011
1012
1012
#if !BLE_GAP_HOST_BASED_PRIVATE_ADDRESS_RESOLUTION
1013
- if (_address_registry .is_controller_privacy_supported ()) {
1013
+ if (_private_address_controller .is_controller_privacy_supported ()) {
1014
1014
update_ll_address_resolution_setting ();
1015
1015
}
1016
1016
#endif // !BLE_GAP_HOST_BASED_PRIVATE_ADDRESS_RESOLUTION
@@ -1038,7 +1038,7 @@ ble_error_t Gap::setCentralPrivacyConfiguration(
1038
1038
_central_privacy_configuration = *configuration;
1039
1039
1040
1040
#if !BLE_GAP_HOST_BASED_PRIVATE_ADDRESS_RESOLUTION
1041
- if (_address_registry .is_controller_privacy_supported ()) {
1041
+ if (_private_address_controller .is_controller_privacy_supported ()) {
1042
1042
update_ll_address_resolution_setting ();
1043
1043
}
1044
1044
#endif // !BLE_GAP_HOST_BASED_PRIVATE_ADDRESS_RESOLUTION
@@ -1589,7 +1589,7 @@ ble_error_t Gap::update_ll_address_resolution_setting()
1589
1589
#endif // BLE_ROLE_OBSERVER
1590
1590
}
1591
1591
1592
- return _address_registry .enable_controller_address_resolution (enable);
1592
+ return _private_address_controller .enable_controller_address_resolution (enable);
1593
1593
}
1594
1594
#endif // BLE_FEATURE_PRIVACY && !BLE_GAP_HOST_BASED_PRIVATE_ADDRESS_RESOLUTION
1595
1595
@@ -2451,7 +2451,7 @@ void Gap::signal_connection_complete(
2451
2451
2452
2452
/* first try to resolve synchronously in cache */
2453
2453
if (!address_resolved) {
2454
- address_resolved = _address_registry .resolve_address_in_host_cache (
2454
+ address_resolved = _private_address_controller .resolve_address_in_host_cache (
2455
2455
event.getPeerAddress (),
2456
2456
&peer_address_type,
2457
2457
&peer_address
@@ -2476,7 +2476,7 @@ void Gap::signal_connection_complete(
2476
2476
_event_handler->onConnectionComplete (event);
2477
2477
} else {
2478
2478
bool resolution_pending = false ;
2479
- ble_error_t ret = _address_registry .queue_resolve_address_on_host (event.getPeerAddress ());
2479
+ ble_error_t ret = _private_address_controller .queue_resolve_address_on_host (event.getPeerAddress ());
2480
2480
2481
2481
if (ret == BLE_ERROR_NONE) {
2482
2482
ConnectionCompleteEvent* event_copy = new (std::nothrow) ConnectionCompleteEvent (event);
@@ -2532,7 +2532,7 @@ bool Gap::apply_peripheral_privacy_connection_policy(
2532
2532
switch (_peripheral_privacy_configuration.resolution_strategy ) {
2533
2533
case peripheral_privacy_configuration_t ::REJECT_NON_RESOLVED_ADDRESS:
2534
2534
/* if there is no bond then allow unresolved addresses */
2535
- if (_address_registry .read_resolving_list_size () == 0 ) {
2535
+ if (_private_address_controller .read_resolving_list_size () == 0 ) {
2536
2536
return true ;
2537
2537
}
2538
2538
_pal_gap.disconnect (
@@ -2576,7 +2576,7 @@ void Gap::conclude_signal_connection_complete_after_address_resolution(
2576
2576
if (identity_address) {
2577
2577
/* move old address to resolvable address */
2578
2578
event.setPeerResolvablePrivateAddress (event.getPeerAddress ());
2579
- event.setLocalResolvablePrivateAddress (_address_registry .get_resolvable_private_address ());
2579
+ event.setLocalResolvablePrivateAddress (_private_address_controller .get_resolvable_private_address ());
2580
2580
2581
2581
event.setPeerAddress (*identity_address);
2582
2582
event.setPeerAddressType (identity_address_type == target_peer_address_type_t ::RANDOM ?
@@ -2616,7 +2616,7 @@ void Gap::signal_advertising_report(
2616
2616
const address_t *peer_address = nullptr ;
2617
2617
target_peer_address_type_t peer_address_type (target_peer_address_type_t ::RANDOM);
2618
2618
2619
- address_resolved = _address_registry .resolve_address_in_host_cache (
2619
+ address_resolved = _private_address_controller .resolve_address_in_host_cache (
2620
2620
event.getPeerAddress (),
2621
2621
&peer_address_type,
2622
2622
&peer_address
@@ -2663,7 +2663,7 @@ void Gap::signal_advertising_report(
2663
2663
2664
2664
/* if there is already an item with the same address pending don't kick off resolution*/
2665
2665
if (!duplicate_pending_event) {
2666
- ret = _address_registry .queue_resolve_address_on_host (event.getPeerAddress ());
2666
+ ret = _private_address_controller .queue_resolve_address_on_host (event.getPeerAddress ());
2667
2667
}
2668
2668
2669
2669
if (ret == BLE_ERROR_NONE) {
@@ -2678,7 +2678,7 @@ void Gap::signal_advertising_report(
2678
2678
}
2679
2679
#else
2680
2680
/* filter out unresolved address if at least one bond exists */
2681
- if (_address_registry .read_resolving_list_size () > 0 &&
2681
+ if (_private_address_controller .read_resolving_list_size () > 0 &&
2682
2682
_central_privacy_configuration.resolution_strategy == central_privacy_configuration_t ::RESOLVE_AND_FILTER &&
2683
2683
event.getPeerAddressType () != peer_address_type_t ::PUBLIC &&
2684
2684
is_random_private_resolvable_address (event.getPeerAddress ())) {
@@ -2724,7 +2724,7 @@ void Gap::conclude_signal_advertising_report_after_address_resolution(
2724
2724
event.setPeerAddressType (peer_address_type);
2725
2725
} else if (_central_privacy_configuration.resolution_strategy ==
2726
2726
central_privacy_configuration_t ::RESOLVE_AND_FILTER &&
2727
- _address_registry .read_resolving_list_size () > 0 ) {
2727
+ _private_address_controller .read_resolving_list_size () > 0 ) {
2728
2728
/* filter out unresolved address if at least one bond exists */
2729
2729
return ;
2730
2730
}
@@ -3333,8 +3333,8 @@ void Gap::on_private_address_generated(bool connectable)
3333
3333
}
3334
3334
3335
3335
if (_privacy_initialization_pending &&
3336
- _address_registry .get_resolvable_private_address () != address_t {} &&
3337
- _address_registry .get_non_resolvable_private_address () != address_t {}
3336
+ _private_address_controller .get_resolvable_private_address () != address_t {} &&
3337
+ _private_address_controller .get_non_resolvable_private_address () != address_t {}
3338
3338
) {
3339
3339
_privacy_initialization_pending = false ;
3340
3340
if (_event_handler) {
@@ -3475,8 +3475,8 @@ const address_t *Gap::get_random_address(controller_operation_t operation, size_
3475
3475
}
3476
3476
3477
3477
#if BLE_FEATURE_PRIVACY
3478
- const auto &resolvable_address = _address_registry .get_resolvable_private_address ();
3479
- const auto &non_resolvable_address = _address_registry .get_non_resolvable_private_address ();
3478
+ const auto &resolvable_address = _private_address_controller .get_resolvable_private_address ();
3479
+ const auto &non_resolvable_address = _private_address_controller .get_non_resolvable_private_address ();
3480
3480
3481
3481
#if BLE_ROLE_OBSERVER
3482
3482
bool central_non_resolvable = _central_privacy_configuration.use_non_resolvable_random_address ;
0 commit comments