INotificationManager.cs 1.4 KB

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