some more renaming around securitySetup

This commit is contained in:
Rohit Grover 2015-05-08 12:10:42 +01:00
parent 689848a5dd
commit 968ac2aa6f
2 changed files with 17 additions and 17 deletions

View file

@ -331,15 +331,15 @@ public:
void onRadioNotification(Gap::RadioNotificationEventCallback_t callback);
/**
* Setup a callback for when the security procedure for a link has started.
* Setup a callback for when the security setup procedure (key generation
*/
void onSecurityProcedureInitiated(Gap::SecuritySetupInitiatedCallback_t callback);
void onSecuritySetupInitiated(Gap::SecuritySetupInitiatedCallback_t callback);
/**
* Setup a callback for when the security procedure for a link has
* completed.
*/
void onSecurityProcedureCompleted(Gap::SecuritySetupCompletedCallback_t callback);
void onSecuritySetupCompleted(Gap::SecuritySetupCompletedCallback_t callback);
/**
* Setup a callback for when a link with the peer is secured. For bonded
@ -768,15 +768,15 @@ BLEDevice::onRadioNotification(Gap::RadioNotificationEventCallback_t callback)
}
inline void
BLEDevice::onSecurityProcedureInitiated(Gap::SecuritySetupInitiatedCallback_t callback)
BLEDevice::onSecuritySetupInitiated(Gap::SecuritySetupInitiatedCallback_t callback)
{
transport->getGap().setOnSecurityProcedureInitiated(callback);
transport->getGap().setOnSecuritySetupInitiated(callback);
}
inline void
BLEDevice::onSecurityProcedureCompleted(Gap::SecuritySetupCompletedCallback_t callback)
BLEDevice::onSecuritySetupCompleted(Gap::SecuritySetupCompletedCallback_t callback)
{
transport->getGap().setOnSecurityProcedureCompleted(callback);
transport->getGap().setOnSecuritySetupCompleted(callback);
}
inline void

View file

@ -186,12 +186,12 @@ protected:
/**
* To indicate that security procedure for link has started.
*/
virtual void setOnSecurityProcedureInitiated(SecuritySetupInitiatedCallback_t callback) {onSecurityProcedureInitiated = callback;}
virtual void setOnSecuritySetupInitiated(SecuritySetupInitiatedCallback_t callback) {onSecuritySetupInitiated = callback;}
/**
* To indicate that security procedure for link has completed.
*/
virtual void setOnSecurityProcedureCompleted(SecuritySetupCompletedCallback_t callback) {onSecurityProcedureCompleted = callback;}
virtual void setOnSecuritySetupCompleted(SecuritySetupCompletedCallback_t callback) {onSecuritySetupCompleted = callback;}
/**
* To indicate that link with the peer is secured. For bonded devices,
@ -233,8 +233,8 @@ protected:
onConnection(NULL),
onDisconnection(NULL),
onRadioNotification(),
onSecurityProcedureInitiated(),
onSecurityProcedureCompleted(),
onSecuritySetupInitiated(),
onSecuritySetupCompleted(),
onLinkSecured(),
onSecurityContextStored(),
disconnectionCallChain() {
@ -258,14 +258,14 @@ public:
}
void processSecuritySetupInitiatedEvent(Handle_t handle, bool allowBonding, bool requireMITM, SecurityIOCapabilities_t iocaps) {
if (onSecurityProcedureInitiated) {
onSecurityProcedureInitiated(handle, allowBonding, requireMITM, iocaps);
if (onSecuritySetupInitiated) {
onSecuritySetupInitiated(handle, allowBonding, requireMITM, iocaps);
}
}
void processSecuritySetupCompletedEvent(Handle_t handle, SecurityCompletionStatus_t status) {
if (onSecurityProcedureCompleted) {
onSecurityProcedureCompleted(handle, status);
if (onSecuritySetupCompleted) {
onSecuritySetupCompleted(handle, status);
}
}
@ -302,8 +302,8 @@ protected:
ConnectionEventCallback_t onConnection;
DisconnectionEventCallback_t onDisconnection;
RadioNotificationEventCallback_t onRadioNotification;
SecuritySetupInitiatedCallback_t onSecurityProcedureInitiated;
SecuritySetupCompletedCallback_t onSecurityProcedureCompleted;
SecuritySetupInitiatedCallback_t onSecuritySetupInitiated;
SecuritySetupCompletedCallback_t onSecuritySetupCompleted;
LinkSecuredCallback_t onLinkSecured;
HandleSpecificEvent_t onSecurityContextStored;
CallChain disconnectionCallChain;