2014-01-20 16:09:53 +00:00
|
|
|
|
using MediaBrowser.Model.FileOrganization;
|
2014-01-20 18:46:08 +00:00
|
|
|
|
using MediaBrowser.Model.Querying;
|
2014-01-19 18:08:17 +00:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Persistence
|
|
|
|
|
{
|
2014-01-20 16:09:53 +00:00
|
|
|
|
public interface IFileOrganizationRepository
|
2014-01-19 18:08:17 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Saves the result.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="result">The result.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2014-01-20 16:09:53 +00:00
|
|
|
|
Task SaveResult(FileOrganizationResult result, CancellationToken cancellationToken);
|
2014-01-19 18:08:17 +00:00
|
|
|
|
|
2014-01-21 06:10:58 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes the specified identifier.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task Delete(string id);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the result.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
/// <returns>FileOrganizationResult.</returns>
|
|
|
|
|
FileOrganizationResult GetResult(string id);
|
|
|
|
|
|
2014-01-19 18:08:17 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the results.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="query">The query.</param>
|
2014-01-20 16:09:53 +00:00
|
|
|
|
/// <returns>IEnumerable{FileOrganizationResult}.</returns>
|
2014-01-20 18:46:08 +00:00
|
|
|
|
QueryResult<FileOrganizationResult> GetResults(FileOrganizationResultQuery query);
|
2014-01-22 17:05:06 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes all.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task DeleteAll();
|
2014-01-19 18:08:17 +00:00
|
|
|
|
}
|
|
|
|
|
}
|