jellyfin/Emby.Dlna/Service/BaseService.cs

38 lines
1.3 KiB
C#
Raw Normal View History

2022-11-08 15:13:57 -05:00
#nullable disable
#pragma warning disable CS1591
using System.Net.Http;
using Emby.Dlna.Eventing;
using Microsoft.Extensions.Logging;
2016-10-29 18:22:20 -04:00
2016-10-29 18:34:54 -04:00
namespace Emby.Dlna.Service
2016-10-29 18:22:20 -04:00
{
public class BaseService : IDlnaEventManager
2016-10-29 18:22:20 -04:00
{
protected BaseService(ILogger<BaseService> logger, IHttpClientFactory httpClientFactory)
2016-10-29 18:22:20 -04:00
{
Logger = logger;
EventManager = new DlnaEventManager(logger, httpClientFactory);
2016-10-29 18:22:20 -04:00
}
protected IDlnaEventManager EventManager { get; }
2020-08-20 15:04:57 -04:00
protected ILogger Logger { get; }
2016-10-29 18:22:20 -04:00
public EventSubscriptionResponse CancelEventSubscription(string subscriptionId)
{
2020-08-20 15:04:57 -04:00
return EventManager.CancelEventSubscription(subscriptionId);
2016-10-29 18:22:20 -04:00
}
2021-02-14 09:11:46 -05:00
public EventSubscriptionResponse RenewEventSubscription(string subscriptionId, string notificationType, string requestedTimeoutString, string callbackUrl)
2016-10-29 18:22:20 -04:00
{
2021-02-14 09:11:46 -05:00
return EventManager.RenewEventSubscription(subscriptionId, notificationType, requestedTimeoutString, callbackUrl);
2016-10-29 18:22:20 -04:00
}
2021-02-14 09:11:46 -05:00
public EventSubscriptionResponse CreateEventSubscription(string notificationType, string requestedTimeoutString, string callbackUrl)
2016-10-29 18:22:20 -04:00
{
2021-02-14 09:11:46 -05:00
return EventManager.CreateEventSubscription(notificationType, requestedTimeoutString, callbackUrl);
2016-10-29 18:22:20 -04:00
}
}
}