INotificationService.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. #nullable disable
  2. #pragma warning disable CS1591
  3. using System.Threading;
  4. using System.Threading.Tasks;
  5. using Jellyfin.Data.Entities;
  6. namespace MediaBrowser.Controller.Notifications
  7. {
  8. public interface INotificationService
  9. {
  10. /// <summary>
  11. /// Gets the name.
  12. /// </summary>
  13. /// <value>The name.</value>
  14. string Name { get; }
  15. /// <summary>
  16. /// Sends the notification.
  17. /// </summary>
  18. /// <param name="request">The request.</param>
  19. /// <param name="cancellationToken">The cancellation token.</param>
  20. /// <returns>Task.</returns>
  21. Task SendNotification(UserNotification request, CancellationToken cancellationToken);
  22. /// <summary>
  23. /// Determines whether [is enabled for user] [the specified user identifier].
  24. /// </summary>
  25. /// <param name="user">The user.</param>
  26. /// <returns><c>true</c> if [is enabled for user] [the specified user identifier]; otherwise, <c>false</c>.</returns>
  27. bool IsEnabledForUser(User user);
  28. }
  29. }