INotificationManager.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using MediaBrowser.Model.Notifications;
  2. using System.Collections.Generic;
  3. using System.Threading;
  4. using System.Threading.Tasks;
  5. using MediaBrowser.Controller.Entities;
  6. namespace MediaBrowser.Controller.Notifications
  7. {
  8. public interface INotificationManager
  9. {
  10. /// <summary>
  11. /// Sends the notification.
  12. /// </summary>
  13. /// <param name="request">The request.</param>
  14. /// <param name="cancellationToken">The cancellation token.</param>
  15. /// <returns>Task.</returns>
  16. Task SendNotification(NotificationRequest request, CancellationToken cancellationToken);
  17. Task SendNotification(NotificationRequest request, BaseItem relatedItem, CancellationToken cancellationToken);
  18. /// <summary>
  19. /// Adds the parts.
  20. /// </summary>
  21. /// <param name="services">The services.</param>
  22. /// <param name="notificationTypeFactories">The notification type factories.</param>
  23. void AddParts(IEnumerable<INotificationService> services, IEnumerable<INotificationTypeFactory> notificationTypeFactories);
  24. /// <summary>
  25. /// Gets the notification types.
  26. /// </summary>
  27. /// <returns>IEnumerable{NotificationTypeInfo}.</returns>
  28. List<NotificationTypeInfo> GetNotificationTypes();
  29. /// <summary>
  30. /// Gets the notification services.
  31. /// </summary>
  32. /// <returns>IEnumerable{NotificationServiceInfo}.</returns>
  33. IEnumerable<NotificationServiceInfo> GetNotificationServices();
  34. }
  35. }