aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-09-15 08:21:49 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-09-15 08:21:49 -0500
commit4c5f2b42fa88cab85a99b76bb8baa5c81ab86a4d (patch)
treeddff3b4e19262a6c7d7141dee2cf0fc26778e73e /src
parent21f35bd8ee008336e204497595429011da9f1593 (diff)
downloadslskd-4c5f2b42fa88cab85a99b76bb8baa5c81ab86a4d.tar.gz
simplify Application further
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Application/Application.cs18
-rw-r--r--src/slskd/Application/IApplication.cs6
2 files changed, 0 insertions, 24 deletions
diff --git a/src/slskd/Application/Application.cs b/src/slskd/Application/Application.cs
index 528dd831..98a1ecc2 100644
--- a/src/slskd/Application/Application.cs
+++ b/src/slskd/Application/Application.cs
@@ -161,29 +161,11 @@ namespace slskd
}
/// <summary>
- /// Connects the Soulseek client to the server using the configured username and password.
- /// </summary>
- /// <returns>The operation context.</returns>
- public Task ConnectAsync()
- => Client.ConnectAsync(Options.Soulseek.Username, Options.Soulseek.Password);
-
- /// <summary>
- /// Disconnects the Soulseek client from the server.
- /// </summary>
- /// <param name="message">An optional message containing the reason for the disconnect.</param>
- /// <param name="exception">An optional Exception to associate with the disconnect.</param>
- public void Disconnect(string message = null, Exception exception = null)
- => Client.Disconnect(message, exception ?? new IntentionalDisconnectException(message));
-
- /// <summary>
/// Re-scans shared directories.
/// </summary>
/// <returns>The operation context.</returns>
public Task RescanSharesAsync() => SharedFileCache.FillAsync();
- public Task<Soulseek.Search> SearchAsync(SearchQuery query, Action<SearchResponse> responseReceived, SearchScope scope = null, int? token = null, SearchOptions options = null, CancellationToken? cancellationToken = null)
- => Client.SearchAsync(query, responseReceived, scope, token, options, cancellationToken);
-
async Task IHostedService.StartAsync(CancellationToken cancellationToken)
{
Logger.Information("Configuring client");
diff --git a/src/slskd/Application/IApplication.cs b/src/slskd/Application/IApplication.cs
index 3c8c8e44..18e4ad89 100644
--- a/src/slskd/Application/IApplication.cs
+++ b/src/slskd/Application/IApplication.cs
@@ -17,18 +17,12 @@
namespace slskd
{
- using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Hosting;
public interface IApplication : IHostedService
{
public Task CheckVersionAsync();
-
- public Task ConnectAsync();
-
- public void Disconnect(string message = null, Exception exception = null);
-
public Task RescanSharesAsync();
}
} \ No newline at end of file