diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2022-07-24 13:12:07 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2022-07-24 13:12:07 -0500 |
| commit | dbf9a8742745708d7d9da8f1de12e726f06bd7fc (patch) | |
| tree | ea4ca57c0bf5988303d9cb3a15270f81639e18de /src/slskd/Search/ISearchService.cs | |
| parent | dab3ae049eacce25c9e44f16ac82ba27ab0357fc (diff) | |
| download | slskd-dbf9a8742745708d7d9da8f1de12e726f06bd7fc.tar.gz | |
docs
Diffstat (limited to 'src/slskd/Search/ISearchService.cs')
| -rw-r--r-- | src/slskd/Search/ISearchService.cs | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/src/slskd/Search/ISearchService.cs b/src/slskd/Search/ISearchService.cs index 9a45280b..4fe15fae 100644 --- a/src/slskd/Search/ISearchService.cs +++ b/src/slskd/Search/ISearchService.cs @@ -21,9 +21,7 @@ namespace slskd.Search using System.Collections.Generic; using System.Linq.Expressions; using System.Threading.Tasks; - using SearchOptions = Soulseek.SearchOptions; - using SearchQuery = Soulseek.SearchQuery; - using SearchScope = Soulseek.SearchScope; + using Soulseek; /// <summary> /// Handles the lifecycle and persistence of searches. @@ -31,16 +29,6 @@ namespace slskd.Search public interface ISearchService { /// <summary> - /// Performs a search for the specified <paramref name="query"/> and <paramref name="scope"/>. - /// </summary> - /// <param name="id">A unique identifier for the search.</param> - /// <param name="query">The search query.</param> - /// <param name="scope">The search scope.</param> - /// <param name="options">Search options.</param> - /// <returns>The completed search.</returns> - Task<Search> StartAsync(Guid id, SearchQuery query, SearchScope scope, SearchOptions options = null); - - /// <summary> /// Deletes the specified ssearch. /// </summary> /// <param name="search">The search to delete.</param> @@ -53,17 +41,27 @@ namespace slskd.Search /// <param name="expression">The expression to use to match searches.</param> /// <param name="includeResponses">A value indicating whether to include search responses in the result.</param> /// <returns>The found search, or default if not found.</returns> - /// <exception cref="ArgumentException">Thrown an expression is not supplied.</exception> + /// <exception cref="ArgumentException">Thrown when an expression is not supplied.</exception> Task<Search> FindAsync(Expression<Func<Search, bool>> expression, bool includeResponses = false); /// <summary> - /// Returns a list of all completed and in-progress searches, with responses omitted. + /// Returns a list of all completed and in-progress searches, with responses omitted, matching the optional <paramref name="expression"/>. /// </summary> /// <param name="expression">An optional expression used to match searches.</param> - /// <returns>The list of searches matching the specified expression.</returns> + /// <returns>The list of searches matching the specified expression, or all searches if no expression is specified.</returns> Task<List<Search>> ListAsync(Expression<Func<Search, bool>> expression = null); /// <summary> + /// Performs a search for the specified <paramref name="query"/> and <paramref name="scope"/>. + /// </summary> + /// <param name="id">A unique identifier for the search.</param> + /// <param name="query">The search query.</param> + /// <param name="scope">The search scope.</param> + /// <param name="options">Search options.</param> + /// <returns>The completed search.</returns> + Task<Search> StartAsync(Guid id, SearchQuery query, SearchScope scope, SearchOptions options = null); + + /// <summary> /// Cancels the search matching the specified <paramref name="id"/>, if it is in progress. /// </summary> /// <param name="id">The unique identifier for the search.</param> |
