using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Configuration;
namespace MediaBrowser.Controller.Library;
///
/// Interface for search providers.
///
public interface ISearchProvider
{
///
/// Gets the name of the provider.
///
string Name { get; }
///
/// Gets the type of the provider.
///
MetadataPluginType Type { get; }
///
/// Gets the priority of the provider. Lower values execute first.
///
int Priority { get; }
///
/// Searches for items matching the query.
///
/// The search query.
/// Cancellation token.
/// Ranked list of candidate item IDs with scores.
Task> SearchAsync(
SearchProviderQuery query,
CancellationToken cancellationToken);
///
/// Determines whether this provider can handle the given query.
///
/// The search query to evaluate.
/// True if this provider can search for the query; otherwise, false.
bool CanSearch(SearchProviderQuery query);
}