Rename IEventManager to IDlnaEventManager

This commit is contained in:
Patrick Barron 2020-08-13 15:47:31 -04:00
parent 27c8cf0431
commit da9bcc5fb3
8 changed files with 17 additions and 17 deletions

View File

@ -20,7 +20,7 @@
<TargetFramework>netstandard2.1</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release'" >true</TreatWarningsAsErrors>
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release'">true</TreatWarningsAsErrors>
</PropertyGroup>
<!-- Code Analyzers-->

View File

@ -14,7 +14,7 @@ using Microsoft.Extensions.Logging;
namespace Emby.Dlna.Eventing
{
public class EventManager : IEventManager
public class DlnaEventManager : IDlnaEventManager
{
private readonly ConcurrentDictionary<string, EventSubscription> _subscriptions =
new ConcurrentDictionary<string, EventSubscription>(StringComparer.OrdinalIgnoreCase);
@ -22,7 +22,7 @@ namespace Emby.Dlna.Eventing
private readonly ILogger _logger;
private readonly IHttpClient _httpClient;
public EventManager(ILogger logger, IHttpClient httpClient)
public DlnaEventManager(ILogger logger, IHttpClient httpClient)
{
_httpClient = httpClient;
_logger = logger;

View File

@ -2,7 +2,7 @@
namespace Emby.Dlna
{
public interface IConnectionManager : IEventManager, IUpnpService
public interface IConnectionManager : IDlnaEventManager, IUpnpService
{
}
}

View File

@ -2,7 +2,7 @@
namespace Emby.Dlna
{
public interface IContentDirectory : IEventManager, IUpnpService
public interface IContentDirectory : IDlnaEventManager, IUpnpService
{
}
}

View File

@ -2,7 +2,7 @@
namespace Emby.Dlna
{
public interface IEventManager
public interface IDlnaEventManager
{
/// <summary>
/// Cancels the event subscription.

View File

@ -2,7 +2,7 @@
namespace Emby.Dlna
{
public interface IMediaReceiverRegistrar : IEventManager, IUpnpService
public interface IMediaReceiverRegistrar : IDlnaEventManager, IUpnpService
{
}
}

View File

@ -6,9 +6,9 @@ using Microsoft.Extensions.Logging;
namespace Emby.Dlna.Service
{
public class BaseService : IEventManager
public class BaseService : IDlnaEventManager
{
protected IEventManager EventManager;
protected IDlnaEventManager _dlnaEventManager;
protected IHttpClient HttpClient;
protected ILogger Logger;
@ -17,22 +17,22 @@ namespace Emby.Dlna.Service
Logger = logger;
HttpClient = httpClient;
EventManager = new EventManager(logger, HttpClient);
_dlnaEventManager = new DlnaEventManager(logger, HttpClient);
}
public EventSubscriptionResponse CancelEventSubscription(string subscriptionId)
{
return EventManager.CancelEventSubscription(subscriptionId);
return _dlnaEventManager.CancelEventSubscription(subscriptionId);
}
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)
{
return EventManager.CreateEventSubscription(notificationType, timeoutString, callbackUrl);
return _dlnaEventManager.CreateEventSubscription(notificationType, timeoutString, callbackUrl);
}
}
}

View File

@ -230,7 +230,7 @@ namespace Jellyfin.Api.Controllers
});
}
private EventSubscriptionResponse ProcessEventRequest(IEventManager eventManager)
private EventSubscriptionResponse ProcessEventRequest(IDlnaEventManager dlnaEventManager)
{
var subscriptionId = Request.Headers["SID"];
if (string.Equals(Request.Method, "subscribe", StringComparison.OrdinalIgnoreCase))
@ -241,17 +241,17 @@ namespace Jellyfin.Api.Controllers
if (string.IsNullOrEmpty(notificationType))
{
return eventManager.RenewEventSubscription(
return dlnaEventManager.RenewEventSubscription(
subscriptionId,
notificationType,
timeoutString,
callback);
}
return eventManager.CreateEventSubscription(notificationType, timeoutString, callback);
return dlnaEventManager.CreateEventSubscription(notificationType, timeoutString, callback);
}
return eventManager.CancelEventSubscription(subscriptionId);
return dlnaEventManager.CancelEventSubscription(subscriptionId);
}
}
}