diff options
author | Sangchul Lee <sc11.lee@samsung.com> | 2017-09-27 11:51:46 +0900 |
---|---|---|
committer | Sangchul Lee <sc11.lee@samsung.com> | 2017-11-06 17:22:17 +0900 |
commit | 65f128f3c00d4a169e4c1f762a1b9c5a04982f1b (patch) | |
tree | 27a537fb8ecd0a332e4123115f97ba079be33ccf /common | |
parent | 20f3f1f440b7b4c130bc7a5dc3e9967873971a9e (diff) | |
download | libmm-sound-65f128f3c00d4a169e4c1f762a1b9c5a04982f1b.tar.gz libmm-sound-65f128f3c00d4a169e4c1f762a1b9c5a04982f1b.tar.bz2 libmm-sound-65f128f3c00d4a169e4c1f762a1b9c5a04982f1b.zip |
Add support for device running changed callback
- mm_sound_add_device_running_changed_callback()
- mm_sound_remove_device_running_changed_callback()
- mm_sound_is_device_running()
Functions for change of running state are added. Previous device functions
including callback could not represent a device state related to its audio streams.
Now, these new APIs provide functionality regarding the 'running' state based on
the fundamental rule of that a device will be changed to 'running' only if
any stream go through the device.
[Version] 0.12.1
[Issue Type] New APIs
Change-Id: I79c164f706a5903cd2c6c76902d69c11a55ddbc3
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/mm_sound_dbus.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/mm_sound_dbus.c b/common/mm_sound_dbus.c index f88e197..bb18bc5 100644 --- a/common/mm_sound_dbus.c +++ b/common/mm_sound_dbus.c @@ -145,6 +145,9 @@ const mm_sound_dbus_signal_info_t g_events[AUDIO_EVENT_MAX] = { [AUDIO_EVENT_DEVICE_STATE_CHANGED] = { .name = "DeviceStateChanged", }, + [AUDIO_EVENT_DEVICE_RUNNING_CHANGED] = { + .name = "DeviceRunningChanged", + }, [AUDIO_EVENT_FOCUS_CHANGED] = { .name = "FocusChanged", }, @@ -415,6 +418,8 @@ static void _dbus_signal_callback(GDBusConnection *connection, (cb_data->user_cb)(AUDIO_EVENT_PLAY_FILE_END, params, cb_data->user_data); else if (!strcmp(signal_name, g_events[AUDIO_EVENT_EMERGENT_EXIT].name)) (cb_data->user_cb)(AUDIO_EVENT_EMERGENT_EXIT, params, cb_data->user_data); + else if (!strcmp(signal_name, g_events[AUDIO_EVENT_DEVICE_RUNNING_CHANGED].name)) + (cb_data->user_cb)(AUDIO_EVENT_DEVICE_RUNNING_CHANGED, params, cb_data->user_data); } static void callback_data_free_func(gpointer data) |