BaseService.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma warning disable CS1591
  2. #pragma warning disable SA1600
  3. using Emby.Dlna.Eventing;
  4. using MediaBrowser.Common.Net;
  5. using Microsoft.Extensions.Logging;
  6. namespace Emby.Dlna.Service
  7. {
  8. public class BaseService : IEventManager
  9. {
  10. protected IEventManager EventManager;
  11. protected IHttpClient HttpClient;
  12. protected ILogger Logger;
  13. protected BaseService(ILogger<BaseService> logger, IHttpClient httpClient)
  14. {
  15. Logger = logger;
  16. HttpClient = httpClient;
  17. EventManager = new EventManager(Logger, HttpClient);
  18. }
  19. public EventSubscriptionResponse CancelEventSubscription(string subscriptionId)
  20. {
  21. return EventManager.CancelEventSubscription(subscriptionId);
  22. }
  23. public EventSubscriptionResponse RenewEventSubscription(string subscriptionId, string notificationType, string timeoutString, string callbackUrl)
  24. {
  25. return EventManager.RenewEventSubscription(subscriptionId, notificationType, timeoutString, callbackUrl);
  26. }
  27. public EventSubscriptionResponse CreateEventSubscription(string notificationType, string timeoutString, string callbackUrl)
  28. {
  29. return EventManager.CreateEventSubscription(notificationType, timeoutString, callbackUrl);
  30. }
  31. }
  32. }