BaseService.cs 1.3 KB

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