Implement the event handling logic for AVC
[platform/core/connectivity/bluetooth-frwk.git] / bt-service-adaptation / services / audio / a2dp_src / bt-service-a2dp-src.c
index 8ca051d..8df461a 100644 (file)
@@ -103,6 +103,11 @@ static void __bt_handle_av_connected_state(bluetooth_device_address_t *address)
        /* Add data from the connected list */
        _bt_add_headset_to_list(BT_AUDIO_A2DP, BT_STATE_CONNECTED, addr);
 
+#ifdef TIZEN_FEATURE_BT_AVC_TARGET
+       /* Send the information to Absolute Volume Controller */
+       _bt_audio_handle_a2dp_state_changed(addr, true);
+#endif
+
        /* Delete waiting device data if present */
        wait_device = _bt_get_audio_wait_data();
        if (wait_device != NULL &&
@@ -182,6 +187,11 @@ static void __bt_handle_av_disconnected_state(bluetooth_device_address_t *addres
        /* Remove data from the connected list */
        _bt_remove_headset_from_list(BT_AUDIO_A2DP, addr);
 
+#ifdef TIZEN_FEATURE_BT_AVC_TARGET
+       /* Send the information to Absolute Volume Controller */
+       _bt_audio_handle_a2dp_state_changed(addr, false);
+#endif
+
        req_info = _bt_get_request_info_data(BT_AV_DISCONNECT, addr);
        BT_INFO("Address  of disconnected device[%s]", addr);