aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Core/Search/ISearchService.cs
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-06-14 20:03:36 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-06-14 20:03:36 -0500
commit050be311e68bb316cfc40fbd23bfd5a812e1a060 (patch)
tree1476cba9e90845f224bbc0a380e4633697e1306e /src/slskd/Core/Search/ISearchService.cs
parent4cf8f8fa862b08131e9cc51c4bad3d6c9838342b (diff)
downloadslskd-050be311e68bb316cfc40fbd23bfd5a812e1a060.tar.gz
move stuff around
Diffstat (limited to 'src/slskd/Core/Search/ISearchService.cs')
-rw-r--r--src/slskd/Core/Search/ISearchService.cs66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/slskd/Core/Search/ISearchService.cs b/src/slskd/Core/Search/ISearchService.cs
deleted file mode 100644
index d696617d..00000000
--- a/src/slskd/Core/Search/ISearchService.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-// <copyright file="ISearchService.cs" company="slskd Team">
-// Copyright (c) slskd Team. All rights reserved.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published
-// by the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program 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 Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with this program. If not, see https://www.gnu.org/licenses/.
-// </copyright>
-
-namespace slskd.Search
-{
- using System;
- using System.Collections.Generic;
- using System.Linq.Expressions;
- using System.Threading.Tasks;
- using SearchOptions = Soulseek.SearchOptions;
- using SearchQuery = Soulseek.SearchQuery;
- using SearchScope = Soulseek.SearchScope;
-
- /// <summary>
- /// Handles the lifecycle and persistence of searches.
- /// </summary>
- 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> CreateAsync(Guid id, SearchQuery query, SearchScope scope, SearchOptions options = null);
-
- /// <summary>
- /// Finds a single search matching the specified <paramref name="expression"/>.
- /// </summary>
- /// <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>
- 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.
- /// </summary>
- /// <param name="expression">An optional expression used to match searches.</param>
- /// <returns>The list of searches matching the specified expression.</returns>
- Task<List<Search>> ListAsync(Expression<Func<Search, bool>> expression = 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>
- /// <returns>A value indicating whether the search was sucessfully cancelled.</returns>
- bool TryCancel(Guid id);
- }
-} \ No newline at end of file