mirror of https://github.com/ARMmbed/mbed-os.git
removed duplicate event handler, removed redundant using statements
parent
2c1fcc7235
commit
581b5755b8
|
@ -25,13 +25,7 @@
|
||||||
namespace ble {
|
namespace ble {
|
||||||
namespace generic {
|
namespace generic {
|
||||||
|
|
||||||
using ble::address_t;
|
using pal::connection_peer_address_type_t;
|
||||||
using ble::irk_t;
|
|
||||||
using ble::csrk_t;
|
|
||||||
using ble::ltk_t;
|
|
||||||
using ble::ediv_t;
|
|
||||||
using ble::rand_t;
|
|
||||||
using ble::pal::connection_peer_address_type_t;
|
|
||||||
|
|
||||||
/* separate structs for keys to allow db implementation
|
/* separate structs for keys to allow db implementation
|
||||||
* to minimise memory usage, only holding live connection
|
* to minimise memory usage, only holding live connection
|
||||||
|
|
|
@ -26,27 +26,17 @@
|
||||||
namespace ble {
|
namespace ble {
|
||||||
namespace generic {
|
namespace generic {
|
||||||
|
|
||||||
using ble::pal::advertising_peer_address_type_t;
|
using pal::advertising_peer_address_type_t;
|
||||||
using ble::pal::AuthenticationMask;
|
using pal::AuthenticationMask;
|
||||||
using ble::pal::KeyDistribution;
|
using pal::KeyDistribution;
|
||||||
using ble::pal::connection_peer_address_type_t;
|
using pal::connection_peer_address_type_t;
|
||||||
|
|
||||||
using ble::address_t;
|
|
||||||
using ble::irk_t;
|
|
||||||
using ble::csrk_t;
|
|
||||||
using ble::ltk_t;
|
|
||||||
using ble::ediv_t;
|
|
||||||
using ble::rand_t;
|
|
||||||
using ble::pairing_failure_t;
|
|
||||||
using ble::PasskeyAscii;
|
|
||||||
using ble::passkey_num_t;
|
|
||||||
|
|
||||||
typedef SecurityManager::SecurityIOCapabilities_t SecurityIOCapabilities_t;
|
typedef SecurityManager::SecurityIOCapabilities_t SecurityIOCapabilities_t;
|
||||||
|
|
||||||
class GenericSecurityManagerEventHandler;
|
class GenericSecurityManagerEventHandler;
|
||||||
|
|
||||||
class GenericSecurityManager : public SecurityManager,
|
class GenericSecurityManager : public SecurityManager,
|
||||||
public ble::pal::SecurityManagerEventHandler {
|
public pal::SecurityManagerEventHandler {
|
||||||
public:
|
public:
|
||||||
/* implements SecurityManager */
|
/* implements SecurityManager */
|
||||||
|
|
||||||
|
@ -251,7 +241,6 @@ protected:
|
||||||
_legacy_pairing_allowed(true),
|
_legacy_pairing_allowed(true),
|
||||||
_master_sends_keys(false),
|
_master_sends_keys(false),
|
||||||
_public_keys_generated(false) {
|
_public_keys_generated(false) {
|
||||||
_app_event_handler = &defaultEventHandler;
|
|
||||||
_pal.set_event_handler(this);
|
_pal.set_event_handler(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -650,10 +639,6 @@ public:
|
||||||
);
|
);
|
||||||
|
|
||||||
/* end implements ble::pal::SecurityManagerEventHandler */
|
/* end implements ble::pal::SecurityManagerEventHandler */
|
||||||
|
|
||||||
private:
|
|
||||||
/* handler is always a valid pointer */
|
|
||||||
::SecurityManager::SecurityManagerEventHandler *_app_event_handler;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -348,7 +348,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void on_keypress_notification(
|
virtual void on_keypress_notification(
|
||||||
connection_handle_t connection,
|
connection_handle_t connection,
|
||||||
SecurityManager::Keypress_t keypress
|
Keypress_t keypress
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -659,7 +659,7 @@ void GenericSecurityManager::generate_secure_connections_oob(
|
||||||
confirm
|
confirm
|
||||||
);
|
);
|
||||||
|
|
||||||
_app_event_handler->oobGenerated(
|
eventHandler->oobGenerated(
|
||||||
&entry->local_address,
|
&entry->local_address,
|
||||||
&random,
|
&random,
|
||||||
&confirm
|
&confirm
|
||||||
|
|
Loading…
Reference in New Issue