From: Zeeshan Ali (Khattak) Date: Thu, 11 Jun 2009 20:01:21 +0000 (+0300) Subject: core: Handle int list options X-Git-Tag: RYGEL_0_4~333 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0314635dc88fe262fa689bccc59ba48ae5becd3f;p=profile%2Fivi%2Frygel.git core: Handle int list options --- diff --git a/src/rygel/rygel-cmdline-config.vala b/src/rygel/rygel-cmdline-config.vala index 11494ed..e433184 100644 --- a/src/rygel/rygel-cmdline-config.vala +++ b/src/rygel/rygel-cmdline-config.vala @@ -253,7 +253,27 @@ public class Rygel.CmdlineConfig : GLib.Object, Configuration { public Gee.ArrayList get_int_list (string section, string key) throws GLib.Error { - throw new ConfigurationError.NO_VALUE_SET ("No value available"); + ArrayList value = null; + foreach (var option in plugin_options) { + var tokens = option.split (":", 3); + if (tokens[0] != null && + tokens[1] != null && + tokens[2] != null && + tokens[0] == section && + tokens[1] == key) { + value = new ArrayList (); + foreach (var val_token in tokens[2].split (",", -1)) { + value.add (val_token.to_int ()); + } + break; + } + } + + if (value != null) { + return value; + } else { + throw new ConfigurationError.NO_VALUE_SET ("No value available"); + } } public bool get_bool (string section,