This is an automated email from the ASF dual-hosted git repository.

kopyscinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 9616b929 nimble/host: Add connection handle realated GAP APIs to 
header file
9616b929 is described below

commit 9616b929d22da2cc02de1f14257c3bd8d0a46c8e
Author: Michal Gorecki <michal.gore...@codecoup.pl>
AuthorDate: Tue Aug 8 11:16:09 2023 +0200

    nimble/host: Add connection handle realated GAP APIs to header file
    
    This adds the declarations of two GAP APIs that were previously defined
    in the ble_gap.c. Now both APIs can be used in other source files.
---
 nimble/host/include/host/ble_gap.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/nimble/host/include/host/ble_gap.h 
b/nimble/host/include/host/ble_gap.h
index 690e427b..af0defa9 100644
--- a/nimble/host/include/host/ble_gap.h
+++ b/nimble/host/include/host/ble_gap.h
@@ -2587,6 +2587,25 @@ int ble_gap_event_listener_register(struct 
ble_gap_event_listener *listener,
  */
 int ble_gap_event_listener_unregister(struct ble_gap_event_listener *listener);
 
+/**
+ * Calls function defined by the user for every connection that is currently 
established
+ *
+ * @param cb            Callback function
+ * @param arg           Callback argument
+ */
+void ble_gap_conn_foreach_handle(ble_gap_conn_foreach_handle_fn *cb, void 
*arg);
+
+/**
+ * Looks for the connection with specified address.
+ *
+ * @param addr                  Address to look for
+ * @param out_conn_handle       Pointer to the variable in which conn_handle 
will be saved if found
+ *
+ * @return                      0 on success
+ *                              BLE_HS_ENOTCONN if connection with specified 
address was not found
+ */
+int ble_gap_conn_find_handle_by_addr(const ble_addr_t *addr, uint16_t 
*out_conn_handle);
+
 #if MYNEWT_VAL(BLE_POWER_CONTROL)
 /**
  * Enable Set Path Loss Reporting.

Reply via email to