Official Sheffield ARMBand micro:bit program
microbit/microbit-dal/BLE_API/ble/GattServerEvents.h@0:b9164b348919, 2016-10-17 (annotated)
- Committer:
- MrBedfordVan
- Date:
- Mon Oct 17 12:41:20 2016 +0000
- Revision:
- 0:b9164b348919
Official Sheffield ARMBand Micro:bit program
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MrBedfordVan | 0:b9164b348919 | 1 | /* mbed Microcontroller Library |
MrBedfordVan | 0:b9164b348919 | 2 | * Copyright (c) 2006-2013 ARM Limited |
MrBedfordVan | 0:b9164b348919 | 3 | * |
MrBedfordVan | 0:b9164b348919 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
MrBedfordVan | 0:b9164b348919 | 5 | * you may not use this file except in compliance with the License. |
MrBedfordVan | 0:b9164b348919 | 6 | * You may obtain a copy of the License at |
MrBedfordVan | 0:b9164b348919 | 7 | * |
MrBedfordVan | 0:b9164b348919 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
MrBedfordVan | 0:b9164b348919 | 9 | * |
MrBedfordVan | 0:b9164b348919 | 10 | * Unless required by applicable law or agreed to in writing, software |
MrBedfordVan | 0:b9164b348919 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
MrBedfordVan | 0:b9164b348919 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
MrBedfordVan | 0:b9164b348919 | 13 | * See the License for the specific language governing permissions and |
MrBedfordVan | 0:b9164b348919 | 14 | * limitations under the License. |
MrBedfordVan | 0:b9164b348919 | 15 | */ |
MrBedfordVan | 0:b9164b348919 | 16 | |
MrBedfordVan | 0:b9164b348919 | 17 | #ifndef __GATT_SERVER_EVENTS_H__ |
MrBedfordVan | 0:b9164b348919 | 18 | #define __GATT_SERVER_EVENTS_H__ |
MrBedfordVan | 0:b9164b348919 | 19 | |
MrBedfordVan | 0:b9164b348919 | 20 | /*! |
MrBedfordVan | 0:b9164b348919 | 21 | \brief |
MrBedfordVan | 0:b9164b348919 | 22 | The base class used to abstract away the callback events that can be |
MrBedfordVan | 0:b9164b348919 | 23 | triggered with the GATT Server. |
MrBedfordVan | 0:b9164b348919 | 24 | */ |
MrBedfordVan | 0:b9164b348919 | 25 | class GattServerEvents |
MrBedfordVan | 0:b9164b348919 | 26 | { |
MrBedfordVan | 0:b9164b348919 | 27 | public: |
MrBedfordVan | 0:b9164b348919 | 28 | typedef enum gattEvent_e { |
MrBedfordVan | 0:b9164b348919 | 29 | GATT_EVENT_DATA_SENT = 1, /**< Fired when a message was successfully sent out (notify only?) */ |
MrBedfordVan | 0:b9164b348919 | 30 | GATT_EVENT_DATA_WRITTEN = 2, /**< Client wrote data to the server (separate into char and descriptor writes?) */ |
MrBedfordVan | 0:b9164b348919 | 31 | GATT_EVENT_UPDATES_ENABLED = 3, /**< Notify/Indicate enabled in CCCD. */ |
MrBedfordVan | 0:b9164b348919 | 32 | GATT_EVENT_UPDATES_DISABLED = 4, /**< Notify/Indicate disabled in CCCD. */ |
MrBedfordVan | 0:b9164b348919 | 33 | GATT_EVENT_CONFIRMATION_RECEIVED = 5, /**< Response received from Indicate message. */ |
MrBedfordVan | 0:b9164b348919 | 34 | GATT_EVENT_READ_AUTHORIZATION_REQ = 6, /**< Request application to authorize read. */ |
MrBedfordVan | 0:b9164b348919 | 35 | GATT_EVENT_WRITE_AUTHORIZATION_REQ = 7 /**< Request application to authorize write. */ |
MrBedfordVan | 0:b9164b348919 | 36 | } gattEvent_t; |
MrBedfordVan | 0:b9164b348919 | 37 | }; |
MrBedfordVan | 0:b9164b348919 | 38 | |
MrBedfordVan | 0:b9164b348919 | 39 | #endif // ifndef __GATT_SERVER_EVENTS_H__ |