Lightly modified version of the BLE stack, that doesn't bring up a DFUService by default... as we have our own.
Fork of BLE_API by
Diff: public/GattCharacteristicCallbackParams.h
- Revision:
- 325:501ad8b8bbe5
- Parent:
- 300:d9a39f759a6a
diff -r 13a128a1505d -r 501ad8b8bbe5 public/GattCharacteristicCallbackParams.h --- a/public/GattCharacteristicCallbackParams.h Mon Mar 23 16:28:09 2015 +0000 +++ b/public/GattCharacteristicCallbackParams.h Mon Mar 23 16:28:09 2015 +0000 @@ -44,13 +44,28 @@ uint8_t *data; /**< Outgoing data, variable length. */ }; +enum GattCharacteristicAuthCBReply_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. */ + AUTH_CALLBACK_REPLY_ATTERR_WRITE_NOT_PERMITTED = 0x0103, /**< ATT Error: Write not permitted. */ + AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHENTICATION = 0x0105, /**< ATT Error: Authenticated link required. */ + AUTH_CALLBACK_REPLY_ATTERR_INVALID_OFFSET = 0x0107, /**< ATT Error: Offset specified was past the end of the attribute. */ + AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHORIZATION = 0x0108, /**< ATT Error: Used in ATT as Insufficient Authorisation. */ + AUTH_CALLBACK_REPLY_ATTERR_PREPARE_QUEUE_FULL = 0x0109, /**< ATT Error: Used in ATT as Prepare Queue Full. */ + AUTH_CALLBACK_REPLY_ATTERR_ATTRIBUTE_NOT_FOUND = 0x010A, /**< ATT Error: Used in ATT as Attribute not found. */ + AUTH_CALLBACK_REPLY_ATTERR_ATTRIBUTE_NOT_LONG = 0x010B, /**< ATT Error: Attribute cannot be read or written using read/write blob requests. */ + AUTH_CALLBACK_REPLY_ATTERR_INVALID_ATT_VAL_LENGTH = 0x010D, /**< ATT Error: Invalid value size. */ + AUTH_CALLBACK_REPLY_ATTERR_INSUF_RESOURCES = 0x0111, /**< ATT Error: Encrypted link required. */ +}; + struct GattCharacteristicWriteAuthCBParams { GattAttribute::Handle_t charHandle; uint16_t offset; /**< Offset for the write operation. */ uint16_t len; /**< Length of the incoming data. */ const uint8_t *data; /**< Incoming data, variable length. */ - bool authorizationReply; /* This is the out parameter which needs to be set to true by the callback if the - * request is to proceed; false otherwise. */ + 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. */ }; struct GattCharacteristicReadAuthCBParams { @@ -58,8 +73,8 @@ 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. */ - bool authorizationReply; /* This is the out parameter which needs to be set to true by the callback if the - * request is to proceed; false otherwise. */ + 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. */ }; #endif /*__GATT_CHARACTERISTIC_CALLBACK_PARAMS_H__*/ \ No newline at end of file