diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-08-22 14:15:43 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-08-22 14:15:43 +0000 |
commit | 84aca873392c957faa5974485633ce4081a416e2 (patch) | |
tree | 960000aed03bc9b642decc28c6378d65088f42cf /audio/sink.c | |
parent | 674a1d6355ebd5c1e9ffc2e7663b747f60ac70b5 (diff) |
Add Playing and Stopped signals to sink inteface.
Diffstat (limited to 'audio/sink.c')
-rw-r--r-- | audio/sink.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/audio/sink.c b/audio/sink.c index c09c019f..8141eff5 100644 --- a/audio/sink.c +++ b/audio/sink.c @@ -113,9 +113,19 @@ static void stream_state_changed(struct avdtp_stream *stream, AUDIO_SINK_INTERFACE, "Connected", DBUS_TYPE_INVALID); + else if (old_state == AVDTP_STATE_STREAMING) + dbus_connection_emit_signal(dev->conn, dev->path, + AUDIO_SINK_INTERFACE, + "Stopped", + DBUS_TYPE_INVALID); break; - case AVDTP_STATE_CONFIGURED: case AVDTP_STATE_STREAMING: + dbus_connection_emit_signal(dev->conn, dev->path, + AUDIO_SINK_INTERFACE, + "Playing", + DBUS_TYPE_INVALID); + break; + case AVDTP_STATE_CONFIGURED: case AVDTP_STATE_CLOSING: case AVDTP_STATE_ABORTING: default: @@ -259,6 +269,8 @@ static DBusMethodVTable sink_methods[] = { static DBusSignalVTable sink_signals[] = { { "Connected", "" }, { "Disconnected", "" }, + { "Playing", "" }, + { "Stopped", "" }, { NULL, NULL } }; |