2
0

INotificationManager.cs 1.6 KB

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