using MediaBrowser.Model.Notifications;
using System;
using System.Collections.Generic;
using System.Threading;
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;
///
/// Opens the connection to the repository
///
/// Task.
Task Initialize();
///
/// Gets the notifications.
///
/// The query.
/// NotificationResult.
NotificationResult GetNotifications(NotificationQuery query);
///
/// Gets the notification.
///
/// The id.
/// The user id.
/// Notification.
Notification GetNotification(string id, string userId);
///
/// Adds the notification.
///
/// The notification.
/// The cancellation token.
/// Task.
Task AddNotification(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, string userId, bool isRead, CancellationToken cancellationToken);
///
/// Gets the notifications summary.
///
/// The user id.
/// NotificationsSummary.
NotificationsSummary GetNotificationsSummary(string userId);
}
}