Adapt device disconnect to BT HAL framework
[platform/core/connectivity/bluetooth-frwk.git] / bt-service-adaptation / services / device / bt-service-core-device.c
index 3ba947a..dc7337d 100644 (file)
@@ -2494,4 +2494,22 @@ fail:
        return ret;
 }
 
+int _bt_disconnect_device(bluetooth_device_address_t *device_address)
+{
+       int result = OAL_STATUS_SUCCESS;
+
+       BT_DBG("+");
+
+       retv_if(!device_address, BLUETOOTH_ERROR_INVALID_PARAM);
+
+       result = device_disconnect((bt_address_t *)device_address);
+       if (result != OAL_STATUS_SUCCESS) {
+               BT_DBG("Failed to disconnect device");
+               return BLUETOOTH_ERROR_INTERNAL;
+       }
+
+       BT_DBG("-");
+       return BLUETOOTH_ERROR_NONE;
+}
+
 #endif