#pragma warning disable CS1591
using System;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Providers;
namespace MediaBrowser.Controller.Subtitles
{
public interface ISubtitleManager
{
///
/// Occurs when [subtitle download failure].
///
event EventHandler SubtitleDownloadFailure;
///
/// Searches the subtitles.
///
/// The video.
/// Subtitle language.
/// Require perfect match.
/// Request is automated.
/// CancellationToken to use for the operation.
/// Subtitles, wrapped in task.
Task SearchSubtitles(
Video video,
string language,
bool? isPerfectMatch,
bool isAutomated,
CancellationToken cancellationToken);
///
/// Searches the subtitles.
///
/// The request.
/// The cancellation token.
/// Task{RemoteSubtitleInfo[]}.
Task SearchSubtitles(
SubtitleSearchRequest request,
CancellationToken cancellationToken);
///
/// Downloads the subtitles.
///
/// The video.
/// Subtitle ID.
/// CancellationToken to use for the operation.
/// A task.
Task DownloadSubtitles(Video video, string subtitleId, CancellationToken cancellationToken);
///
/// Downloads the subtitles.
///
/// The video.
/// Library options to use.
/// Subtitle ID.
/// CancellationToken to use for the operation.
/// A task.
Task DownloadSubtitles(Video video, LibraryOptions libraryOptions, string subtitleId, CancellationToken cancellationToken);
///
/// Upload new subtitle.
///
/// The video the subtitle belongs to.
/// The subtitle response.
/// A representing the asynchronous operation.
Task UploadSubtitle(Video video, SubtitleResponse response);
///
/// Gets the remote subtitles.
///
/// The identifier.
/// The cancellation token.
/// .
Task GetRemoteSubtitles(string id, CancellationToken cancellationToken);
///
/// Deletes the subtitles.
///
/// Media item.
/// Subtitle index.
/// A task.
Task DeleteSubtitles(BaseItem item, int index);
///
/// Gets the providers.
///
/// The media item.
/// Subtitles providers.
SubtitleProviderInfo[] GetSupportedProviders(BaseItem item);
}
}