static void bta_dm_sdp_callback (UINT16 sdp_status);
static UINT8 bta_dm_authorize_cback (BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NAME bd_name, UINT8 *service_name, UINT8 service_id, BOOLEAN is_originator);
static UINT8 bta_dm_pin_cback (BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NAME bd_name);
-static UINT8 bta_dm_link_key_request_cback (BD_ADDR bd_addr, LINK_KEY key);
static UINT8 bta_dm_new_link_key_cback(BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NAME bd_name, LINK_KEY key, UINT8 key_type);
static UINT8 bta_dm_authentication_complete_cback(BD_ADDR bd_addr, DEV_CLASS dev_class,BD_NAME bd_name, int result);
static void bta_dm_local_name_cback(BD_ADDR bd_addr);
&bta_dm_authorize_cback,
&bta_dm_pin_cback,
&bta_dm_new_link_key_cback,
- &bta_dm_link_key_request_cback,
&bta_dm_authentication_complete_cback,
NULL,
&bta_dm_bond_cancel_complete_cback,
return BTM_CMD_STARTED;
}
-
-
-/*******************************************************************************
-**
-** Function bta_dm_link_key_request_cback
-**
-** Description Callback requesting linkkey
-**
-** Returns void
-**
-*******************************************************************************/
-static UINT8 bta_dm_link_key_request_cback (BD_ADDR bd_addr, LINK_KEY key)
-{
- /* Application passes all link key to
- BTM during initialization using add_device
- API. If BTM doesn't have the link key in it's
- data base, that's because application doesn't
- it */
- UNUSED(bd_addr);
- UNUSED(key);
-
- return BTM_NOT_AUTHORIZED;
-}
-
-
-
-
-
/*******************************************************************************
**
** Function bta_dm_new_link_key_cback
/* Notify L2CAP to increase timeout */
l2c_pin_code_request (p_bda);
- /* Only ask the host for a key if this guy is not already bonding */
- if ( (btm_cb.pairing_state == BTM_PAIR_STATE_IDLE)
- || (memcmp (p_bda, btm_cb.pairing_bda, BD_ADDR_LEN) != 0) )
- {
- if (btm_cb.api.p_link_key_req_callback)
- {
- if ((*btm_cb.api.p_link_key_req_callback)(p_bda, p_dev_rec->link_key) == BTM_SUCCESS)
- {
- btsnd_hcic_link_key_req_reply (p_bda, p_dev_rec->link_key);
- return;
- }
- }
- }
-
/* The link key is not in the database and it is not known to the manager */
btsnd_hcic_link_key_neg_reply (p_bda);
}
typedef UINT8 (tBTM_PIN_CALLBACK) (BD_ADDR bd_addr, DEV_CLASS dev_class,
tBTM_BD_NAME bd_name);
-
-/* Get Link Key for the connection. Parameters are
-** BD Address of remote
-** Link Key
-*/
-typedef UINT8 (tBTM_LINK_KEY_REQ_CALLBACK) (BD_ADDR bd_addr, LINK_KEY key);
-
/* New Link Key for the connection. Parameters are
** BD Address of remote
** Link Key
tBTM_AUTHORIZE_CALLBACK *p_authorize_callback;
tBTM_PIN_CALLBACK *p_pin_callback;
tBTM_LINK_KEY_CALLBACK *p_link_key_callback;
- tBTM_LINK_KEY_REQ_CALLBACK *p_link_key_req_callback;
tBTM_AUTH_COMPLETE_CALLBACK *p_auth_complete_callback;
tBTM_ABORT_CALLBACK *p_abort_callback;
tBTM_BOND_CANCEL_CMPL_CALLBACK *p_bond_cancel_cmpl_callback;