From 53450bd514eec97d58eb18b8a01feab36475826b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 6 Jul 2013 17:23:32 -0400 Subject: added a notifications service --- .../Notifications/INotificationsRepository.cs | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 MediaBrowser.Controller/Notifications/INotificationsRepository.cs (limited to 'MediaBrowser.Controller/Notifications/INotificationsRepository.cs') diff --git a/MediaBrowser.Controller/Notifications/INotificationsRepository.cs b/MediaBrowser.Controller/Notifications/INotificationsRepository.cs new file mode 100644 index 000000000..8790b54f4 --- /dev/null +++ b/MediaBrowser.Controller/Notifications/INotificationsRepository.cs @@ -0,0 +1,76 @@ +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); + } +} -- cgit v1.2.3