// Kyoo - A portable and vast media library solution.
// Copyright (c) Kyoo.
//
// See AUTHORS.md and LICENSE file in the project root for full license information.
//
// Kyoo is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// Kyoo is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Kyoo. If not, see .
using System.Threading.Tasks;
using Kyoo.Abstractions.Models;
using Kyoo.Abstractions.Models.Utils;
namespace Kyoo.Abstractions.Controllers;
///
/// The service to search items.
///
public interface ISearchManager
{
///
/// Search for items.
///
/// The seach query.
/// Sort information about the query (sort by, sort order)
/// How pagination should be done (where to start and how many to return)
/// The related fields to include.
/// A list of resources that match every filters
public Task.SearchResult> SearchItems(string? query,
Sort sortBy,
SearchPagination pagination,
Include? include = default);
///
/// Search for movies.
///
/// The seach query.
/// Sort information about the query (sort by, sort order)
/// How pagination should be done (where to start and how many to return)
/// The related fields to include.
/// A list of resources that match every filters
public Task.SearchResult> SearchMovies(string? query,
Sort sortBy,
SearchPagination pagination,
Include? include = default);
///
/// Search for shows.
///
/// The seach query.
/// Sort information about the query (sort by, sort order)
/// How pagination should be done (where to start and how many to return)
/// The related fields to include.
/// A list of resources that match every filters
public Task.SearchResult> SearchShows(string? query,
Sort sortBy,
SearchPagination pagination,
Include? include = default);
///
/// Search for collections.
///
/// The seach query.
/// Sort information about the query (sort by, sort order)
/// How pagination should be done (where to start and how many to return)
/// The related fields to include.
/// A list of resources that match every filters
public Task.SearchResult> SearchCollections(string? query,
Sort sortBy,
SearchPagination pagination,
Include? include = default);
///
/// Search for episodes.
///
/// The seach query.
/// Sort information about the query (sort by, sort order)
/// How pagination should be done (where to start and how many to return)
/// The related fields to include.
/// A list of resources that match every filters
public Task.SearchResult> SearchEpisodes(string? query,
Sort sortBy,
SearchPagination pagination,
Include? include = default);
///
/// Search for studios.
///
/// The seach query.
/// Sort information about the query (sort by, sort order)
/// How pagination should be done (where to start and how many to return)
/// The related fields to include.
/// A list of resources that match every filters
public Task.SearchResult> SearchStudios(string? query,
Sort sortBy,
SearchPagination pagination,
Include? include = default);
}