High level Bluetooth Low Energy API and radio abstraction layer

Fork of BLE_API by Bluetooth Low Energy

Committer:
vcoubard
Date:
Wed Apr 06 19:15:30 2016 +0100
Revision:
1179:4ab722f8dca0
Parent:
1166:5f89f53f3f7b
Child:
1183:1589830dbdb7
Synchronized with git rev ca632aaf
Author: Andres Amaya Garcia
Update Gap state after advertising times out

The BLE API was not updating the Gap internal state when the advertising stops
because of a user timeout. This commit fixes the issue by updating the internal
state structure in Gap just before the registered callbacks are notified of the
advertising timeout.

Who changed what in which revision?

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