diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-10-15 15:55:29 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-10-15 15:55:29 -0500 |
| commit | bfaef428f820a7a3ee7145e5c28007e09d90f4ba (patch) | |
| tree | 259f2407af751672f042a7a9980998edff77ce06 /src/slskd/Shares/IShareService.cs | |
| parent | 6981e3b3e3ae54f55e0319e0bdd1038506eae081 (diff) | |
| parent | cdf397d340a1a4c2b4c5077adce997854a0787b2 (diff) | |
| download | slskd-bfaef428f820a7a3ee7145e5c28007e09d90f4ba.tar.gz | |
Merge branch 'agent' of github.com:slskd/slskd into agent
Diffstat (limited to 'src/slskd/Shares/IShareService.cs')
| -rw-r--r-- | src/slskd/Shares/IShareService.cs | 20 |
1 files changed, 20 insertions, 0 deletions
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 @@ -32,6 +32,11 @@ namespace slskd.Shares IReadOnlyList<Host> Hosts { get; } /// <summary> + /// Gets the local share host. + /// </summary> + Host LocalHost { get; } + + /// <summary> /// Gets the state monitor for the service. /// </summary> IStateMonitor<ShareState> StateMonitor { get; } @@ -56,6 +61,14 @@ namespace slskd.Shares Task DumpAsync(string filename); /// <summary> + /// Returns the share host with the specified <paramref name="name"/>. + /// </summary> + /// <param name="name">The name of the host.</param> + /// <param name="host">The host, if found.</param> + /// <returns>A value indicating whether the host was found.</returns> + bool TryGetHost(string name, out Host host); + + /// <summary> /// Returns the contents of the specified <paramref name="directory"/>. /// </summary> /// <param name="directory">The directory for which the contents are to be listed.</param> @@ -63,6 +76,13 @@ namespace slskd.Shares Task<Directory> ListDirectoryAsync(string directory); /// <summary> + /// Removes the share host with the specified <paramref name="name"/>. + /// </summary> + /// <param name="name">The name of the host.</param> + /// <returns>A value indicating whether the host was removed.</returns> + bool TryRemoveHost(string name); + + /// <summary> /// Resolves the local filename of the specified <paramref name="remoteFilename"/>, if the mask is associated with a /// configured share. /// </summary> |
