|
|
|
@ -0,0 +1,59 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace QuickPlayer
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Application (global) configuration data class
|
|
|
|
|
/// </summary>
|
|
|
|
|
class AppConfiguration
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Configuration of the player.
|
|
|
|
|
///
|
|
|
|
|
/// Contains details about connection, configured songs &c.
|
|
|
|
|
/// </summary>
|
|
|
|
|
class PlayerConfiguration
|
|
|
|
|
{
|
|
|
|
|
public static PlayerConfiguration FromFile(StreamReader reader)
|
|
|
|
|
{
|
|
|
|
|
return null; // FIXME: Implement
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface IPlayerConfigurationProvider
|
|
|
|
|
{
|
|
|
|
|
PlayerConfiguration GetConfiguration();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sealed class NetworkConfigurationProvider : IPlayerConfigurationProvider
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sealed class FileConfigurationProvider : IPlayerConfigurationProvider
|
|
|
|
|
{
|
|
|
|
|
public readonly StreamReader reader;
|
|
|
|
|
public FileConfigurationProvider(StreamReader reader)
|
|
|
|
|
{
|
|
|
|
|
this.reader = reader;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public FileConfigurationProvider(string filename)
|
|
|
|
|
{
|
|
|
|
|
this.reader = new StreamReader(filename);
|
|
|
|
|
}
|
|
|
|
|
public PlayerConfiguration GetConfiguration()
|
|
|
|
|
{
|
|
|
|
|
return PlayerConfiguration.FromFile(reader);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sealed class DummyConfigurationProvider : IPlayerConfigurationProvider
|
|
|
|
|
{
|
|
|
|
|
public PlayerConfiguration GetConfiguration() => null;
|
|
|
|
|
}
|
|
|
|
|
}
|