INotificationService.cs 1022 B

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