From 4c5f2b42fa88cab85a99b76bb8baa5c81ab86a4d Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 15 Sep 2021 08:21:49 -0500 Subject: simplify Application further --- src/slskd/Application/Application.cs | 18 ------------------ src/slskd/Application/IApplication.cs | 6 ------ 2 files changed, 24 deletions(-) (limited to 'src') 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 @@ -160,30 +160,12 @@ namespace slskd } } - /// - /// Connects the Soulseek client to the server using the configured username and password. - /// - /// The operation context. - public Task ConnectAsync() - => Client.ConnectAsync(Options.Soulseek.Username, Options.Soulseek.Password); - - /// - /// Disconnects the Soulseek client from the server. - /// - /// An optional message containing the reason for the disconnect. - /// An optional Exception to associate with the disconnect. - public void Disconnect(string message = null, Exception exception = null) - => Client.Disconnect(message, exception ?? new IntentionalDisconnectException(message)); - /// /// Re-scans shared directories. /// /// The operation context. public Task RescanSharesAsync() => SharedFileCache.FillAsync(); - public Task SearchAsync(SearchQuery query, Action 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 -- cgit v1.2.3