BLE: Improve GattServerEvents.h documentation.

pull/5392/head
Vincent Coubard 2017-10-24 17:25:34 -05:00
parent a7b4d6accd
commit 7f22d25018
1 changed files with 43 additions and 13 deletions

View File

@ -14,28 +14,58 @@
* limitations under the License.
*/
#ifndef __GATT_SERVER_EVENTS_H__
#define __GATT_SERVER_EVENTS_H__
#ifndef MBED_BLE_GATT_SERVER_EVENTS_H__
#define MBED_BLE_GATT_SERVER_EVENTS_H__
/**
* @brief The base class used to abstract away the callback events that can be
* triggered with the GATT Server.
* Abstract events generated by a GattServer vendor port.
*
* @important This class is not part of the public API.
*/
class GattServerEvents
{
public:
/**
* Enumeration for GattServer events.
* Enumeration of events which can be generated by a GattServer
* implementation.
*/
typedef enum gattEvent_e {
GATT_EVENT_DATA_SENT = 1, /**< Fired when a message was successfully sent out (notify only?) */
GATT_EVENT_DATA_WRITTEN = 2, /**< Client wrote data to the server (separate into char and descriptor writes?) */
GATT_EVENT_UPDATES_ENABLED = 3, /**< Notify/Indicate enabled in CCCD. */
GATT_EVENT_UPDATES_DISABLED = 4, /**< Notify/Indicate disabled in CCCD. */
GATT_EVENT_CONFIRMATION_RECEIVED = 5, /**< Response received from Indicate message. */
GATT_EVENT_READ_AUTHORIZATION_REQ = 6, /**< Request application to authorize read. */
GATT_EVENT_WRITE_AUTHORIZATION_REQ = 7, /**< Request application to authorize write. */
/**
* Fired when a server event was successfully sent out.
*/
GATT_EVENT_DATA_SENT = 1,
/**
* Client has written a server attribute.
*/
GATT_EVENT_DATA_WRITTEN = 2,
/**
* Notification or indication enabled in CCCD.
*/
GATT_EVENT_UPDATES_ENABLED = 3,
/**
* Notification or Indication disabled in CCCD.
*/
GATT_EVENT_UPDATES_DISABLED = 4,
/**
* Response received from Characteristic Value Indication message.
*/
GATT_EVENT_CONFIRMATION_RECEIVED = 5,
/**
* Request application to authorize read.
*/
GATT_EVENT_READ_AUTHORIZATION_REQ = 6,
/**
* Request application to authorize write.
*/
GATT_EVENT_WRITE_AUTHORIZATION_REQ = 7,
} gattEvent_t;
};
#endif /* ifndef __GATT_SERVER_EVENTS_H__ */
#endif /* ifndef MBED_BLE_GATT_SERVER_EVENTS_H__ */