BTM_ConfirmReqReply(accept ? BTM_SUCCESS : BTM_NOT_AUTHORIZED, bd_addr);
}
-/** respond to the IO capabilities request from BTM */
-void bta_dm_ci_io_req_act(const RawAddress& bd_addr, tBTM_IO_CAP io_cap,
- tBTM_OOB_DATA oob_data, tBTM_AUTH_REQ auth_req) {
- BTM_IoCapRsp(bd_addr, io_cap, oob_data,
- auth_req ? BTM_AUTH_AP_YES : BTM_AUTH_AP_NO);
-}
-
/** respond to the OOB data request for the remote device from BTM */
void bta_dm_ci_rmt_oob_act(std::unique_ptr<tBTA_DM_CI_RMT_OOB> msg) {
BTM_RemoteOobDataReply(msg->accept ? BTM_SUCCESS : BTM_NOT_AUTHORIZED,
/*******************************************************************************
*
- * Function bta_dm_ci_io_req
- *
- * Description This function must be called in response to function
- * bta_dm_co_io_req(), if *p_oob_data to BTA_OOB_UNKNOWN
- * by bta_dm_co_io_req().
- *
- * Returns void
- *
- ******************************************************************************/
-void bta_dm_ci_io_req(const RawAddress& bd_addr, tBTM_IO_CAP io_cap,
- tBTM_OOB_DATA oob_data, tBTM_AUTH_REQ auth_req)
-
-{
- do_in_main_thread(FROM_HERE, base::Bind(bta_dm_ci_io_req_act, bd_addr, io_cap,
- oob_data, auth_req));
-}
-
-/*******************************************************************************
- *
* Function bta_dm_ci_rmt_oob
*
* Description This function must be called in response to function
extern void bta_dm_set_encryption(const RawAddress&, tBTA_TRANSPORT,
tBTA_DM_ENCRYPT_CBACK*, tBTM_BLE_SEC_ACT);
extern void bta_dm_confirm(const RawAddress&, bool);
-extern void bta_dm_ci_io_req_act(const RawAddress& bd_addr, tBTM_IO_CAP io_cap,
- tBTM_OOB_DATA oob_data,
- tBTM_AUTH_REQ auth_req);
+
extern void bta_dm_ci_rmt_oob_act(std::unique_ptr<tBTA_DM_CI_RMT_OOB> msg);
extern void bta_dm_init_pm(void);
RawAddress bd_addr; /* BD address peer device. */
} tBTA_DM_LINK_DOWN;
-#define BTA_IO_CAP_OUT BTM_IO_CAP_OUT /* 0 DisplayOnly */
-#define BTA_IO_CAP_IO BTM_IO_CAP_IO /* 1 DisplayYesNo */
-#define BTA_IO_CAP_IN BTM_IO_CAP_IN /* 2 KeyboardOnly */
-#define BTA_IO_CAP_NONE BTM_IO_CAP_NONE /* 3 NoInputNoOutput */
-#define BTA_IO_CAP_KBDISP BTM_IO_CAP_KBDISP /* 4 Keyboard display */
-
-#define BTA_AUTH_SP_NO \
- BTM_AUTH_SP_NO /* 0 MITM Protection Not Required - Single \
- Profile/non-bonding \
- Numeric comparison with automatic accept allowed */
#define BTA_AUTH_SP_YES \
BTM_AUTH_SP_YES /* 1 MITM Protection Required - Single Profile/non-bonding \
Use IO Capabilities to determine authentication procedure \
*/
-#define BTA_AUTH_AP_NO \
- BTM_AUTH_AP_NO /* 2 MITM Protection Not Required - All Profiles/dedicated \
- bonding \
- Numeric comparison with automatic accept allowed */
-#define BTA_AUTH_AP_YES \
- BTM_AUTH_AP_YES /* 3 MITM Protection Required - All Profiles/dedicated \
- bonding \
- Use IO Capabilities to determine authentication procedure \
- */
-#define BTA_AUTH_SPGB_NO \
- BTM_AUTH_SPGB_NO /* 4 MITM Protection Not Required - Single Profiles/general \
- bonding \
- Numeric comparison with automatic accept allowed */
-#define BTA_AUTH_SPGB_YES \
- BTM_AUTH_SPGB_YES /* 5 MITM Protection Required - Single Profiles/general \
- bonding \
- Use IO Capabilities to determine authentication \
- procedure */
#define BTA_AUTH_DD_BOND \
BTM_AUTH_DD_BOND /* 2 this bit is set for dedicated bonding */
#define BTA_AUTH_BONDS \
BTM_AUTH_BONDS /* 6 the general/dedicated bonding bits */
-#define BTA_LE_AUTH_NO_BOND BTM_LE_AUTH_REQ_NO_BOND /* 0*/
-#define BTA_LE_AUTH_BOND BTM_LE_AUTH_REQ_BOND /* 1 << 0 */
-#define BTA_LE_AUTH_REQ_MITM BTM_LE_AUTH_REQ_MITM /* 1 << 2 */
-
-#define BTA_LE_AUTH_REQ_SC_ONLY BTM_LE_AUTH_REQ_SC_ONLY /* 1 << 3 */
-#define BTA_LE_AUTH_REQ_SC_BOND BTM_LE_AUTH_REQ_SC_BOND /* 1001 */
-#define BTA_LE_AUTH_REQ_SC_MITM BTM_LE_AUTH_REQ_SC_MITM /* 1100 */
#define BTA_LE_AUTH_REQ_SC_MITM_BOND BTM_LE_AUTH_REQ_SC_MITM_BOND /* 1101 */
-#define BTA_OOB_NONE BTM_OOB_NONE
-#define BTA_OOB_PRESENT BTM_OOB_PRESENT
-#define BTA_OOB_UNKNOWN BTM_OOB_UNKNOWN
-
/* Structure associated with BTA_DM_SP_CFM_REQ_EVT */
typedef struct {
/* Note: First 3 data members must be, bd_addr, dev_class, and bd_name in
/*****************************************************************************
* Function Declarations
****************************************************************************/
-/*******************************************************************************
- *
- * Function bta_dm_ci_io_req
- *
- * Description This function must be called in response to function
- * bta_dm_co_io_req(), if *p_oob_data is set to BTA_OOB_UNKNOWN
- * by bta_dm_co_io_req().
- *
- * Returns void
- *
- ******************************************************************************/
-extern void bta_dm_ci_io_req(const RawAddress& bd_addr, tBTM_IO_CAP io_cap,
- tBTM_OOB_DATA oob_data, tBTM_AUTH_REQ auth_req);
/*******************************************************************************
*
/*******************************************************************************
*
- * Function BTM_IoCapRsp
- *
- * Description This function is called in response to BTM_SP_IO_REQ_EVT
- * When the event data io_req.oob_data is set to
- * BTM_OOB_UNKNOWN by the tBTM_SP_CALLBACK implementation,
- * this function is called to provide the actual response
- *
- * Parameters: bd_addr - Address of the peer device
- * io_cap - The IO capability of local device.
- * oob - BTM_OOB_NONE or BTM_OOB_PRESENT.
- * auth_req- MITM protection required or not.
- *
- ******************************************************************************/
-void BTM_IoCapRsp(const RawAddress& bd_addr, tBTM_IO_CAP io_cap,
- tBTM_OOB_DATA oob, tBTM_AUTH_REQ auth_req) {
- BTM_TRACE_EVENT("BTM_IoCapRsp: state: %s oob: %d io_cap: %d",
- btm_pair_state_descr(btm_cb.pairing_state), oob, io_cap);
-
- if ((btm_cb.pairing_state != BTM_PAIR_STATE_WAIT_LOCAL_IOCAPS) ||
- (btm_cb.pairing_bda != bd_addr))
- return;
-
- if (oob < BTM_OOB_UNKNOWN && io_cap < BTM_IO_CAP_MAX) {
- btm_cb.devcb.loc_auth_req = auth_req;
- btm_cb.devcb.loc_io_caps = io_cap;
-
- if (btm_cb.pairing_flags & BTM_PAIR_FLAGS_WE_STARTED_DD)
- auth_req = (BTM_AUTH_DD_BOND | (auth_req & BTM_AUTH_YN_BIT));
-
- btsnd_hcic_io_cap_req_reply(bd_addr, io_cap, oob, auth_req);
- }
-}
-
-/*******************************************************************************
- *
* Function BTM_ReadLocalOobData
*
* Description This function is called to read the local OOB data from
/*******************************************************************************
*
- * Function BTM_IoCapRsp
- *
- * Description This function is called in response to BTM_SP_IO_REQ_EVT
- * When the event data io_req.oob_data is set to
- * BTM_OOB_UNKNOWN by the tBTM_SP_CALLBACK implementation, this
- * function is called to provide the actual response
- *
- * Parameters: bd_addr - Address of the peer device
- * io_cap - The IO capability of local device.
- * oob - BTM_OOB_NONE or BTM_OOB_PRESENT.
- * auth_req- MITM protection required or not.
- *
- ******************************************************************************/
-void BTM_IoCapRsp(const RawAddress& bd_addr, tBTM_IO_CAP io_cap,
- tBTM_OOB_DATA oob, tBTM_AUTH_REQ auth_req);
-
-/*******************************************************************************
- *
* Function BTM_ReadLocalOobData
*
* Description This function is called to read the local OOB data from