return OAL_STATUS_SUCCESS;
}
-oal_status_t device_create_bond(bt_address_t *addr, connection_type_e transport)
+oal_status_t device_create_bond(bt_address_t *addr, oal_conn_type_e transport)
{
int res;
bdstr_t bdstr;
return OAL_STATUS_SUCCESS;
}
+oal_status_t device_get_ida(bt_address_t *device_address, bt_address_t *id_address)
+{
+ int res;
+
+ CHECK_OAL_INITIALIZED();
+
+ OAL_CHECK_PARAMETER(device_address, return);
+
+ API_TRACE();
+
+ res = blued_api->get_device_ida((bt_bdaddr_t*) device_address, (bt_bdaddr_t*) id_address);
+
+ if (res != BT_STATUS_SUCCESS)
+ BT_ERR("get_device_IDA failed: [%s]",status2string(res));
+
+ res = convert_to_oal_status(res);
+ return res;
+}
+
oal_status_t device_accept_pin_request(bt_address_t * addr, const char * pin)
{
int res;
return res;
}
-oal_status_t device_set_osp_server(oal_osp_server_type_e type, int enable)
+oal_status_t device_register_osp_server(oal_osp_server_type_e type, char *uuid, char *path, int fd)
{
int res;
uint32_t server_type;
case OAL_OSP_SERVER_OBEX:
server_type = BT_OSP_SERVER_OBEX;
break;
+ case OAL_OSP_SERVER_RFCOMM:
+ server_type = BT_OSP_SERVER_RFCOMM;
+ break;
default:
BT_ERR("unknown type: %d", type);
return OAL_STATUS_INVALID_PARAM;
}
- res = blued_api->set_agent_osp_server(server_type, enable);
+ res = blued_api->register_agent_osp_server(server_type, uuid, path, fd);
if (res != BT_STATUS_SUCCESS) {
- BT_ERR("set_agent_osp_server error: [%s]", status2string(res));
+ BT_ERR("register_agent_osp_server error: [%s]", status2string(res));
+ return convert_to_oal_status(res);
+ }
+
+ return OAL_STATUS_SUCCESS;
+#else
+ BT_ERR("Not supported");
+ res = OAL_STATUS_NOT_SUPPORT;
+ return res;
+#endif
+}
+
+oal_status_t device_unregister_osp_server(oal_osp_server_type_e type, char *uuid)
+{
+ int res;
+ uint32_t server_type;
+
+ CHECK_OAL_INITIALIZED();
+
+ API_TRACE("type: %d", type);
+
+#ifdef TIZEN_BT_HAL
+ switch (type) {
+ case OAL_OSP_SERVER_OBEX:
+ server_type = BT_OSP_SERVER_OBEX;
+ break;
+ case OAL_OSP_SERVER_RFCOMM:
+ server_type = BT_OSP_SERVER_RFCOMM;
+ break;
+ default:
+ BT_ERR("unknown type: %d", type);
+ return OAL_STATUS_INVALID_PARAM;
+ }
+
+ res = blued_api->unregister_agent_osp_server(server_type, uuid);
+ if (res != BT_STATUS_SUCCESS) {
+ BT_ERR("unregister_agent_osp_server error: [%s]", status2string(res));
return convert_to_oal_status(res);
}
bt_acl_state_t state)
{
event_dev_conn_status_t * conn_status = g_new0(event_dev_conn_status_t, 1);
- //bt_address_t * address = g_new0(bt_address_t, 1);
oal_event_t event;
gsize size = 0;
- BT_DBG("ACL State:%d, state: %d", status, state);
-
memcpy(conn_status->address.addr, bd_addr->address, 6);
#ifdef TIZEN_BT_HAL
- conn_status->status = convert_to_oal_status(status);
+ conn_status->status = status;
#else
if (BT_STATUS_SUCCESS != status) {
/* At present only timeout will cause non-success status, later we can add more */
memcpy(conn_status->address.addr, bd_addr->address, 6);
#endif
- BT_INFO("ACL STATE :%d, conn_status->status :%d, BT_ACL_STATE: %d", status, conn_status->status, state);
+ BT_INFO("[ACL] Status: %d, State: %d", conn_status->status, state);
switch (state) {
case BT_ACL_STATE_CONNECTED:
bt_le_conn_state_t state)
{
event_dev_conn_status_t * conn_status = g_new0(event_dev_conn_status_t, 1);
- //bt_address_t * address = g_new0(bt_address_t, 1);
oal_event_t event;
gsize size = 0;
- BT_DBG("LE conn status:%d, state: %d", status, state);
memcpy(conn_status->address.addr, bd_addr->address, 6);
- conn_status->status = convert_to_oal_status(status);
+ conn_status->status = status;
+ BT_INFO("[LE ACL] Status: %d, State: %d", conn_status->status, state);
switch (state) {
case BT_LE_CONN_STATE_CONNECTED:
}
#ifdef TIZEN_BT_HAL
-void cb_socket_conn_authorize_request(bt_bdaddr_t *bd_addr, bt_uuid_t *uuid)
+void cb_socket_conn_authorize_request(bt_bdaddr_t *bd_addr, bt_uuid_t *uuid, uint8_t *name, uint8_t *path, uint32_t fd)
{
event_socket_authorize_req_t *auth_req = g_new0(event_socket_authorize_req_t, 1);
memcpy(auth_req->address.addr, bd_addr->address, 6);
memcpy(auth_req->uuid.uuid, uuid->uu, 16);
+ memcpy(auth_req->name, name, sizeof(auth_req->name) - 1);
+ memcpy(auth_req->path, path, sizeof(auth_req->path) - 1);
+ auth_req->fd = fd;
send_event_bda_trace(OAL_EVENT_SOCKET_AUTHORIZE_REQUEST, auth_req, sizeof(event_socket_authorize_req_t), (bt_address_t*)bd_addr);
}
BT_DBG("-");
}
+void cb_dbfw_plus_info_received(unsigned char *data, uint32_t length, uint8_t event_code)
+{
+ event_dev_dbfw_plus_info_t *dbfw_info;
+ int len = (length > 512)?512:length;
+
+ ret_if(data == NULL || length == 0);
+
+ dbfw_info = g_new0(event_dev_dbfw_plus_info_t, 1);
+ dbfw_info->event_code = event_code;
+ memcpy(dbfw_info->data, data, len);
+ dbfw_info->length = len;
+
+ send_event(OAL_EVENT_DEVICE_DBFW_PLUS_INFO,
+ dbfw_info, sizeof(event_dev_dbfw_plus_info_t));
+}
+
#endif