fixes around http response caching, updated the mb icon in the dashboard, and isolated web socket events

This commit is contained in:
LukePulverenti
2013-03-01 16:22:34 -05:00
parent 4c50301e7c
commit fe3323a492
20 changed files with 337 additions and 133 deletions

View File

@@ -23,6 +23,11 @@ namespace MediaBrowser.Common.Kernel
where TConfigurationType : BaseApplicationConfiguration, new()
where TApplicationPathsType : IApplicationPaths
{
/// <summary>
/// Occurs when [has pending restart changed].
/// </summary>
public event EventHandler HasPendingRestartChanged;
#region ConfigurationUpdated Event
/// <summary>
/// Occurs when [configuration updated].
@@ -126,7 +131,7 @@ namespace MediaBrowser.Common.Kernel
/// Gets or sets the TCP manager.
/// </summary>
/// <value>The TCP manager.</value>
public IServerManager ServerManager { get; private set; }
private IServerManager ServerManager { get; set; }
/// <summary>
/// Gets the plug-in security manager.
@@ -284,7 +289,7 @@ namespace MediaBrowser.Common.Kernel
{
HasPendingRestart = true;
ServerManager.SendWebSocketMessage("HasPendingRestartChanged", GetSystemInfo());
EventHelper.QueueEventIfNotNull(HasPendingRestartChanged, this, EventArgs.Empty, Logger);
}
/// <summary>

View File

@@ -13,6 +13,11 @@ namespace MediaBrowser.Common.Kernel
/// </summary>
public interface IKernel : IDisposable
{
/// <summary>
/// Occurs when [has pending restart changed].
/// </summary>
event EventHandler HasPendingRestartChanged;
/// <summary>
/// Gets the application paths.
/// </summary>
@@ -84,12 +89,6 @@ namespace MediaBrowser.Common.Kernel
/// <value>The HTTP server URL prefix.</value>
string HttpServerUrlPrefix { get; }
/// <summary>
/// Gets the TCP manager.
/// </summary>
/// <value>The TCP manager.</value>
IServerManager ServerManager { get; }
/// <summary>
/// Gets the plug-in security manager.
/// </summary>

View File

@@ -79,7 +79,6 @@
<Compile Include="Net\WebSocketConnectEventArgs.cs" />
<Compile Include="Net\WebSocketMessageType.cs" />
<Compile Include="Net\WebSocketState.cs" />
<Compile Include="Plugins\BaseUiPlugin.cs" />
<Compile Include="Plugins\IPlugin.cs" />
<Compile Include="Plugins\IUIPlugin.cs" />
<Compile Include="Progress\ActionableProgress.cs" />

View File

@@ -251,18 +251,6 @@ namespace MediaBrowser.Common.Plugins
}
}
/// <summary>
/// Returns true or false indicating if the plugin should be downloaded and run within the Ui.
/// </summary>
/// <value><c>true</c> if [download to UI]; otherwise, <c>false</c>.</value>
public virtual bool DownloadToUi
{
get
{
return false;
}
}
/// <summary>
/// Gets the logger.
/// </summary>
@@ -422,7 +410,7 @@ namespace MediaBrowser.Common.Plugins
var info = new PluginInfo
{
Name = Name,
DownloadToUI = DownloadToUi,
DownloadToUI = this is IUIPlugin,
Version = Version.ToString(),
AssemblyFileName = AssemblyFileName,
ConfigurationDateLastModified = ConfigurationDateLastModified,

View File

@@ -1,30 +0,0 @@
using MediaBrowser.Model.Plugins;
using System;
namespace MediaBrowser.Common.Plugins
{
/// <summary>
/// Represents a common base class for any plugin that has ui components
/// </summary>
public abstract class BaseUiPlugin<TConfigurationType> : BasePlugin<TConfigurationType>, IUIPlugin
where TConfigurationType : BasePluginConfiguration
{
/// <summary>
/// Returns true or false indicating if the plugin should be downloaded and run within the Ui.
/// </summary>
/// <value><c>true</c> if [download to UI]; otherwise, <c>false</c>.</value>
public sealed override bool DownloadToUi
{
get
{
return true;
}
}
/// <summary>
/// Gets the minimum required UI version.
/// </summary>
/// <value>The minimum required UI version.</value>
public abstract Version MinimumRequiredUIVersion { get; }
}
}

View File

@@ -92,12 +92,6 @@ namespace MediaBrowser.Common.Plugins
/// <value>The data folder path.</value>
string DataFolderPath { get; }
/// <summary>
/// Returns true or false indicating if the plugin should be downloaded and run within the Ui.
/// </summary>
/// <value><c>true</c> if [download to UI]; otherwise, <c>false</c>.</value>
bool DownloadToUi { get; }
/// <summary>
/// Gets the logger.
/// </summary>