mirror of https://github.com/ARMmbed/mbed-os.git
BLE - Small reordering to reduce diff.
parent
9e5e23aad6
commit
632851e5ae
|
|
@ -212,6 +212,21 @@ public:
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set if the whitelist should be used to find the peer.
|
||||||
|
*
|
||||||
|
* @param filterPolicy The initiator filter to apply.
|
||||||
|
*
|
||||||
|
* @return A reference to this.
|
||||||
|
*/
|
||||||
|
ConnectionParameters &setFilter(initiator_filter_policy_t filterPolicy)
|
||||||
|
{
|
||||||
|
#if BLE_FEATURE_WHITELIST
|
||||||
|
_filterPolicy = filterPolicy;
|
||||||
|
#endif // BLE_FEATURE_WHITELIST
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable or disable PHYs.
|
* Enable or disable PHYs.
|
||||||
*
|
*
|
||||||
|
|
@ -273,6 +288,20 @@ public:
|
||||||
return _ownAddressType;
|
return _ownAddressType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the initiator policy.
|
||||||
|
*
|
||||||
|
* @return The initiator policy.
|
||||||
|
*/
|
||||||
|
initiator_filter_policy_t getFilter() const
|
||||||
|
{
|
||||||
|
#if BLE_FEATURE_WHITELIST
|
||||||
|
return _filterPolicy;
|
||||||
|
#else
|
||||||
|
return initiator_filter_policy_t::NO_FILTER;
|
||||||
|
#endif // BLE_FEATURE_WHITELIST
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the number of PHY enabled.
|
* Return the number of PHY enabled.
|
||||||
* @return The number of PHY enabled.
|
* @return The number of PHY enabled.
|
||||||
|
|
@ -288,35 +317,6 @@ public:
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set if the whitelist should be used to find the peer.
|
|
||||||
*
|
|
||||||
* @param filterPolicy The initiator filter to apply.
|
|
||||||
*
|
|
||||||
* @return A reference to this.
|
|
||||||
*/
|
|
||||||
ConnectionParameters &setFilter(initiator_filter_policy_t filterPolicy)
|
|
||||||
{
|
|
||||||
#if BLE_FEATURE_WHITELIST
|
|
||||||
_filterPolicy = filterPolicy;
|
|
||||||
#endif // BLE_FEATURE_WHITELIST
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the initiator policy.
|
|
||||||
*
|
|
||||||
* @return The initiator policy.
|
|
||||||
*/
|
|
||||||
initiator_filter_policy_t getFilter() const
|
|
||||||
{
|
|
||||||
#if BLE_FEATURE_WHITELIST
|
|
||||||
return _filterPolicy;
|
|
||||||
#else
|
|
||||||
return initiator_filter_policy_t::NO_FILTER;
|
|
||||||
#endif // BLE_FEATURE_WHITELIST
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !defined(DOXYGEN_ONLY)
|
#if !defined(DOXYGEN_ONLY)
|
||||||
|
|
||||||
phy_set_t getPhySet() const
|
phy_set_t getPhySet() const
|
||||||
|
|
|
||||||
|
|
@ -545,11 +545,7 @@ public:
|
||||||
advertising_peer_address_type_t peer_identity_address_type,
|
advertising_peer_address_type_t peer_identity_address_type,
|
||||||
const address_t &peer_identity_address
|
const address_t &peer_identity_address
|
||||||
) {
|
) {
|
||||||
impl()->on_keys_distributed_bdaddr_(
|
impl()->on_keys_distributed_bdaddr_(connection, peer_identity_address_type, peer_identity_address);
|
||||||
connection,
|
|
||||||
peer_identity_address_type,
|
|
||||||
peer_identity_address
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -562,7 +558,7 @@ public:
|
||||||
connection_handle_t connection,
|
connection_handle_t connection,
|
||||||
const csrk_t &csrk
|
const csrk_t &csrk
|
||||||
) {
|
) {
|
||||||
impl()->on_keys_distributed_csrk(connection, csrk);
|
impl()->on_keys_distributed_csrk_(connection, csrk);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1184,13 +1184,6 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
|
||||||
return BLE_ERROR_NONE;
|
return BLE_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
|
||||||
typename GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::LegacyGap::AdvertisingPolicyMode_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::getAdvertisingPolicyMode_(void) const
|
|
||||||
{
|
|
||||||
useVersionOneAPI();
|
|
||||||
return (AdvertisingPolicyMode_t) _advertising_filter_policy.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
||||||
ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::setScanningPolicyMode_(ScanningPolicyMode_t mode)
|
ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::setScanningPolicyMode_(ScanningPolicyMode_t mode)
|
||||||
{
|
{
|
||||||
|
|
@ -1204,13 +1197,6 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
|
||||||
return BLE_ERROR_NONE;
|
return BLE_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
|
||||||
typename GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::LegacyGap::ScanningPolicyMode_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::getScanningPolicyMode_(void) const
|
|
||||||
{
|
|
||||||
useVersionOneAPI();
|
|
||||||
return (ScanningPolicyMode_t) _scanning_filter_policy.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
||||||
ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::setInitiatorPolicyMode_(InitiatorPolicyMode_t mode)
|
ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::setInitiatorPolicyMode_(InitiatorPolicyMode_t mode)
|
||||||
{
|
{
|
||||||
|
|
@ -1224,6 +1210,20 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
|
||||||
return BLE_ERROR_NONE;
|
return BLE_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
||||||
|
typename GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::LegacyGap::AdvertisingPolicyMode_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::getAdvertisingPolicyMode_(void) const
|
||||||
|
{
|
||||||
|
useVersionOneAPI();
|
||||||
|
return (AdvertisingPolicyMode_t) _advertising_filter_policy.value();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
||||||
|
typename GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::LegacyGap::ScanningPolicyMode_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::getScanningPolicyMode_(void) const
|
||||||
|
{
|
||||||
|
useVersionOneAPI();
|
||||||
|
return (ScanningPolicyMode_t) _scanning_filter_policy.value();
|
||||||
|
}
|
||||||
|
|
||||||
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
|
||||||
typename GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::LegacyGap::InitiatorPolicyMode_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::getInitiatorPolicyMode_(void) const
|
typename GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::LegacyGap::InitiatorPolicyMode_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::getInitiatorPolicyMode_(void) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -183,6 +183,7 @@ public:
|
||||||
_signing_event_handler = signing_event_handler;
|
_signing_event_handler = signing_event_handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static uint16_t compute_attributes_count(GattService& service);
|
static uint16_t compute_attributes_count(GattService& service);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,6 @@ private:
|
||||||
PrivacyControlBlock* _pending_privacy_control_blocks;
|
PrivacyControlBlock* _pending_privacy_control_blocks;
|
||||||
bool _processing_privacy_control_block;
|
bool _processing_privacy_control_block;
|
||||||
irk_t _irk;
|
irk_t _irk;
|
||||||
|
|
||||||
csrk_t _csrk;
|
csrk_t _csrk;
|
||||||
csrk_t* _peer_csrks[DM_CONN_MAX];
|
csrk_t* _peer_csrks[DM_CONN_MAX];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue