Bluetooth: Add doxygen documentation to conn.h
Change-Id: Ifb7b7c5bf089590059aa97f498751679e34ae35e Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
0344c11ad7
commit
640a8cdc96
1 changed files with 32 additions and 3 deletions
|
@ -36,17 +36,40 @@
|
||||||
|
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
|
|
||||||
|
/*! Opaque type representing a connection to a remote device */
|
||||||
struct bt_conn;
|
struct bt_conn;
|
||||||
|
|
||||||
/* Increment conn reference count */
|
/*! @brief Increment a connection's reference count.
|
||||||
|
*
|
||||||
|
* Increment the reference count of a connection object.
|
||||||
|
*
|
||||||
|
* @param conn Connection object.
|
||||||
|
*
|
||||||
|
* @return Connection object with incremented reference count.
|
||||||
|
*/
|
||||||
struct bt_conn *bt_conn_get(struct bt_conn *conn);
|
struct bt_conn *bt_conn_get(struct bt_conn *conn);
|
||||||
|
|
||||||
/* Decrement conn reference count */
|
/*! @brief Decrement a connection's reference count.
|
||||||
|
*
|
||||||
|
* Decrement the reference count of a connection object.
|
||||||
|
*
|
||||||
|
* @param conn Connection object.
|
||||||
|
*/
|
||||||
void bt_conn_put(struct bt_conn *conn);
|
void bt_conn_put(struct bt_conn *conn);
|
||||||
|
|
||||||
/* Look up an existing connection by address */
|
/*! @brief Look up an existing connection by address.
|
||||||
|
*
|
||||||
|
* Look up an existing connection based on the remote address.
|
||||||
|
*
|
||||||
|
* @param peer Remote address.
|
||||||
|
*
|
||||||
|
* @return Connection object or NULL if not found. The caller gets a
|
||||||
|
* new reference to the connection object which must be released with
|
||||||
|
* bt_conn_put() once done using the object.
|
||||||
|
*/
|
||||||
struct bt_conn *bt_conn_lookup_addr_le(const bt_addr_le_t *peer);
|
struct bt_conn *bt_conn_lookup_addr_le(const bt_addr_le_t *peer);
|
||||||
|
|
||||||
|
/*! Connection callback structure */
|
||||||
struct bt_conn_cb {
|
struct bt_conn_cb {
|
||||||
void (*connected)(struct bt_conn *conn);
|
void (*connected)(struct bt_conn *conn);
|
||||||
void (*disconnected)(struct bt_conn *conn);
|
void (*disconnected)(struct bt_conn *conn);
|
||||||
|
@ -54,6 +77,12 @@ struct bt_conn_cb {
|
||||||
struct bt_conn_cb *_next;
|
struct bt_conn_cb *_next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*! @brief Register connection callbacks.
|
||||||
|
*
|
||||||
|
* Register callbacks to monitor the state of connections.
|
||||||
|
*
|
||||||
|
* @param cb Callback struct.
|
||||||
|
*/
|
||||||
void bt_conn_cb_register(struct bt_conn_cb *cb);
|
void bt_conn_cb_register(struct bt_conn_cb *cb);
|
||||||
|
|
||||||
#endif /* __BT_CONN_H */
|
#endif /* __BT_CONN_H */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue