2014-11-23 16:10:41 -07:00
|
|
|
|
using MediaBrowser.Common.Net;
|
2014-11-09 11:24:57 -07:00
|
|
|
|
using MediaBrowser.Model.Logging;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Reflection;
|
2016-05-01 14:48:37 -07:00
|
|
|
|
using MediaBrowser.Server.Implementations.Persistence;
|
2016-04-01 21:29:48 -07:00
|
|
|
|
using MediaBrowser.Server.Startup.Common.FFMpeg;
|
2014-11-09 11:24:57 -07:00
|
|
|
|
|
|
|
|
|
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="udpPort">The UDP port.</param>
|
2014-12-27 15:52:41 -07:00
|
|
|
|
/// <param name="httpServerPort">The HTTP server port.</param>
|
2015-01-10 19:12:43 -07:00
|
|
|
|
/// <param name="httpsServerPort">The HTTPS server port.</param>
|
2014-11-09 11:24:57 -07:00
|
|
|
|
/// <param name="tempDirectory">The temporary directory.</param>
|
2016-03-26 10:51:27 -07:00
|
|
|
|
void AuthorizeServer(int udpPort, int httpServerPort, int httpsServerPort, string applicationPath, string tempDirectory);
|
2014-11-09 11:24:57 -07:00
|
|
|
|
|
|
|
|
|
/// <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>
|
2015-10-03 11:13:53 -07:00
|
|
|
|
/// Gets a value indicating whether [supports library monitor].
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value><c>true</c> if [supports library monitor]; otherwise, <c>false</c>.</value>
|
|
|
|
|
bool SupportsLibraryMonitor { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2014-11-09 11:24:57 -07:00
|
|
|
|
/// 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>
|
2015-06-05 07:27:01 -07:00
|
|
|
|
void Restart(StartupOptions startupOptions);
|
2014-11-09 11:24:57 -07:00
|
|
|
|
|
|
|
|
|
/// <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();
|
2016-01-21 10:29:14 -07:00
|
|
|
|
|
2016-04-23 11:38:36 -07:00
|
|
|
|
void AllowSystemStandby();
|
|
|
|
|
|
2016-04-01 21:29:48 -07:00
|
|
|
|
FFMpegInstallInfo GetFfmpegInstallInfo();
|
2016-04-23 20:03:49 -07:00
|
|
|
|
|
|
|
|
|
void LaunchUrl(string url);
|
2016-05-01 14:48:37 -07:00
|
|
|
|
|
|
|
|
|
IDbConnector GetDbConnector();
|
2016-09-03 10:16:36 -07:00
|
|
|
|
|
|
|
|
|
void EnableLoopback(string appName);
|
2014-11-09 11:24:57 -07:00
|
|
|
|
}
|
|
|
|
|
}
|