INotificationService.cs 1.0 KB

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