From 547291f04865f23090986667b5a802cd89ea003d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 25 Apr 2014 16:15:50 -0400 Subject: rework notifications infrastructure --- .../Notifications/INotificationManager.cs | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 MediaBrowser.Controller/Notifications/INotificationManager.cs (limited to 'MediaBrowser.Controller/Notifications/INotificationManager.cs') diff --git a/MediaBrowser.Controller/Notifications/INotificationManager.cs b/MediaBrowser.Controller/Notifications/INotificationManager.cs new file mode 100644 index 0000000000..8ed62f59f7 --- /dev/null +++ b/MediaBrowser.Controller/Notifications/INotificationManager.cs @@ -0,0 +1,49 @@ +using MediaBrowser.Controller.Entities; +using MediaBrowser.Model.Notifications; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.Notifications +{ + public interface INotificationManager + { + /// + /// Sends the notification. + /// + /// The request. + /// The cancellation token. + /// Task. + Task SendNotification(NotificationRequest request, CancellationToken cancellationToken); + + /// + /// Adds the parts. + /// + /// The services. + void AddParts(IEnumerable services); + } + + public interface INotificationService + { + /// + /// Gets the name. + /// + /// The name. + string Name { get; } + + /// + /// Sends the notification. + /// + /// The request. + /// The cancellation token. + /// Task. + Task SendNotification(UserNotification request, CancellationToken cancellationToken); + + /// + /// Determines whether [is enabled for user] [the specified user identifier]. + /// + /// The user. + /// true if [is enabled for user] [the specified user identifier]; otherwise, false. + bool IsEnabledForUser(User user); + } +} -- cgit v1.2.3