Adapt HF Profile Connect & Disconnect to BT HAL framework
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / bluez_hal / src / bt-hal-bluetooth.c
index 4179595..2783924 100644 (file)
@@ -45,6 +45,7 @@
 #include <bt-hal-adapter-le.h>
 #include <bt-hal-agent.h>
 #endif
+#include <bt-hal-hf-client.h>
 
 #define enum_prop_to_hal(prop, hal_prop, type) do { \
        static type e; \
@@ -266,6 +267,9 @@ static const void *get_profile_interface(const char *profile_id)
        if (!strcmp(profile_id, BT_PROFILE_HANDSFREE_ID))
                return bt_get_hf_interface();
 
+       if (!strcmp(profile_id, BT_PROFILE_HANDSFREE_CLIENT_ID))
+               return bt_get_hf_client_interface();
+
        if (!strcmp(profile_id, BT_PROFILE_GATT_ID))
                return bt_get_gatt_interface();
 
@@ -385,6 +389,20 @@ static int enable_gap_auth_notifications(uint32_t type, uint8_t enable)
        _bt_hal_enable_gap_auth_notifications(type, ((enable == 0) ? FALSE : TRUE));
        return BT_STATUS_SUCCESS;
 }
+
+static int set_hal_adapter_request_state(int enable)
+{
+       DBG("");
+       _bt_hal_set_adapter_request_state(enable);
+       return BT_STATUS_SUCCESS;
+}
+
+static int set_hal_le_request_state(int enable)
+{
+       DBG("");
+       _bt_hal_set_le_request_state(enable);
+       return BT_STATUS_SUCCESS;
+}
 #endif
 
 static const bt_interface_t bluetooth_if = {
@@ -444,6 +462,11 @@ static const bt_interface_t bluetooth_if = {
        .enable_rssi_monitoring = enable_rssi_monitoring,
        .get_connected_link_rssi_strength = get_connected_link_rssi_strength,
        .enable_gap_auth_notifications = enable_gap_auth_notifications,
+       .set_le_static_random_address = _bt_hal_set_le_static_random_address,
+       .set_hal_adapter_request_state = set_hal_adapter_request_state,
+       .set_hal_le_request_state = set_hal_le_request_state,
+       .adapter_le_set_white_list = _bt_hal_adapter_le_set_white_list,
+       .adapter_le_set_privacy = _bt_hal_adapter_le_set_privacy,
 #endif
 };