using MediaBrowser.Model.Updates; using ProtoBuf; namespace MediaBrowser.Model.Configuration { /// /// Serves as a common base class for the Server and UI application Configurations /// ProtoInclude tells Protobuf about subclasses, /// The number 50 can be any number, so long as it doesn't clash with any of the ProtoMember numbers either here or in subclasses. /// [ProtoContract, ProtoInclude(965, typeof(ServerConfiguration))] public class BaseApplicationConfiguration { /// /// Gets or sets a value indicating whether [enable debug level logging]. /// /// true if [enable debug level logging]; otherwise, false. [ProtoMember(1)] public bool EnableDebugLevelLogging { get; set; } /// /// Gets or sets a value indicating whether [enable HTTP level logging]. /// /// true if [enable HTTP level logging]; otherwise, false. [ProtoMember(56)] public bool EnableHttpLevelLogging { get; set; } /// /// Gets or sets the HTTP server port number. /// /// The HTTP server port number. [ProtoMember(2)] public int HttpServerPortNumber { get; set; } /// /// Enable automatically and silently updating of the application /// /// true if [enable auto update]; otherwise, false. [ProtoMember(3)] public bool EnableAutoUpdate { get; set; } /// /// Gets of sets a value indicating the level of system updates (Release, Beta, Dev) /// [ProtoMember(60)] public PackageVersionClass SystemUpdateLevel { get; set; } /// /// The number of days we should retain log files /// /// The log file retention days. [ProtoMember(5)] public int LogFileRetentionDays { get; set; } /// /// Gets or sets a value indicating whether [run at startup]. /// /// true if [run at startup]; otherwise, false. [ProtoMember(58)] public bool RunAtStartup { get; set; } /// /// Gets or sets the legacy web socket port number. /// /// The legacy web socket port number. [ProtoMember(59)] public int LegacyWebSocketPortNumber { get; set; } /// /// Gets or sets a value indicating whether this instance is first run. /// /// true if this instance is first run; otherwise, false. [ProtoMember(4)] public bool IsStartupWizardCompleted { get; set; } /// /// Initializes a new instance of the class. /// public BaseApplicationConfiguration() { HttpServerPortNumber = 8096; LegacyWebSocketPortNumber = 8945; EnableAutoUpdate = true; LogFileRetentionDays = 14; EnableHttpLevelLogging = true; #if (DEBUG) EnableDebugLevelLogging = true; #endif } } }