[rygel] core: Correctly handle boolean commandline options
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rygel] core: Correctly handle boolean commandline options
- Date: Tue, 19 Jan 2010 15:04:24 +0000 (UTC)
commit e3eef3ec6a394bd13f31f86c8c4335f122259b43
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Jan 19 16:00:57 2010 +0200
core: Correctly handle boolean commandline options
src/rygel/rygel-cmdline-config.vala | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/src/rygel/rygel-cmdline-config.vala b/src/rygel/rygel-cmdline-config.vala
index 11597a0..3da94fa 100644
--- a/src/rygel/rygel-cmdline-config.vala
+++ b/src/rygel/rygel-cmdline-config.vala
@@ -134,19 +134,35 @@ public class Rygel.CmdlineConfig : GLib.Object, Configuration {
}
public bool get_transcoding () throws GLib.Error {
- return !no_transcoding;
+ if (!no_transcoding) {
+ throw new ConfigurationError.NO_VALUE_SET ("No value available");
+ } else {
+ return false;
+ }
}
public bool get_mp3_transcoder () throws GLib.Error {
- return !no_mp3_trans;
+ if (!no_mp3_trans) {
+ throw new ConfigurationError.NO_VALUE_SET ("No value available");
+ } else {
+ return false;
+ }
}
public bool get_mp2ts_transcoder () throws GLib.Error {
- return !no_mp2ts_trans;
+ if (!no_mp2ts_trans) {
+ throw new ConfigurationError.NO_VALUE_SET ("No value available");
+ } else {
+ return false;
+ }
}
public bool get_lpcm_transcoder () throws GLib.Error {
- return !no_lpcm_trans;
+ if (!no_lpcm_trans) {
+ throw new ConfigurationError.NO_VALUE_SET ("No value available");
+ } else {
+ return false;
+ }
}
public LogLevel get_log_level () throws GLib.Error {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]