INotificationManager.cs 1.5 KB

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