[FRWK]Added run time audio role select Feature
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-audio.c
index a6666ce..d9bbe18 100644 (file)
@@ -417,6 +417,24 @@ BT_EXPORT_API int bluetooth_av_source_disconnect(bluetooth_device_address_t *rem
        return result;
 }
 
+BT_EXPORT_API int bluetooth_audio_select_role(bluetooth_audio_role_t role)
+{
+       int result;
+
+       BT_CHECK_ENABLED(return);
+
+       BT_INIT_PARAMS();
+       BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
+
+       g_array_append_vals(in_param1, &role, sizeof(bluetooth_audio_role_t));
+
+       result = _bt_send_request(BT_BLUEZ_SERVICE, BT_AUDIO_SELECT_ROLE,
+               in_param1, in_param2, in_param3, in_param4, &out_param);
+
+       BT_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
+       return result;
+}
+
 BT_EXPORT_API int bluetooth_ag_get_headset_volume(unsigned int *speaker_gain)
 {
        int result;
@@ -715,7 +733,7 @@ BT_EXPORT_API int bluetooth_hf_terminate_call()
        return BLUETOOTH_ERROR_NONE;
 }
 
-BT_EXPORT_API int bluetooth_hf_initiate_call(char *number)
+BT_EXPORT_API int bluetooth_hf_initiate_call(const char *number)
 {
        GVariant *reply = NULL;
        GError *err = NULL;