From: Anupam Roy Date: Sat, 23 Jul 2016 10:59:00 +0000 (+0530) Subject: [Adapt: OAL] Register incoming Auth req handler in OAL X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90613b3af7857b7401283b1821ef29ceaa288742;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git [Adapt: OAL] Register incoming Auth req handler in OAL Change-Id: Icfe48b4d670f15aa641ad6358f90fee6a06dfc95 Signed-off-by: Anupam Roy --- diff --git a/bt-oal/oal-adapter-mgr.c b/bt-oal/oal-adapter-mgr.c index 5263f10..2a20602 100755 --- a/bt-oal/oal-adapter-mgr.c +++ b/bt-oal/oal-adapter-mgr.c @@ -64,6 +64,7 @@ extern void cb_device_acl_state_changed(bt_status_t status, bt_bdaddr_t *remote_ extern void cb_device_pin_request(bt_bdaddr_t *bd_addr, bt_bdname_t *bdname, uint32_t device_class); extern void cb_device_ssp_request(bt_bdaddr_t *bd_addr, bt_bdname_t *bdname, uint32_t device_class, bt_ssp_variant_t pairing_variant, uint32_t pass_key); +extern void cb_device_authorize_request(bt_bdaddr_t *remote_bd_addr, bt_service_id_t service_d); static bt_callbacks_t callbacks = { sizeof(callbacks), @@ -80,6 +81,7 @@ static bt_callbacks_t callbacks = { NULL, /* dut_mode_recv_callback */ NULL, /* le_test_mode_callback*/ NULL, /* energy_info_callback */ + cb_device_authorize_request, }; oal_status_t adapter_mgr_init(const bt_interface_t * stack_if) diff --git a/bt-oal/oal-device-mgr.c b/bt-oal/oal-device-mgr.c index 6d8bee0..3da8658 100755 --- a/bt-oal/oal-device-mgr.c +++ b/bt-oal/oal-device-mgr.c @@ -555,3 +555,14 @@ void cb_device_ssp_request(bt_bdaddr_t *bd_addr, bt_bdname_t *bdname, uint32_t d } send_event_bda_trace(event, event_data, size, (bt_address_t*)bd_addr); } + +void cb_device_authorize_request(bt_bdaddr_t *bd_addr, bt_service_id_t service_d) +{ + event_dev_authorize_req_t * auth_req = g_new0(event_dev_authorize_req_t, 1); + + BT_INFO("service_d: %d", service_d); + memcpy(auth_req->address.addr, bd_addr->address, 6); + auth_req->service_id = service_d; + + send_event_bda_trace(OAL_EVENT_DEVICE_AUTHORIZE_REQUEST, auth_req, sizeof(event_dev_authorize_req_t), (bt_address_t*)bd_addr); +}