diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-11-09 13:24:57 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-11-09 13:24:57 -0500 |
| commit | 1a80362a0f04c3cc571456af64f9de19c0c30d2a (patch) | |
| tree | 31916eea422d8ac861aa36a47cae832eee168ad8 /MediaBrowser.Server.Startup.Common/INativeApp.cs | |
| parent | 40897bac1494791e1ec6abcfe85cda27d4664a32 (diff) | |
created common startup project for mono & windows
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/INativeApp.cs')
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/INativeApp.cs | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Startup.Common/INativeApp.cs b/MediaBrowser.Server.Startup.Common/INativeApp.cs new file mode 100644 index 000000000..5042e1cea --- /dev/null +++ b/MediaBrowser.Server.Startup.Common/INativeApp.cs @@ -0,0 +1,88 @@ +using MediaBrowser.Common.Net; +using MediaBrowser.Model.Logging; +using System.Collections.Generic; +using System.Reflection; + +namespace MediaBrowser.Server.Startup.Common +{ + public interface INativeApp + { + /// <summary> + /// Gets the assemblies with parts. + /// </summary> + /// <returns>List<Assembly>.</returns> + List<Assembly> GetAssembliesWithParts(); + + /// <summary> + /// Authorizes the server. + /// </summary> + /// <param name="httpServerPort">The HTTP server port.</param> + /// <param name="httpServerUrlPrefix">The HTTP server URL prefix.</param> + /// <param name="udpPort">The UDP port.</param> + /// <param name="tempDirectory">The temporary directory.</param> + void AuthorizeServer(int httpServerPort, string httpServerUrlPrefix, int udpPort, string tempDirectory); + + /// <summary> + /// Gets the environment. + /// </summary> + /// <value>The environment.</value> + NativeEnvironment Environment { get; } + + /// <summary> + /// Gets a value indicating whether [supports running as service]. + /// </summary> + /// <value><c>true</c> if [supports running as service]; otherwise, <c>false</c>.</value> + bool SupportsRunningAsService { get; } + + /// <summary> + /// Gets a value indicating whether this instance is running as service. + /// </summary> + /// <value><c>true</c> if this instance is running as service; otherwise, <c>false</c>.</value> + bool IsRunningAsService { get; } + + /// <summary> + /// Gets a value indicating whether this instance can self restart. + /// </summary> + /// <value><c>true</c> if this instance can self restart; otherwise, <c>false</c>.</value> + bool CanSelfRestart { get; } + + /// <summary> + /// Gets a value indicating whether [supports autorun at startup]. + /// </summary> + /// <value><c>true</c> if [supports autorun at startup]; otherwise, <c>false</c>.</value> + bool SupportsAutoRunAtStartup { get; } + + /// <summary> + /// Gets a value indicating whether this instance can self update. + /// </summary> + /// <value><c>true</c> if this instance can self update; otherwise, <c>false</c>.</value> + bool CanSelfUpdate { get; } + + /// <summary> + /// Shutdowns this instance. + /// </summary> + void Shutdown(); + + /// <summary> + /// Restarts this instance. + /// </summary> + void Restart(); + + /// <summary> + /// Configures the automatic run. + /// </summary> + /// <param name="autorun">if set to <c>true</c> [autorun].</param> + void ConfigureAutoRun(bool autorun); + + /// <summary> + /// Gets the network manager. + /// </summary> + /// <returns>INetworkManager.</returns> + INetworkManager CreateNetworkManager(ILogger logger); + + /// <summary> + /// Prevents the system stand by. + /// </summary> + void PreventSystemStandby(); + } +} |
