2013-01-30 06:52:31 +00:00
|
|
|
|
using NLog;
|
2013-02-24 06:48:52 +00:00
|
|
|
|
using NzbDrone.Core.Configuration;
|
2013-02-19 06:01:03 +00:00
|
|
|
|
using NzbDrone.Core.Tv;
|
2011-04-29 06:06:13 +00:00
|
|
|
|
using NzbDrone.Core.Providers.Core;
|
|
|
|
|
using NzbDrone.Core.Repository;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Providers.ExternalNotification
|
|
|
|
|
{
|
2011-07-28 07:21:49 +00:00
|
|
|
|
public abstract class ExternalNotificationBase
|
2011-04-29 06:06:13 +00:00
|
|
|
|
{
|
|
|
|
|
protected readonly Logger _logger;
|
2013-02-24 06:48:52 +00:00
|
|
|
|
protected readonly IConfigService _configService;
|
2011-04-29 06:06:13 +00:00
|
|
|
|
|
2013-02-24 06:48:52 +00:00
|
|
|
|
protected ExternalNotificationBase(IConfigService configService)
|
2011-04-29 06:06:13 +00:00
|
|
|
|
{
|
2013-02-24 06:48:52 +00:00
|
|
|
|
_configService = configService;
|
2011-04-29 06:06:13 +00:00
|
|
|
|
_logger = LogManager.GetLogger(GetType().ToString());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the name for the notification provider
|
|
|
|
|
/// </summary>
|
|
|
|
|
public abstract string Name { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Performs the on grab action
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name = "message">The message to send to the receiver</param>
|
|
|
|
|
public abstract void OnGrab(string message);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Performs the on download action
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name = "message">The message to send to the receiver</param>
|
2011-07-09 18:19:33 +00:00
|
|
|
|
/// <param name = "series">The Series for the new download</param>
|
|
|
|
|
public abstract void OnDownload(string message, Series series);
|
2011-04-29 06:06:13 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Performs the on rename action
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name = "message">The message to send to the receiver</param>
|
2011-07-09 18:19:33 +00:00
|
|
|
|
/// <param name = "series">The Series for the new download</param>
|
|
|
|
|
public abstract void OnRename(string message, Series series);
|
2012-01-05 03:40:25 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Performs the after rename action, this will be handled after all renaming for episode/season/series
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name = "message">The message to send to the receiver</param>
|
|
|
|
|
/// <param name = "series">The Series for the new download</param>
|
|
|
|
|
public abstract void AfterRename(string message, Series series);
|
2011-04-29 06:06:13 +00:00
|
|
|
|
}
|
|
|
|
|
}
|