rework notifications infrastructure

This commit is contained in:
Luke Pulverenti
2014-04-25 16:15:50 -04:00
parent eda8159b44
commit 547291f048
34 changed files with 455 additions and 323 deletions

View File

@@ -1,8 +1,7 @@
using System.Threading;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Notifications;
using MediaBrowser.Model.Notifications;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Notifications
@@ -44,7 +43,7 @@ namespace MediaBrowser.Controller.Notifications
/// <param name="id">The id.</param>
/// <param name="userId">The user id.</param>
/// <returns>Notification.</returns>
Notification GetNotification(Guid id, Guid userId);
Notification GetNotification(string id, string userId);
/// <summary>
/// Adds the notification.
@@ -54,14 +53,6 @@ namespace MediaBrowser.Controller.Notifications
/// <returns>Task.</returns>
Task AddNotification(Notification notification, CancellationToken cancellationToken);
/// <summary>
/// Updates the notification.
/// </summary>
/// <param name="notification">The notification.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task UpdateNotification(Notification notification, CancellationToken cancellationToken);
/// <summary>
/// Marks the read.
/// </summary>
@@ -70,13 +61,13 @@ namespace MediaBrowser.Controller.Notifications
/// <param name="isRead">if set to <c>true</c> [is read].</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
Task MarkRead(IEnumerable<Guid> notificationIdList, Guid userId, bool isRead, CancellationToken cancellationToken);
Task MarkRead(IEnumerable<string> notificationIdList, string userId, bool isRead, CancellationToken cancellationToken);
/// <summary>
/// Gets the notifications summary.
/// </summary>
/// <param name="userId">The user id.</param>
/// <returns>NotificationsSummary.</returns>
NotificationsSummary GetNotificationsSummary(Guid userId);
NotificationsSummary GetNotificationsSummary(string userId);
}
}