*/
oal_status_t device_set_authorized(bt_address_t * addr, int authorize);
+/**
+ * @brief Get ACL connection state for remote device
+ *
+ * @details This API is to check whether ACL connection is established with the remote device
+ *
+ * @param[in] addr: Remote device address.
+ *
+ * @return TRUE if ACL connection is established with the remote device and FALSE otherwise.
+ *
+ * @pre Adapter must be enabled with adapter_enable() followed by OAL_EVENT_ADAPTER_ENABLED
+ */
+gboolean device_get_acl_conn_state(bt_address_t * addr);
+
+/**
+ * @brief Get PROFILE connection state for remote device
+ *
+ * @details This API is to check whether requested profile connection is established with the remote device
+ *
+ * @param[in] addr: Remote device address.
+ * @param[in] svc_id: Profile Id to be checked for connection status.
+ *
+ * @return TRUE if ACL connection is established with the remote device and FALSE otherwise.
+ *
+ * @pre Adapter must be enabled with adapter_enable() followed by OAL_EVENT_ADAPTER_ENABLED
+ */
+gboolean device_get_svc_conn_state(bt_address_t * addr, oal_service_t svc_id);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
return OAL_STATUS_SUCCESS;
}
+gboolean device_get_acl_conn_state(bt_address_t * addr)
+{
+ int res;
+ bdstr_t bdstr;
+
+ CHECK_OAL_INITIALIZED();
+ OAL_CHECK_PARAMETER(addr, return);
+
+ API_TRACE("[%s]", bdt_bd2str(addr, &bdstr));
+
+ res = blued_api->get_connection_state((bt_bdaddr_t *)addr);
+ BT_ERR("get_connection_state returned: [%s]", res ? "TRUE" : "FALSE");
+
+ return res;
+}
+
+gboolean device_get_svc_conn_state(bt_address_t * addr, oal_service_t svc_id)
+{
+ int res;
+ bdstr_t bdstr;
+
+ CHECK_OAL_INITIALIZED();
+ OAL_CHECK_PARAMETER(addr, return);
+
+ API_TRACE("[%s] %d", bdt_bd2str(addr, &bdstr), svc_id);
+
+#ifdef TIZEN_BT_HAL
+ res = blued_api->get_service_connection_state((bt_bdaddr_t *)addr, svc_id);
+#else
+ BT_ERR("Not supported");
+ res = FALSE;
+#endif
+ BT_ERR("get_service_connection_state returned: [%s]", res ? "TRUE" : "FALSE");
+
+ return res;
+}
+
void cb_device_properties(bt_status_t status, bt_bdaddr_t *bd_addr,
int num_properties, bt_property_t *properties)
{
%build
-export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE -DTIZEN_BT_HAL"
+export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
%endif
%if %{bt_hal} == ENABLED
-export CFLAGS="$CFLAGS -URFCOMM_DIRECT"
+export CFLAGS="$CFLAGS -URFCOMM_DIRECT -DTIZEN_BT_HAL"
%else
export CFLAGS="$CFLAGS -DRFCOMM_DIRECT"
%endif