BaseService.cs 1.2 KB

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