using System.Threading; using MediaBrowser.Controller.Persistence; using MediaBrowser.Model.Notifications; using System; using System.Collections.Generic; using System.Threading.Tasks; namespace MediaBrowser.Controller.Notifications { /// /// Interface INotificationsRepository /// public interface INotificationsRepository { /// /// Occurs when [notification added]. /// event EventHandler NotificationAdded; /// /// Occurs when [notification updated]. /// event EventHandler NotificationUpdated; /// /// Occurs when [notifications marked read]. /// event EventHandler NotificationsMarkedRead; /// /// Gets the notifications. /// /// The query. /// NotificationResult. NotificationResult GetNotifications(NotificationQuery query); /// /// Gets the notification. /// /// The id. /// The user id. /// Notification. Notification GetNotification(Guid id, Guid userId); /// /// Adds the notification. /// /// The notification. /// The cancellation token. /// Task. Task AddNotification(Notification notification, CancellationToken cancellationToken); /// /// Updates the notification. /// /// The notification. /// The cancellation token. /// Task. Task UpdateNotification(Notification notification, CancellationToken cancellationToken); /// /// Marks the read. /// /// The notification id list. /// The user id. /// if set to true [is read]. /// The cancellation token. /// Task. Task MarkRead(IEnumerable notificationIdList, Guid userId, bool isRead, CancellationToken cancellationToken); /// /// Gets the notifications summary. /// /// The user id. /// NotificationsSummary. NotificationsSummary GetNotificationsSummary(Guid userId); } }