From a86b71899ec52c44ddc6c3018e8cc5e9d7ff4d62 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Thu, 27 Dec 2018 18:27:57 -0500 Subject: Add GPL modules --- MediaBrowser.Model/System/Architecture.cs | 10 ++ MediaBrowser.Model/System/IEnvironmentInfo.cs | 24 +++++ MediaBrowser.Model/System/IPowerManagement.cs | 11 ++ MediaBrowser.Model/System/ISystemEvents.cs | 12 +++ MediaBrowser.Model/System/LogFile.cs | 31 ++++++ MediaBrowser.Model/System/PublicSystemInfo.cs | 41 ++++++++ MediaBrowser.Model/System/SystemInfo.cs | 140 ++++++++++++++++++++++++++ MediaBrowser.Model/System/WakeOnLanInfo.cs | 13 +++ 8 files changed, 282 insertions(+) create mode 100644 MediaBrowser.Model/System/Architecture.cs create mode 100644 MediaBrowser.Model/System/IEnvironmentInfo.cs create mode 100644 MediaBrowser.Model/System/IPowerManagement.cs create mode 100644 MediaBrowser.Model/System/ISystemEvents.cs create mode 100644 MediaBrowser.Model/System/LogFile.cs create mode 100644 MediaBrowser.Model/System/PublicSystemInfo.cs create mode 100644 MediaBrowser.Model/System/SystemInfo.cs create mode 100644 MediaBrowser.Model/System/WakeOnLanInfo.cs (limited to 'MediaBrowser.Model/System') diff --git a/MediaBrowser.Model/System/Architecture.cs b/MediaBrowser.Model/System/Architecture.cs new file mode 100644 index 0000000000..73f78cd582 --- /dev/null +++ b/MediaBrowser.Model/System/Architecture.cs @@ -0,0 +1,10 @@ +namespace MediaBrowser.Model.System +{ + public enum Architecture + { + X86 = 0, + X64 = 1, + Arm = 2, + Arm64 = 3 + } +} diff --git a/MediaBrowser.Model/System/IEnvironmentInfo.cs b/MediaBrowser.Model/System/IEnvironmentInfo.cs new file mode 100644 index 0000000000..8cf25a365f --- /dev/null +++ b/MediaBrowser.Model/System/IEnvironmentInfo.cs @@ -0,0 +1,24 @@ + +namespace MediaBrowser.Model.System +{ + public interface IEnvironmentInfo + { + MediaBrowser.Model.System.OperatingSystem OperatingSystem { get; } + string OperatingSystemName { get; } + string OperatingSystemVersion { get; } + Architecture SystemArchitecture { get; } + string GetEnvironmentVariable(string name); + void SetProcessEnvironmentVariable(string name, string value); + string StackTrace { get; } + char PathSeparator { get; } + } + + public enum OperatingSystem + { + Windows, + Linux, + OSX, + BSD, + Android + } +} diff --git a/MediaBrowser.Model/System/IPowerManagement.cs b/MediaBrowser.Model/System/IPowerManagement.cs new file mode 100644 index 0000000000..03907568cf --- /dev/null +++ b/MediaBrowser.Model/System/IPowerManagement.cs @@ -0,0 +1,11 @@ +using System; + +namespace MediaBrowser.Model.System +{ + public interface IPowerManagement + { + void PreventSystemStandby(); + void AllowSystemStandby(); + void ScheduleWake(DateTime wakeTimeUtc, string displayName); + } +} diff --git a/MediaBrowser.Model/System/ISystemEvents.cs b/MediaBrowser.Model/System/ISystemEvents.cs new file mode 100644 index 0000000000..dec8ed8c02 --- /dev/null +++ b/MediaBrowser.Model/System/ISystemEvents.cs @@ -0,0 +1,12 @@ +using System; + +namespace MediaBrowser.Model.System +{ + public interface ISystemEvents + { + event EventHandler Resume; + event EventHandler Suspend; + event EventHandler SessionLogoff; + event EventHandler SystemShutdown; + } +} diff --git a/MediaBrowser.Model/System/LogFile.cs b/MediaBrowser.Model/System/LogFile.cs new file mode 100644 index 0000000000..ba409c5423 --- /dev/null +++ b/MediaBrowser.Model/System/LogFile.cs @@ -0,0 +1,31 @@ +using System; + +namespace MediaBrowser.Model.System +{ + public class LogFile + { + /// + /// Gets or sets the date created. + /// + /// The date created. + public DateTime DateCreated { get; set; } + + /// + /// Gets or sets the date modified. + /// + /// The date modified. + public DateTime DateModified { get; set; } + + /// + /// Gets or sets the size. + /// + /// The size. + public long Size { get; set; } + + /// + /// Gets or sets the name. + /// + /// The name. + public string Name { get; set; } + } +} diff --git a/MediaBrowser.Model/System/PublicSystemInfo.cs b/MediaBrowser.Model/System/PublicSystemInfo.cs new file mode 100644 index 0000000000..b9a3260b01 --- /dev/null +++ b/MediaBrowser.Model/System/PublicSystemInfo.cs @@ -0,0 +1,41 @@ +namespace MediaBrowser.Model.System +{ + public class PublicSystemInfo + { + /// + /// Gets or sets the local address. + /// + /// The local address. + public string LocalAddress { get; set; } + + /// + /// Gets or sets the wan address. + /// + /// The wan address. + public string WanAddress { get; set; } + + /// + /// Gets or sets the name of the server. + /// + /// The name of the server. + public string ServerName { get; set; } + + /// + /// Gets or sets the version. + /// + /// The version. + public string Version { get; set; } + + /// + /// Gets or sets the operating sytem. + /// + /// The operating sytem. + public string OperatingSystem { get; set; } + + /// + /// Gets or sets the id. + /// + /// The id. + public string Id { get; set; } + } +} \ No newline at end of file diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs new file mode 100644 index 0000000000..c790731c6f --- /dev/null +++ b/MediaBrowser.Model/System/SystemInfo.cs @@ -0,0 +1,140 @@ +using MediaBrowser.Model.Updates; +using System.Collections.Generic; +using System; + +namespace MediaBrowser.Model.System +{ + /// + /// Class SystemInfo + /// + public class SystemInfo : PublicSystemInfo + { + public PackageVersionClass SystemUpdateLevel { get; set; } + + /// + /// Gets or sets the display name of the operating system. + /// + /// The display name of the operating system. + public string OperatingSystemDisplayName { get; set; } + + public string PackageName { get; set; } + + /// + /// Gets or sets a value indicating whether this instance has pending restart. + /// + /// true if this instance has pending restart; otherwise, false. + public bool HasPendingRestart { get; set; } + + public bool IsShuttingDown { get; set; } + + /// + /// Gets or sets a value indicating whether [supports library monitor]. + /// + /// true if [supports library monitor]; otherwise, false. + public bool SupportsLibraryMonitor { get; set; } + + /// + /// Gets or sets the web socket port number. + /// + /// The web socket port number. + public int WebSocketPortNumber { get; set; } + + /// + /// Gets or sets the completed installations. + /// + /// The completed installations. + public InstallationInfo[] CompletedInstallations { get; set; } + + /// + /// Gets or sets a value indicating whether this instance can self restart. + /// + /// true if this instance can self restart; otherwise, false. + public bool CanSelfRestart { get; set; } + + /// + /// Gets or sets a value indicating whether this instance can self update. + /// + /// true if this instance can self update; otherwise, false. + public bool CanSelfUpdate { get; set; } + + public bool CanLaunchWebBrowser { get; set; } + + /// + /// Gets or sets the program data path. + /// + /// The program data path. + public string ProgramDataPath { get; set; } + + /// + /// Gets or sets the items by name path. + /// + /// The items by name path. + public string ItemsByNamePath { get; set; } + + /// + /// Gets or sets the cache path. + /// + /// The cache path. + public string CachePath { get; set; } + + /// + /// Gets or sets the log path. + /// + /// The log path. + public string LogPath { get; set; } + + /// + /// Gets or sets the internal metadata path. + /// + /// The internal metadata path. + public string InternalMetadataPath { get; set; } + + /// + /// Gets or sets the transcoding temporary path. + /// + /// The transcoding temporary path. + public string TranscodingTempPath { get; set; } + + /// + /// Gets or sets the HTTP server port number. + /// + /// The HTTP server port number. + public int HttpServerPortNumber { get; set; } + + /// + /// Gets or sets a value indicating whether [enable HTTPS]. + /// + /// true if [enable HTTPS]; otherwise, false. + public bool SupportsHttps { get; set; } + + /// + /// Gets or sets the HTTPS server port number. + /// + /// The HTTPS server port number. + public int HttpsPortNumber { get; set; } + + /// + /// Gets or sets a value indicating whether this instance has update available. + /// + /// true if this instance has update available; otherwise, false. + public bool HasUpdateAvailable { get; set; } + + /// + /// Gets or sets a value indicating whether [supports automatic run at startup]. + /// + /// true if [supports automatic run at startup]; otherwise, false. + public bool SupportsAutoRunAtStartup { get; set; } + + public string EncoderLocationType { get; set; } + + public Architecture SystemArchitecture { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public SystemInfo() + { + CompletedInstallations = new InstallationInfo[] { }; + } + } +} diff --git a/MediaBrowser.Model/System/WakeOnLanInfo.cs b/MediaBrowser.Model/System/WakeOnLanInfo.cs new file mode 100644 index 0000000000..cde8671762 --- /dev/null +++ b/MediaBrowser.Model/System/WakeOnLanInfo.cs @@ -0,0 +1,13 @@ +namespace MediaBrowser.Model.System +{ + public class WakeOnLanInfo + { + public string MacAddress { get; set; } + public int Port { get; set; } + + public WakeOnLanInfo() + { + Port = 9; + } + } +} \ No newline at end of file -- cgit v1.2.3