emulator/bthost: Add getter functions needed by SMP

This commit is contained in:
Johan Hedberg 2014-09-18 10:10:56 +03:00
parent 3d51328b6c
commit 6b7560c085
2 changed files with 18 additions and 0 deletions

View File

@ -2186,16 +2186,31 @@ void bthost_set_io_capability(struct bthost *bthost, uint8_t io_capability)
bthost->io_capability = io_capability;
}
uint8_t bthost_get_io_capability(struct bthost *bthost)
{
return bthost->io_capability;
}
void bthost_set_auth_req(struct bthost *bthost, uint8_t auth_req)
{
bthost->auth_req = auth_req;
}
uint8_t bthost_get_auth_req(struct bthost *bthost)
{
return bthost->auth_req;
}
void bthost_set_reject_user_confirm(struct bthost *bthost, bool reject)
{
bthost->reject_user_confirm = reject;
}
bool bthost_get_reject_user_confirm(struct bthost *bthost)
{
return bthost->reject_user_confirm;
}
void bthost_add_rfcomm_server(struct bthost *bthost, uint8_t channel,
bthost_rfcomm_connect_cb func, void *user_data)
{

View File

@ -92,8 +92,11 @@ void bthost_add_l2cap_server(struct bthost *bthost, uint16_t psm,
void bthost_set_pin_code(struct bthost *bthost, const uint8_t *pin,
uint8_t pin_len);
void bthost_set_io_capability(struct bthost *bthost, uint8_t io_capability);
uint8_t bthost_get_io_capability(struct bthost *bthost);
void bthost_set_auth_req(struct bthost *bthost, uint8_t auth_req);
uint8_t bthost_get_auth_req(struct bthost *bthost);
void bthost_set_reject_user_confirm(struct bthost *bthost, bool reject);
bool bthost_get_reject_user_confirm(struct bthost *bthost);
typedef void (*bthost_rfcomm_connect_cb) (uint16_t handle, uint16_t cid,
void *user_data, bool status);