Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bae0717b authored by Chris Manton's avatar Chris Manton Committed by Gerrit Code Review
Browse files

Merge "bta:: Use tBTM_STATUS for sync callbacks" into main

parents 4b631720 8015c28f
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -39,12 +39,12 @@
using namespace bluetooth;

static tBTM_STATUS bta_dm_sp_cback(tBTM_SP_EVT event, tBTM_SP_EVT_DATA* p_data);
static uint8_t bta_dm_ble_smp_cback(tBTM_LE_EVT event, const RawAddress& bda,
static tBTM_STATUS bta_dm_ble_smp_cback(tBTM_LE_EVT event, const RawAddress& bda,
                                        tBTM_LE_EVT_DATA* p_data);
static uint8_t bta_dm_new_link_key_cback(const RawAddress& bd_addr, DEV_CLASS dev_class,
static tBTM_STATUS bta_dm_new_link_key_cback(const RawAddress& bd_addr, DEV_CLASS dev_class,
                                             BD_NAME bd_name, const LinkKey& key, uint8_t key_type,
                                             bool is_ctkd);
static uint8_t bta_dm_pin_cback(const RawAddress& bd_addr, DEV_CLASS dev_class,
static tBTM_STATUS bta_dm_pin_cback(const RawAddress& bd_addr, DEV_CLASS dev_class,
                                    const BD_NAME bd_name, bool min_16_digit);
static tBTM_STATUS bta_dm_sirk_verifiction_cback(const RawAddress& bd_addr);
static void bta_dm_authentication_complete_cback(const RawAddress& bd_addr, DEV_CLASS dev_class,
@@ -249,7 +249,7 @@ static void bta_dm_pinname_cback(const tBTM_REMOTE_DEV_NAME* p_data) {
 * Returns          void
 *
 ******************************************************************************/
static uint8_t bta_dm_pin_cback(const RawAddress& bd_addr, DEV_CLASS dev_class,
static tBTM_STATUS bta_dm_pin_cback(const RawAddress& bd_addr, DEV_CLASS dev_class,
                                    const BD_NAME bd_name, bool min_16_digit) {
  if (!bta_dm_sec_cb.p_sec_cback) {
    return BTM_NOT_AUTHORIZED;
@@ -290,7 +290,7 @@ static uint8_t bta_dm_pin_cback(const RawAddress& bd_addr, DEV_CLASS dev_class,
 * Returns          void
 *
 ******************************************************************************/
static uint8_t bta_dm_new_link_key_cback(const RawAddress& bd_addr, DEV_CLASS /* dev_class */,
static tBTM_STATUS bta_dm_new_link_key_cback(const RawAddress& bd_addr, DEV_CLASS /* dev_class */,
                                             BD_NAME bd_name, const LinkKey& key, uint8_t key_type,
                                             bool is_ctkd) {
  tBTA_DM_SEC sec_event;
@@ -648,7 +648,7 @@ static void ble_io_req(const RawAddress& bd_addr, tBTM_IO_CAP* p_io_cap, tBTM_OO
 * Returns          void
 *
 ******************************************************************************/
static uint8_t bta_dm_ble_smp_cback(tBTM_LE_EVT event, const RawAddress& bda,
static tBTM_STATUS bta_dm_ble_smp_cback(tBTM_LE_EVT event, const RawAddress& bda,
                                        tBTM_LE_EVT_DATA* p_data) {
  tBTM_STATUS status = BTM_SUCCESS;
  tBTA_DM_SEC sec_event;
+3 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@

#include "stack/include/bt_octets.h"
#include "stack/include/btm_sec_api_types.h"
#include "stack/include/btm_status.h"

//////////////////////////////////////////////////////////
////// from btm_ble_api_types.h
@@ -95,7 +96,7 @@ typedef union {
/* Simple Pairing Events.  Called by the stack when Simple Pairing related
 * events occur.
 */
typedef uint8_t(tBTM_LE_CALLBACK)(tBTM_LE_EVT event, const RawAddress& bda,
typedef tBTM_STATUS(tBTM_LE_CALLBACK)(tBTM_LE_EVT event, const RawAddress& bda,
                                      tBTM_LE_EVT_DATA* p_data);

#define BTM_BLE_KEY_TYPE_ID 1
+5 −5
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ typedef uint8_t(tBTM_AUTHORIZE_CALLBACK)(uint8_t service_id);
 *              BD Name of remote
 *              Flag indicating the minimum pin code length to be 16 digits
 */
typedef uint8_t(tBTM_PIN_CALLBACK)(const RawAddress& bd_addr, DEV_CLASS dev_class,
typedef tBTM_STATUS(tBTM_PIN_CALLBACK)(const RawAddress& bd_addr, DEV_CLASS dev_class,
                                       const BD_NAME bd_name, bool min_16_digit);

/* New Link Key for the connection.  Parameters are
@@ -50,7 +50,7 @@ typedef uint8_t(tBTM_PIN_CALLBACK)(const RawAddress& bd_addr, DEV_CLASS dev_clas
 *              Link Key
 *              Key Type: Combination, Local Unit, or Remote Unit
 */
typedef uint8_t(tBTM_LINK_KEY_CALLBACK)(const RawAddress& bd_addr, DEV_CLASS dev_class,
typedef tBTM_STATUS(tBTM_LINK_KEY_CALLBACK)(const RawAddress& bd_addr, DEV_CLASS dev_class,
                                            BD_NAME bd_name, const LinkKey& key, uint8_t key_type,
                                            bool is_ctkd);