#include "bt-service-common.h"
#include "bt-service-audio-common.h"
+#include "bt-service-event.h"
static unsigned int absolute_volume = 0;
static unsigned int bt_volume = 0;
-static int avc_mode = BT_AVC_OFF;
+static unsigned int avc_mode = BT_AVC_OFF;
int _bt_audio_set_absolute_volume(unsigned int volume)
{
return BLUETOOTH_ERROR_NONE;
}
+int _bt_audio_get_avc_mode(unsigned int *mode)
+{
+ /* 1. AVC mode in the vconf value */
+
+ /* 2. Get active A2DP headset path */
+
+ /* 3. Get volume info for activae transport for the path */
+
+ *mode = avc_mode;
+
+ return BLUETOOTH_ERROR_NONE;
+}
+
+int _bt_audio_notify_avc_mode_changed(unsigned int avc_mode)
+{
+ GVariant *param = g_variant_new("(u)", avc_mode);
+
+ _bt_send_event(BT_AUDIO_AVC_EVENT,
+ BLUETOOTH_EVENT_AUDIO_AVC_MODE_CHANGED,
+ param);
+
+ return BLUETOOTH_ERROR_NONE;
+}
+
/* 1. When a2dp headset is connected, we should set 'AVC' mode into pulseaudio */
/* 2. If the avc mode is changed, we should inform 'AVC' mode to pulseaudio */
/* 3. If BT is off, we should send 'AVC' off mode event for application */