Compatible with Keewi v1

Fork of BLE_API by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
Rohit Grover
Date:
Fri Jun 06 14:14:46 2014 +0100
Parent:
74:301042c34cb8
Child:
76:103fac6e36d1
Commit message:
white space changes to move away from 80-column rule

Changed in this revision

GattCharacteristic.h Show annotated file Show diff for this revision Revisions of this file
GattService.h Show annotated file Show diff for this revision Revisions of this file
hw/BLEDevice.h Show annotated file Show diff for this revision Revisions of this file
hw/Gap.h Show annotated file Show diff for this revision Revisions of this file
hw/GattServer.h Show annotated file Show diff for this revision Revisions of this file
--- a/GattCharacteristic.h	Fri Jun 06 11:30:56 2014 +0100
+++ b/GattCharacteristic.h	Fri Jun 06 14:14:46 2014 +0100
@@ -302,14 +302,8 @@
         uint16_t gatt_nsdesc;       /**< Namespace description from Bluetooth Assigned Numbers, normally '0', see @ref BLE_GATT_CPF_NAMESPACES. */
     } presentation_format_t;
 
-    GattCharacteristic(ShortUUID_t uuid = 0,
-                       uint16_t minLen = 1,
-                       uint16_t maxLen = 1,
-                       uint8_t  properties = 0);
-    GattCharacteristic(const LongUUID_t longUUID,
-                       uint16_t minLen = 1,
-                       uint16_t maxLen = 1,
-                       uint8_t  properties = 0);
+    GattCharacteristic(ShortUUID_t uuid = 0, uint16_t minLen = 1, uint16_t maxLen = 1, uint8_t  properties = 0);
+    GattCharacteristic(const LongUUID_t longUUID, uint16_t minLen = 1, uint16_t maxLen = 1, uint8_t  properties = 0);
     virtual ~GattCharacteristic(void);
 
 public:
--- a/GattService.h	Fri Jun 06 11:30:56 2014 +0100
+++ b/GattService.h	Fri Jun 06 14:14:46 2014 +0100
@@ -37,7 +37,7 @@
     GattService(UUID uuid);
     virtual ~GattService(void);
 
-    ble_error_t         addCharacteristic(GattCharacteristic &);
+    ble_error_t addCharacteristic(GattCharacteristic &);
 
     enum {
         UUID_ALERT_NOTIFICATION_SERVICE     = 0x1811,
@@ -76,6 +76,7 @@
         if (index >= characteristicCount) {
             return NULL;
         }
+
         return characteristics[index];
     }
 
--- a/hw/BLEDevice.h	Fri Jun 06 11:30:56 2014 +0100
+++ b/hw/BLEDevice.h	Fri Jun 06 14:14:46 2014 +0100
@@ -152,11 +152,7 @@
     ble_error_t setAdvertisingDataForTransport(void);
 
 public:
-    BLEDevice() : transport(createBLEDeviceInstance()),
-                  advParams(),
-                  advPayload(),
-                  scanResponse(),
-                  needToUpdateAdvData(true) {
+    BLEDevice() : transport(createBLEDeviceInstance()), advParams(), advPayload(), scanResponse(), needToUpdateAdvData(true) {
         advPayload.clear();
         scanResponse.clear();
     }
@@ -167,19 +163,18 @@
     GapAdvertisingParams advParams;
     GapAdvertisingData   advPayload;
     GapAdvertisingData   scanResponse;
-    bool                 needToUpdateAdvData; /* Accumulation of AD structures
-                                * in the advertisement payload should eventually
-                                * result in a call to the target's
-                                * setAdvertisingData() before the server begins
-                                * advertising. This flag marks the status of the
-                                * pending update.*/
+
+    /* Accumulation of AD structures in the advertisement payload should
+     * eventually result in a call to the target's setAdvertisingData() before
+     * the server begins advertising. This flag marks the status of the pending
+     * update.*/
+    bool                 needToUpdateAdvData;
 
     /**
      * DEPRECATED
      */
 public:
-    ble_error_t setAdvertisingData(const GapAdvertisingData &ADStructures,
-                                   const GapAdvertisingData &scanResponse);
+    ble_error_t setAdvertisingData(const GapAdvertisingData &ADStructures, const GapAdvertisingData &scanResponse);
     ble_error_t setAdvertisingData(const GapAdvertisingData &ADStructures);
 
     ble_error_t startAdvertising(const GapAdvertisingParams &advParams);
--- a/hw/Gap.h	Fri Jun 06 11:30:56 2014 +0100
+++ b/hw/Gap.h	Fri Jun 06 14:14:46 2014 +0100
@@ -42,8 +42,7 @@
 
     /* These functions must be defined in the sub-class */
     virtual ble_error_t setAddress(addr_type_t type, const uint8_t address[6]) = 0;
-    virtual ble_error_t setAdvertisingData(const GapAdvertisingData &,
-                                           const GapAdvertisingData &) = 0;
+    virtual ble_error_t setAdvertisingData(const GapAdvertisingData &, const GapAdvertisingData &) = 0;
     virtual ble_error_t startAdvertising(const GapAdvertisingParams &) = 0;
     virtual ble_error_t stopAdvertising(void)                    = 0;
     virtual ble_error_t disconnect(void)                         = 0;
@@ -95,11 +94,7 @@
     }
 
 protected:
-    Gap() :
-        state(),
-        onTimeout(NULL),
-        onConnection(NULL),
-        onDisconnection(NULL) {
+    Gap() : state(), onTimeout(NULL), onConnection(NULL), onDisconnection(NULL) {
         /* empty */
     }
 
--- a/hw/GattServer.h	Fri Jun 06 11:30:56 2014 +0100
+++ b/hw/GattServer.h	Fri Jun 06 14:14:46 2014 +0100
@@ -34,12 +34,8 @@
 public:
     /* These functions must be defined in the sub-class */
     virtual ble_error_t addService(GattService &) = 0;
-    virtual ble_error_t readValue(uint16_t, uint8_t[],
-                                  uint16_t)                 = 0;
-    virtual ble_error_t updateValue(uint16_t,
-                                    uint8_t[],
-                                    uint16_t,
-                                    bool localOnly = false) = 0;
+    virtual ble_error_t readValue(uint16_t, uint8_t[], uint16_t) = 0;
+    virtual ble_error_t updateValue(uint16_t, uint8_t[], uint16_t, bool localOnly = false) = 0;
 
     // ToDo: For updateValue, check the CCCD to see if the value we are
     // updating has the notify or indicate bits sent, and if BOTH are set
@@ -95,14 +91,7 @@
     }
 
 protected:
-    GattServer() :
-        serviceCount(0),
-        characteristicCount(0),
-        onDataSent(NULL),
-        onDataWritten(NULL),
-        onUpdatesEnabled(NULL),
-        onUpdatesDisabled(NULL),
-        onConfirmationReceived(NULL) {
+    GattServer() : serviceCount(0), characteristicCount(0), onDataSent(NULL), onDataWritten(NULL), onUpdatesEnabled(NULL), onUpdatesDisabled(NULL), onConfirmationReceived(NULL) {
         /* empty */
     }