aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Notifications/INotificationService.cs
blob: 535c08795b3a73eab2b911066c8bc409dfd0660c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#nullable disable

#pragma warning disable CS1591

using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Data.Entities;

namespace MediaBrowser.Controller.Notifications
{
    public interface INotificationService
    {
        /// <summary>
        /// Gets the name.
        /// </summary>
        /// <value>The name.</value>
        string Name { get; }

        /// <summary>
        /// Sends the notification.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <param name="cancellationToken">The cancellation token.</param>
        /// <returns>Task.</returns>
        Task SendNotification(UserNotification request, CancellationToken cancellationToken);

        /// <summary>
        /// Determines whether [is enabled for user] [the specified user identifier].
        /// </summary>
        /// <param name="user">The user.</param>
        /// <returns><c>true</c> if [is enabled for user] [the specified user identifier]; otherwise, <c>false</c>.</returns>
        bool IsEnabledForUser(User user);
    }
}