From acd293a58a8efe20f98d8702d4823fae5ef81316 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Fri, 10 Sep 2021 18:21:23 -0500 Subject: remove I/ManagementService --- src/slskd/Application/Application.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/slskd/Application/Application.cs') diff --git a/src/slskd/Application/Application.cs b/src/slskd/Application/Application.cs index 6b95c779..fb521fdb 100644 --- a/src/slskd/Application/Application.cs +++ b/src/slskd/Application/Application.cs @@ -244,6 +244,27 @@ 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(); + private async Task OptionsMonitor_OnChange(Options newOptions) { // this code is known to fire more than once per update. i'm not sure -- cgit v1.2.3