minor white space diffs

This commit is contained in:
Rohit Grover 2014-11-21 08:03:21 +00:00
parent 4234515948
commit d0dbe29f35
2 changed files with 10 additions and 36 deletions

View file

@ -21,15 +21,7 @@
#include "GapAdvertisingParams.h"
#include "GapEvents.h"
/**************************************************************************/
/*!
\brief
The base class used to abstract GAP functionality to a specific radio
transceiver, SOC or BLE Stack.
*/
/**************************************************************************/
class Gap
{
class Gap {
public:
typedef enum addr_type_e {
ADDR_TYPE_PUBLIC = 0,
@ -42,7 +34,7 @@ public:
typedef uint8_t address_t[ADDR_LEN];
/**
* enumeration for disconnection reasons. The values for these reasons are
* Enumeration for disconnection reasons. The values for these reasons are
* derived from Nordic's implementation; but the reasons are meant to be
* independent of the transport. If you are returned a reason which is not
* covered by this enumeration, then please refer to the underlying
@ -146,7 +138,7 @@ private:
DisconnectionEventCallback_t onDisconnection;
private:
/* disallow copy and assginment */
/* disallow copy and assignment */
Gap(const Gap &);
Gap& operator=(const Gap &);
};

View file

@ -22,15 +22,7 @@
#include "GattCharacteristicWriteCBParams.h"
#include "CallChainOfFunctionPointersWithContext.h"
/**************************************************************************/
/*!
\brief
The base class used to abstract GATT Server functionality to a specific
radio transceiver, SOC or BLE Stack.
*/
/**************************************************************************/
class GattServer
{
class GattServer {
public:
/* Event callback handlers. */
typedef void (*EventCallback_t)(uint16_t attributeHandle);
@ -55,25 +47,15 @@ private:
// be sure to call sd_ble_gatts_hvx() twice with notify then indicate!
// Strange use case, but valid and must be covered!
void setOnDataSent(ServerEventCallbackWithCount_t callback) {
onDataSent = callback;
}
void setOnDataWritten(void (*callback)(const GattCharacteristicWriteCBParams *eventDataP)) {
onDataWritten.add(callback);
}
void setOnDataSent(ServerEventCallbackWithCount_t callback) {onDataSent = callback;}
void setOnDataWritten(void (*callback)(const GattCharacteristicWriteCBParams *eventDataP)) {onDataWritten.add(callback);}
template <typename T>
void setOnDataWritten(T *objPtr, void (T::*memberPtr)(const GattCharacteristicWriteCBParams *context)) {
onDataWritten.add(objPtr, memberPtr);
}
void setOnUpdatesEnabled(EventCallback_t callback) {
onUpdatesEnabled = callback;
}
void setOnUpdatesDisabled(EventCallback_t callback) {
onUpdatesDisabled = callback;
}
void setOnConfirmationReceived(EventCallback_t callback) {
onConfirmationReceived = callback;
}
void setOnUpdatesEnabled(EventCallback_t callback) {onUpdatesEnabled = callback;}
void setOnUpdatesDisabled(EventCallback_t callback) {onUpdatesDisabled = callback;}
void setOnConfirmationReceived(EventCallback_t callback) {onConfirmationReceived = callback;}
protected:
void handleDataWrittenEvent(const GattCharacteristicWriteCBParams *params) {
@ -120,7 +102,7 @@ private:
EventCallback_t onConfirmationReceived;
private:
/* disallow copy and assginment */
/* disallow copy and assignment */
GattServer(const GattServer &);
GattServer& operator=(const GattServer &);
};