diff options
Diffstat (limited to 'MediaBrowser.Model/Configuration')
| -rw-r--r-- | MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs | 24 | ||||
| -rw-r--r-- | MediaBrowser.Model/Configuration/ServerConfiguration.cs | 30 |
2 files changed, 54 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs new file mode 100644 index 000000000..41eb1da2c --- /dev/null +++ b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs @@ -0,0 +1,24 @@ +using ProtoBuf;
+
+namespace MediaBrowser.Model.Configuration
+{
+ /// <summary>
+ /// 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.
+ /// </summary>
+ [ProtoContract, ProtoInclude(50, typeof(ServerConfiguration))]
+ public class BaseApplicationConfiguration
+ {
+ [ProtoMember(1)]
+ public bool EnableDebugLevelLogging { get; set; }
+
+ [ProtoMember(2)]
+ public int HttpServerPortNumber { get; set; }
+
+ public BaseApplicationConfiguration()
+ {
+ HttpServerPortNumber = 8096;
+ }
+ }
+}
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs new file mode 100644 index 000000000..5bcd09ef0 --- /dev/null +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -0,0 +1,30 @@ +using MediaBrowser.Model.Weather;
+using ProtoBuf;
+
+namespace MediaBrowser.Model.Configuration
+{
+ /// <summary>
+ /// Represents the server configuration.
+ /// </summary>
+ [ProtoContract]
+ public class ServerConfiguration : BaseApplicationConfiguration
+ {
+ [ProtoMember(3)]
+ public bool EnableInternetProviders { get; set; }
+
+ [ProtoMember(4)]
+ public bool EnableUserProfiles { get; set; }
+
+ [ProtoMember(5)]
+ public string WeatherZipCode { get; set; }
+
+ [ProtoMember(6)]
+ public WeatherUnits WeatherUnit { get; set; }
+
+ public ServerConfiguration()
+ : base()
+ {
+ EnableUserProfiles = true;
+ }
+ }
+}
|
