Changed URIBeaconConfigService.h to work with ST board

Fork of BLE_API by Bluetooth Low Energy

Revision:
510:39612adfbf68
Parent:
509:fc2a15248577
--- a/public/GattCharacteristicCallbackParams.h	Fri Jun 19 15:52:04 2015 +0100
+++ b/public/GattCharacteristicCallbackParams.h	Fri Jun 19 15:52:04 2015 +0100
@@ -14,33 +14,35 @@
  * limitations under the License.
  */
 
-#ifndef __GATT_CHARACTERISTIC_CALLBACK_PARAMS_H__
-#define __GATT_CHARACTERISTIC_CALLBACK_PARAMS_H__
+#ifndef __GATT_CALLBACK_PARAM_TYPES_H__
+#define __GATT_CALLBACK_PARAM_TYPES_H__
 
-struct GattCharacteristicWriteCBParams {
-    GattAttribute::Handle_t charHandle;
-    enum Type {
-        GATTS_CHAR_OP_INVALID               = 0x00,  /**< Invalid Operation. */
-        GATTS_CHAR_OP_WRITE_REQ             = 0x01,  /**< Write Request. */
-        GATTS_CHAR_OP_WRITE_CMD             = 0x02,  /**< Write Command. */
-        GATTS_CHAR_OP_SIGN_WRITE_CMD        = 0x03,  /**< Signed Write Command. */
-        GATTS_CHAR_OP_PREP_WRITE_REQ        = 0x04,  /**< Prepare Write Request. */
-        GATTS_CHAR_OP_EXEC_WRITE_REQ_CANCEL = 0x05,  /**< Execute Write Request: Cancel all prepared writes. */
-        GATTS_CHAR_OP_EXEC_WRITE_REQ_NOW    = 0x06,  /**< Execute Write Request: Immediately execute all prepared writes. */
-    } op;                   /**< Type of write operation, */
-    uint16_t       offset;  /**< Offset for the write operation. */
-    uint16_t       len;
-    const uint8_t *data;    /* @note: data might not persist beyond the callback; make a local copy if needed. */
+struct GattWriteCallbackParams {
+    enum WriteOp_t {
+        OP_INVALID               = 0x00,  /**< Invalid Operation. */
+        OP_WRITE_REQ             = 0x01,  /**< Write Request. */
+        OP_WRITE_CMD             = 0x02,  /**< Write Command. */
+        OP_SIGN_WRITE_CMD        = 0x03,  /**< Signed Write Command. */
+        OP_PREP_WRITE_REQ        = 0x04,  /**< Prepare Write Request. */
+        OP_EXEC_WRITE_REQ_CANCEL = 0x05,  /**< Execute Write Request: Cancel all prepared writes. */
+        OP_EXEC_WRITE_REQ_NOW    = 0x06,  /**< Execute Write Request: Immediately execute all prepared writes. */
+    };
+
+    GattAttribute::Handle_t  handle;
+    WriteOp_t                writeOp; /**< Type of write operation, */
+    uint16_t                 offset;  /**< Offset for the write operation. */
+    uint16_t                 len;
+    const uint8_t           *data;    /* @note: data might not persist beyond the callback; make a local copy if needed. */
 };
 
-struct GattCharacteristicReadCBParams {
-    GattAttribute::Handle_t  charHandle;
-    uint16_t                 offset; /**< Offset for the read operation. */
+struct GattReadCallbackParams {
+    GattAttribute::Handle_t  handle;
+    uint16_t                 offset;  /**< Offset for the read operation. */
     uint16_t                 len;
-    const uint8_t           *data;   /* @note: data might not persist beyond the callback; make a local copy if needed. */
+    const uint8_t           *data;    /* @note: data might not persist beyond the callback; make a local copy if needed. */
 };
 
-enum GattCharacteristicAuthCBReply_t {
+enum GattAuthCallbackReply_t {
     AUTH_CALLBACK_REPLY_SUCCESS =                       0x00,    /**< Success. */
     AUTH_CALLBACK_REPLY_ATTERR_INVALID_HANDLE =         0x0101,  /**< ATT Error: Invalid Attribute Handle. */
     AUTH_CALLBACK_REPLY_ATTERR_READ_NOT_PERMITTED =     0x0102,  /**< ATT Error: Read not permitted. */
@@ -55,22 +57,22 @@
     AUTH_CALLBACK_REPLY_ATTERR_INSUF_RESOURCES =        0x0111,  /**< ATT Error: Encrypted link required. */
 };
 
-struct GattCharacteristicWriteAuthCBParams {
-    GattAttribute::Handle_t  charHandle;
+struct GattWriteAuthCallbackParams {
+    GattAttribute::Handle_t  handle;
     uint16_t                 offset; /**< Offset for the write operation. */
     uint16_t                 len;    /**< Length of the incoming data. */
     const uint8_t           *data;   /**< Incoming data, variable length. */
-    GattCharacteristicAuthCBReply_t authorizationReply; /* This is the out parameter which needs to be set to true by the callback if the
-                                                         * request is to proceed; false otherwise. */
+    GattAuthCallbackReply_t  authorizationReply; /* This is the out parameter which needs to be set to true by the callback if the
+                                                  * request is to proceed; false otherwise. */
 };
 
-struct GattCharacteristicReadAuthCBParams {
-    GattAttribute::Handle_t  charHandle;
+struct GattReadAuthCallbackParams {
+    GattAttribute::Handle_t  handle;
     uint16_t                 offset; /**< Offset for the read operation. */
     uint16_t                 len;    /**< Optional: new length of the outgoing data. */
     uint8_t                 *data;   /**< Optional: new outgoing data. Leave at NULL if data is unchanged. */
-    GattCharacteristicAuthCBReply_t authorizationReply; /* This is the out parameter which needs to be set to true by the callback if the
-                                                         * request is to proceed; false otherwise. */
+    GattAuthCallbackReply_t  authorizationReply; /* This is the out parameter which needs to be set to true by the callback if the
+                                                  * request is to proceed; false otherwise. */
 };
 
-#endif /*__GATT_CHARACTERISTIC_CALLBACK_PARAMS_H__*/
\ No newline at end of file
+#endif /*__GATT_CALLBACK_PARAM_TYPES_H__*/
\ No newline at end of file