Skip to content

Commit

Permalink
white space diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit Grover committed Dec 16, 2015
1 parent 8b513a7 commit 022c37c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 20 deletions.
4 changes: 2 additions & 2 deletions ble/Gap.h
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ class Gap {
virtual ble_error_t reset(void) {
/* Clear Gap state */
state.advertising = 0;
state.connected = 0;
state.connected = 0;

/* Clear scanning state */
scanningActive = false;
Expand All @@ -1024,7 +1024,7 @@ class Gap {
connectionCallChain.clear();
disconnectionCallChain.clear();
radioNotificationCallback = NULL;
onAdvertisementReport = NULL;
onAdvertisementReport = NULL;

return BLE_ERROR_NONE;
}
Expand Down
21 changes: 10 additions & 11 deletions ble/GattServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@

class GattServer {
public:

/* Event callback handlers. */
typedef FunctionPointerWithContext<unsigned> DataSentCallback_t;
typedef CallChainOfFunctionPointersWithContext<unsigned> DataSentCallbackChain_t;

typedef FunctionPointerWithContext<const GattWriteCallbackParams*> DataWrittenCallback_t;
typedef CallChainOfFunctionPointersWithContext<const GattWriteCallbackParams*> DataWrittenCallbackChain_t;
typedef CallChainOfFunctionPointersWithContext<const GattWriteCallbackParams*> DataWrittenCallbackChain_t;

typedef FunctionPointerWithContext<const GattReadCallbackParams*> DataReadCallback_t;
typedef CallChainOfFunctionPointersWithContext<const GattReadCallbackParams *> DataReadCallbackChain_t;
Expand Down Expand Up @@ -254,9 +253,9 @@ class GattServer {
}

/**
* @brief get the callback chain called when the event DATA_EVENT is triggered.
* @brief get the callback chain called when the event DATA_EVENT is triggered.
*/
DataSentCallbackChain_t& onDataSent() {
DataSentCallbackChain_t& onDataSent() {
return dataSentCallChain;
}

Expand All @@ -274,7 +273,7 @@ class GattServer {
*
* @Note: It is also possible to set up a callback into a member function of
* some object.
*
*
* @Note It is possible to unregister a callback using onDataWritten().detach(callback)
*/
void onDataWritten(const DataWrittenCallback_t& callback) {dataWrittenCallChain.add(callback);}
Expand All @@ -286,9 +285,9 @@ class GattServer {
/**
* @brief provide access to the callchain of data written event callbacks
* It is possible to register callbacks using onDataWritten().add(callback);
* It is possible to unregister callbacks using onDataWritten().detach(callback)
* It is possible to unregister callbacks using onDataWritten().detach(callback)
* @return The data written event callbacks chain
*/
*/
DataWrittenCallbackChain_t& onDataWritten() {
return dataWrittenCallChain;
}
Expand Down Expand Up @@ -335,7 +334,7 @@ class GattServer {
/**
* @brief provide access to the callchain of data read event callbacks
* It is possible to register callbacks using onDataRead().add(callback);
* It is possible to unregister callbacks using onDataRead().detach(callback)
* It is possible to unregister callbacks using onDataRead().detach(callback)
* @return The data read event callbacks chain
*/
DataReadCallbackChain_t& onDataRead() {
Expand Down Expand Up @@ -409,14 +408,14 @@ class GattServer {
* @return BLE_ERROR_NONE on success.
*/
virtual ble_error_t reset(void) {
serviceCount = 0;
serviceCount = 0;
characteristicCount = 0;

dataSentCallChain.clear();
dataWrittenCallChain.clear();
dataReadCallChain.clear();
updatesEnabledCallback = NULL;
updatesDisabledCallback = NULL;
updatesEnabledCallback = NULL;
updatesDisabledCallback = NULL;
confirmationReceivedCallback = NULL;

return BLE_ERROR_NONE;
Expand Down
6 changes: 3 additions & 3 deletions ble/SecurityManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ class SecurityManager {
virtual ble_error_t reset(void) {
securitySetupInitiatedCallback = NULL;
securitySetupCompletedCallback = NULL;
linkSecuredCallback = NULL;
securityContextStoredCallback = NULL;
passkeyDisplayCallback = NULL;
linkSecuredCallback = NULL;
securityContextStoredCallback = NULL;
passkeyDisplayCallback = NULL;

return BLE_ERROR_NONE;
}
Expand Down
8 changes: 4 additions & 4 deletions ble/ServiceDiscovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ class ServiceDiscovery {
* @return BLE_ERROR_NONE on success.
*/
virtual ble_error_t reset(void) {
connHandle = 0;
matchingServiceUUID = UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN);
serviceCallback = NULL;
connHandle = 0;
matchingServiceUUID = UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN);
serviceCallback = NULL;
matchingCharacteristicUUID = UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN);
characteristicCallback = NULL;
characteristicCallback = NULL;

return BLE_ERROR_NONE;
}
Expand Down

0 comments on commit 022c37c

Please sign in to comment.