From 88e1aac548cdc6a8bd9cad51c288e61f935ea7cf Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 15 Oct 2022 15:39:09 -0500 Subject: add some methods for managing agent hosts --- src/slskd/Shares/IShareService.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/slskd/Shares/IShareService.cs') diff --git a/src/slskd/Shares/IShareService.cs b/src/slskd/Shares/IShareService.cs index b55db482..f0c474a1 100644 --- a/src/slskd/Shares/IShareService.cs +++ b/src/slskd/Shares/IShareService.cs @@ -31,6 +31,11 @@ namespace slskd.Shares /// IReadOnlyList Hosts { get; } + /// + /// Gets the local share host. + /// + Host LocalHost { get; } + /// /// Gets the state monitor for the service. /// @@ -55,6 +60,14 @@ namespace slskd.Shares /// The operation context. Task DumpAsync(string filename); + /// + /// Returns the share host with the specified . + /// + /// The name of the host. + /// The host, if found. + /// A value indicating whether the host was found. + bool TryGetHost(string name, out Host host); + /// /// Returns the contents of the specified . /// @@ -62,6 +75,13 @@ namespace slskd.Shares /// The contents of the directory. Task ListDirectoryAsync(string directory); + /// + /// Removes the share host with the specified . + /// + /// The name of the host. + /// A value indicating whether the host was removed. + bool TryRemoveHost(string name); + /// /// Resolves the local filename of the specified , if the mask is associated with a /// configured share. -- cgit v1.2.3