extend
Fork of BLE_API by
public/GattServerEvents.h@253:097be53aea02, 2014-12-12 (annotated)
- Committer:
- rgrover1
- Date:
- Fri Dec 12 13:32:24 2014 +0000
- Revision:
- 253:097be53aea02
- Parent:
- 249:5d9118449482
- Child:
- 260:ea7f9f14cc15
Synchronized with git rev 2552bf25
Author: Rohit Grover
Release 0.2.9
=============
API enhancements to support read/write authorization for GATT accesses.
Enhancements
~~~~~~~~~~~~
* Add support for authorization, whereby the user application can receive a
callback to authorize a read or a write on a characteristic's value
attribute before GATT commits the transaction. We now have an API for
GattCharacterisitc called setWriteAuthorizationCallback() which can filter
incoming access requests before they get applied to the GATT database.
Bugfixes
~~~~~~~~
Compatibility
~~~~~~~~~~~~~
This release is backward compatible with 0.2.4.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Rohit Grover |
106:a20be740075d | 1 | /* mbed Microcontroller Library |
Rohit Grover |
106:a20be740075d | 2 | * Copyright (c) 2006-2013 ARM Limited |
Rohit Grover |
106:a20be740075d | 3 | * |
Rohit Grover |
106:a20be740075d | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Rohit Grover |
106:a20be740075d | 5 | * you may not use this file except in compliance with the License. |
Rohit Grover |
106:a20be740075d | 6 | * You may obtain a copy of the License at |
Rohit Grover |
106:a20be740075d | 7 | * |
Rohit Grover |
106:a20be740075d | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Rohit Grover |
106:a20be740075d | 9 | * |
Rohit Grover |
106:a20be740075d | 10 | * Unless required by applicable law or agreed to in writing, software |
Rohit Grover |
106:a20be740075d | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
Rohit Grover |
106:a20be740075d | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Rohit Grover |
106:a20be740075d | 13 | * See the License for the specific language governing permissions and |
Rohit Grover |
106:a20be740075d | 14 | * limitations under the License. |
Rohit Grover |
106:a20be740075d | 15 | */ |
Rohit Grover |
106:a20be740075d | 16 | |
Rohit Grover |
106:a20be740075d | 17 | #ifndef __GATT_SERVER_EVENTS_H__ |
Rohit Grover |
106:a20be740075d | 18 | #define __GATT_SERVER_EVENTS_H__ |
Rohit Grover |
106:a20be740075d | 19 | |
Rohit Grover |
106:a20be740075d | 20 | /*! |
Rohit Grover |
106:a20be740075d | 21 | \brief |
Rohit Grover |
106:a20be740075d | 22 | The base class used to abstract away the callback events that can be |
Rohit Grover |
106:a20be740075d | 23 | triggered with the GATT Server. |
Rohit Grover |
106:a20be740075d | 24 | */ |
Rohit Grover |
106:a20be740075d | 25 | class GattServerEvents |
Rohit Grover |
106:a20be740075d | 26 | { |
Rohit Grover |
106:a20be740075d | 27 | public: |
Rohit Grover |
106:a20be740075d | 28 | typedef enum gattEvent_e { |
rgrover1 | 249:5d9118449482 | 29 | GATT_EVENT_DATA_SENT = 1, /**< Fired when a msg was successfully sent out (notify only?) */ |
rgrover1 | 249:5d9118449482 | 30 | GATT_EVENT_DATA_WRITTEN = 2, /**< Client wrote data to Server (separate into char and descriptor writes?) */ |
rgrover1 | 249:5d9118449482 | 31 | GATT_EVENT_UPDATES_ENABLED = 3, /**< Notify/Indicate Enabled in CCCD */ |
rgrover1 | 249:5d9118449482 | 32 | GATT_EVENT_UPDATES_DISABLED = 4, /**< Notify/Indicate Disabled in CCCD */ |
rgrover1 | 249:5d9118449482 | 33 | GATT_EVENT_CONFIRMATION_RECEIVED = 5, /**< Response received from Indicate message */ |
rgrover1 | 253:097be53aea02 | 34 | GATT_EVENT_READ_AUTHORIZATION_REQ = 6, /**< Request application to authorize read */ |
rgrover1 | 253:097be53aea02 | 35 | GATT_EVENT_WRITE_AUTHORIZATION_REQ = 7, /**< Request application to authorize write */ |
Rohit Grover |
106:a20be740075d | 36 | } gattEvent_t; |
Rohit Grover |
106:a20be740075d | 37 | }; |
Rohit Grover |
106:a20be740075d | 38 | |
rgrover1 | 126:fdebe4d5d62f | 39 | #endif // ifndef __GATT_SERVER_EVENTS_H__ |