aboutsummaryrefslogtreecommitdiff
path: root/Emby.Dlna/Service/BaseService.cs
blob: 40d069e7cd88ac3e14dd02d7eb9ac9444dea01a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma warning disable CS1591

using Emby.Dlna.Eventing;
using MediaBrowser.Common.Net;
using Microsoft.Extensions.Logging;

namespace Emby.Dlna.Service
{
    public class BaseService : IDlnaEventManager
    {
        protected BaseService(ILogger<BaseService> logger, IHttpClient httpClient)
        {
            Logger = logger;
            HttpClient = httpClient;

            EventManager = new DlnaEventManager(logger, HttpClient);
        }

        protected IDlnaEventManager EventManager { get; }

        protected IHttpClient HttpClient { get; }

        protected ILogger Logger { get; }

        public EventSubscriptionResponse CancelEventSubscription(string subscriptionId)
        {
            return EventManager.CancelEventSubscription(subscriptionId);
        }

        public EventSubscriptionResponse RenewEventSubscription(string subscriptionId, string notificationType, string timeoutString, string callbackUrl)
        {
            return EventManager.RenewEventSubscription(subscriptionId, notificationType, timeoutString, callbackUrl);
        }

        public EventSubscriptionResponse CreateEventSubscription(string notificationType, string timeoutString, string callbackUrl)
        {
            return EventManager.CreateEventSubscription(notificationType, timeoutString, callbackUrl);
        }
    }
}