2014-04-27 03:42:05 +00:00
|
|
|
|
using MediaBrowser.Model.Notifications;
|
2014-04-25 20:15:50 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2017-10-16 06:10:55 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2014-04-25 20:15:50 +00:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Notifications
|
|
|
|
|
{
|
|
|
|
|
public interface INotificationManager
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sends the notification.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request">The request.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task SendNotification(NotificationRequest request, CancellationToken cancellationToken);
|
|
|
|
|
|
2017-10-16 06:10:55 +00:00
|
|
|
|
Task SendNotification(NotificationRequest request, BaseItem relatedItem, CancellationToken cancellationToken);
|
|
|
|
|
|
2014-04-25 20:15:50 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Adds the parts.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="services">The services.</param>
|
2014-04-27 03:42:05 +00:00
|
|
|
|
/// <param name="notificationTypeFactories">The notification type factories.</param>
|
|
|
|
|
void AddParts(IEnumerable<INotificationService> services, IEnumerable<INotificationTypeFactory> notificationTypeFactories);
|
2014-04-25 20:15:50 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2014-04-27 03:42:05 +00:00
|
|
|
|
/// Gets the notification types.
|
2014-04-25 20:15:50 +00:00
|
|
|
|
/// </summary>
|
2014-04-27 03:42:05 +00:00
|
|
|
|
/// <returns>IEnumerable{NotificationTypeInfo}.</returns>
|
2017-08-19 19:43:35 +00:00
|
|
|
|
List<NotificationTypeInfo> GetNotificationTypes();
|
2014-04-25 20:15:50 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2014-04-27 03:42:05 +00:00
|
|
|
|
/// Gets the notification services.
|
2014-04-25 20:15:50 +00:00
|
|
|
|
/// </summary>
|
2014-04-27 03:42:05 +00:00
|
|
|
|
/// <returns>IEnumerable{NotificationServiceInfo}.</returns>
|
|
|
|
|
IEnumerable<NotificationServiceInfo> GetNotificationServices();
|
2014-04-25 20:15:50 +00:00
|
|
|
|
}
|
|
|
|
|
}
|