|
|
|
@ -11,8 +11,18 @@ namespace QuickPlay
|
|
|
|
|
sealed class AppConfiguration
|
|
|
|
|
{
|
|
|
|
|
// XXX: All the fields need to be checked in overriden Equals method
|
|
|
|
|
public readonly string playerConfigUrl;
|
|
|
|
|
// Also: sensible defaults should be provided in defaultConfiguration field
|
|
|
|
|
public string playerConfigUrl;
|
|
|
|
|
|
|
|
|
|
public static AppConfiguration loadConfiguration()
|
|
|
|
|
{
|
|
|
|
|
var cfg = loadSavedConfiguration();
|
|
|
|
|
if (cfg == null)
|
|
|
|
|
{
|
|
|
|
|
cfg = defaultConfiguration;
|
|
|
|
|
}
|
|
|
|
|
return cfg;
|
|
|
|
|
}
|
|
|
|
|
public static AppConfiguration loadSavedConfiguration()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
@ -28,6 +38,10 @@ namespace QuickPlay
|
|
|
|
|
if (this != newConfig) throw new InvalidDataException("Saved configuration is different from the supplied one.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static AppConfiguration defaultConfiguration = new AppConfiguration
|
|
|
|
|
{
|
|
|
|
|
playerConfigUrl = "file:///dev/null",
|
|
|
|
|
};
|
|
|
|
|
public PlayerConfiguration GetPlayerConfig()
|
|
|
|
|
{
|
|
|
|
|
// TODO: decide sensibly
|
|
|
|
|