diff options
author | Sebastian Reichel <sre@ring0.de> | 2018-06-28 01:03:02 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2018-06-28 01:53:40 +0200 |
commit | f466538a3527cd539c732d3abee481fa7a34fc2f (patch) | |
tree | 0a244c5b3594ee42d25744bdbdd3f0a44595c87b /src/audio/audio.vala | |
parent | c70d626e473c8cbdbd87125a256ca221c0c3fa23 (diff) | |
download | serial-barcode-scanner-f466538a3527cd539c732d3abee481fa7a34fc2f.tar.bz2 |
all: Add DBusError to avoid warnings with valac 0.40
Diffstat (limited to 'src/audio/audio.vala')
-rw-r--r-- | src/audio/audio.vala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/audio/audio.vala b/src/audio/audio.vala index 9afb840..ccced20 100644 --- a/src/audio/audio.vala +++ b/src/audio/audio.vala @@ -30,7 +30,7 @@ public class AudioPlayerImplementation { return true; } - public AudioPlayerImplementation(string path) throws IOError { + public AudioPlayerImplementation(string path) throws IOError, DBusError { this.path = path; var alsa = Gst.ElementFactory.make("alsasink", "alsa"); @@ -45,7 +45,7 @@ public class AudioPlayerImplementation { p.get_bus().add_watch(Priority.DEFAULT, bus_callback); } - public void play_system(string file) { + public void play_system(string file) throws IOError, DBusError { p.set_state(Gst.State.NULL); p.uri = "file://" + path + "system/" + file; p.set_state(Gst.State.PLAYING); @@ -76,15 +76,15 @@ public class AudioPlayerImplementation { return files[index]; } - public string get_random_user_theme() { + public string get_random_user_theme() throws IOError, DBusError { return get_random_file(path + "user/"); } - public string[] get_user_themes() { + public string[] get_user_themes() throws IOError, DBusError { return get_files(path + "user/"); } - public void play_user(string theme, string type) { + public void play_user(string theme, string type) throws IOError, DBusError { p.set_state(Gst.State.NULL); var file = get_random_file(path + "user/" + theme+ "/" + type); p.uri = "file://" + path + "user/" + theme+ "/" + type + "/" + file; |