Bluetooth: Make parts of GATT API internal

Move parts of the API that are not usable for applications to
an internal header.

Change-Id: Idbcd3db8acda74375ea9deec2bf3d7eddc8a4ddb
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
Szymon Janc 2015-09-14 17:48:26 +02:00 committed by Anas Nashif
commit 8b7097fd20
4 changed files with 40 additions and 22 deletions

View file

@ -615,28 +615,6 @@ int bt_gatt_attr_read_cep(struct bt_conn *conn,
*/
void bt_gatt_notify(uint16_t handle, const void *data, uint16_t len);
/** @brief connected callback.
*
* @param conn Connection object.
*/
void bt_gatt_connected(struct bt_conn *conn);
/** @brief disconnected callback.
*
* @param conn Connection object.
*/
void bt_gatt_disconnected(struct bt_conn *conn);
/** @brief notification callback.
*
* @param conn Connection object.
* @param handle Attribute handle.
* @param data Attribute data.
* @param length Attribute data length.
*/
void bt_gatt_notification(struct bt_conn *conn, uint16_t handle,
const void *data, uint16_t length);
/* Client API */
/** @brief Response callback function

View file

@ -50,6 +50,7 @@
#include "l2cap.h"
#include "smp.h"
#include "att.h"
#include "gatt_internal.h"
#if !defined(CONFIG_BLUETOOTH_DEBUG_ATT)
#undef BT_DBG

View file

@ -51,6 +51,7 @@
#include "l2cap.h"
#include "att.h"
#include "smp.h"
#include "gatt_internal.h"
#if !defined(CONFIG_BLUETOOTH_DEBUG_GATT)
#undef BT_DBG

View file

@ -0,0 +1,38 @@
/** @file
* @brief Internal API for Generic Attribute Profile handling.
*/
/*
* Copyright (c) 2015 Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1) Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2) Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3) Neither the name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
void bt_gatt_connected(struct bt_conn *conn);
void bt_gatt_disconnected(struct bt_conn *conn);
void bt_gatt_notification(struct bt_conn *conn, uint16_t handle,
const void *data, uint16_t length);