mirror of https://github.com/jellyfin/jellyfin.git
Rename IEventManager to IDlnaEventManager
This commit is contained in:
parent
27c8cf0431
commit
da9bcc5fb3
|
@ -20,7 +20,7 @@
|
||||||
<TargetFramework>netstandard2.1</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release'" >true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release'">true</TreatWarningsAsErrors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Code Analyzers-->
|
<!-- Code Analyzers-->
|
||||||
|
|
|
@ -14,7 +14,7 @@ using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace Emby.Dlna.Eventing
|
namespace Emby.Dlna.Eventing
|
||||||
{
|
{
|
||||||
public class EventManager : IEventManager
|
public class DlnaEventManager : IDlnaEventManager
|
||||||
{
|
{
|
||||||
private readonly ConcurrentDictionary<string, EventSubscription> _subscriptions =
|
private readonly ConcurrentDictionary<string, EventSubscription> _subscriptions =
|
||||||
new ConcurrentDictionary<string, EventSubscription>(StringComparer.OrdinalIgnoreCase);
|
new ConcurrentDictionary<string, EventSubscription>(StringComparer.OrdinalIgnoreCase);
|
||||||
|
@ -22,7 +22,7 @@ namespace Emby.Dlna.Eventing
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IHttpClient _httpClient;
|
private readonly IHttpClient _httpClient;
|
||||||
|
|
||||||
public EventManager(ILogger logger, IHttpClient httpClient)
|
public DlnaEventManager(ILogger logger, IHttpClient httpClient)
|
||||||
{
|
{
|
||||||
_httpClient = httpClient;
|
_httpClient = httpClient;
|
||||||
_logger = logger;
|
_logger = logger;
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace Emby.Dlna
|
namespace Emby.Dlna
|
||||||
{
|
{
|
||||||
public interface IConnectionManager : IEventManager, IUpnpService
|
public interface IConnectionManager : IDlnaEventManager, IUpnpService
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace Emby.Dlna
|
namespace Emby.Dlna
|
||||||
{
|
{
|
||||||
public interface IContentDirectory : IEventManager, IUpnpService
|
public interface IContentDirectory : IDlnaEventManager, IUpnpService
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace Emby.Dlna
|
namespace Emby.Dlna
|
||||||
{
|
{
|
||||||
public interface IEventManager
|
public interface IDlnaEventManager
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Cancels the event subscription.
|
/// Cancels the event subscription.
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace Emby.Dlna
|
namespace Emby.Dlna
|
||||||
{
|
{
|
||||||
public interface IMediaReceiverRegistrar : IEventManager, IUpnpService
|
public interface IMediaReceiverRegistrar : IDlnaEventManager, IUpnpService
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,9 @@ using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace Emby.Dlna.Service
|
namespace Emby.Dlna.Service
|
||||||
{
|
{
|
||||||
public class BaseService : IEventManager
|
public class BaseService : IDlnaEventManager
|
||||||
{
|
{
|
||||||
protected IEventManager EventManager;
|
protected IDlnaEventManager _dlnaEventManager;
|
||||||
protected IHttpClient HttpClient;
|
protected IHttpClient HttpClient;
|
||||||
protected ILogger Logger;
|
protected ILogger Logger;
|
||||||
|
|
||||||
|
@ -17,22 +17,22 @@ namespace Emby.Dlna.Service
|
||||||
Logger = logger;
|
Logger = logger;
|
||||||
HttpClient = httpClient;
|
HttpClient = httpClient;
|
||||||
|
|
||||||
EventManager = new EventManager(logger, HttpClient);
|
_dlnaEventManager = new DlnaEventManager(logger, HttpClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EventSubscriptionResponse CancelEventSubscription(string subscriptionId)
|
public EventSubscriptionResponse CancelEventSubscription(string subscriptionId)
|
||||||
{
|
{
|
||||||
return EventManager.CancelEventSubscription(subscriptionId);
|
return _dlnaEventManager.CancelEventSubscription(subscriptionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EventSubscriptionResponse RenewEventSubscription(string subscriptionId, string notificationType, string timeoutString, string callbackUrl)
|
public EventSubscriptionResponse RenewEventSubscription(string subscriptionId, string notificationType, string timeoutString, string callbackUrl)
|
||||||
{
|
{
|
||||||
return EventManager.RenewEventSubscription(subscriptionId, notificationType, timeoutString, callbackUrl);
|
return _dlnaEventManager.RenewEventSubscription(subscriptionId, notificationType, timeoutString, callbackUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EventSubscriptionResponse CreateEventSubscription(string notificationType, string timeoutString, string callbackUrl)
|
public EventSubscriptionResponse CreateEventSubscription(string notificationType, string timeoutString, string callbackUrl)
|
||||||
{
|
{
|
||||||
return EventManager.CreateEventSubscription(notificationType, timeoutString, callbackUrl);
|
return _dlnaEventManager.CreateEventSubscription(notificationType, timeoutString, callbackUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,7 +230,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private EventSubscriptionResponse ProcessEventRequest(IEventManager eventManager)
|
private EventSubscriptionResponse ProcessEventRequest(IDlnaEventManager dlnaEventManager)
|
||||||
{
|
{
|
||||||
var subscriptionId = Request.Headers["SID"];
|
var subscriptionId = Request.Headers["SID"];
|
||||||
if (string.Equals(Request.Method, "subscribe", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(Request.Method, "subscribe", StringComparison.OrdinalIgnoreCase))
|
||||||
|
@ -241,17 +241,17 @@ namespace Jellyfin.Api.Controllers
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(notificationType))
|
if (string.IsNullOrEmpty(notificationType))
|
||||||
{
|
{
|
||||||
return eventManager.RenewEventSubscription(
|
return dlnaEventManager.RenewEventSubscription(
|
||||||
subscriptionId,
|
subscriptionId,
|
||||||
notificationType,
|
notificationType,
|
||||||
timeoutString,
|
timeoutString,
|
||||||
callback);
|
callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
return eventManager.CreateEventSubscription(notificationType, timeoutString, callback);
|
return dlnaEventManager.CreateEventSubscription(notificationType, timeoutString, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
return eventManager.CancelEventSubscription(subscriptionId);
|
return dlnaEventManager.CancelEventSubscription(subscriptionId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue