Move the volume changed event path from AVRCP to HEADSET
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-event-handler.c
index ea3d35e..f0167ea 100644 (file)
@@ -1386,7 +1386,24 @@ void __bt_headset_event_filter(GDBusConnection *connection,
                _bt_headset_event_cb(BLUETOOTH_EVENT_AG_MIC_GAIN,
                                result, &gain,
                                event_info->cb, event_info->user_data);
+#ifdef TIZEN_FEATURE_BT_AVC_TARGET
+       } else if (strcasecmp(signal_name, BT_AUDIO_AVC_MODE_CHANGED) == 0) {
+               bool mode;
+
+               g_variant_get(parameters, "(b)", &mode);
+
+               _bt_headset_event_cb(BLUETOOTH_EVENT_AUDIO_AVC_STATUS,
+                               result, &mode,
+                               event_info->cb, event_info->user_data);
+       } else if (strcasecmp(signal_name, BT_MEDIA_VOLUME_CHANGE) == 0) {
+               unsigned int volume;
+
+               g_variant_get(parameters, "(u)", &volume);
+               _bt_avrcp_event_cb(BLUETOOTH_EVENT_AVRCP_VOLUME_CHANGED,
+                               result, &volume,
+                               event_info->cb, event_info->user_data);
        }
+#endif
 }
 
 void __bt_hid_device_event_filter(GDBusConnection *connection,