Bluetooth: Move bt_disconnect to conn.[ch] and rename it appropriately
The bt_disconnect deals with the bt_conn object and should therefore reside in conn.c and be exported through conn.h. It should also have the appropriate bt_conn_* prefix. Change-Id: I75eb648fd9aa8ced9a991d472c319d25f4b772af Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
79eb002a06
commit
824135122f
6 changed files with 79 additions and 77 deletions
|
@ -79,6 +79,18 @@ struct bt_conn *bt_conn_lookup_addr_le(const bt_addr_le_t *peer);
|
|||
*/
|
||||
const bt_addr_le_t *bt_conn_get_dst(const struct bt_conn *conn);
|
||||
|
||||
/** @brief Disconnect from a remote device or cancel pending connection.
|
||||
*
|
||||
* Disconnect an active connection with the specified reason code or cancel
|
||||
* pending outgoing connection.
|
||||
*
|
||||
* @param conn Connection to disconnect.
|
||||
* @param reason Reason code for the disconnection.
|
||||
*
|
||||
* @return Zero on success or (negative) error code on failure.
|
||||
*/
|
||||
int bt_conn_disconnect(struct bt_conn *conn, uint8_t reason);
|
||||
|
||||
/** Connection callback structure */
|
||||
struct bt_conn_cb {
|
||||
void (*connected)(struct bt_conn *conn);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue