diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-10-14 08:41:12 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-14 08:41:12 -0500 |
| commit | 593308d4e786cd569e3a683f5b02b8f13aa39b23 (patch) | |
| tree | 3555863f90065a615ce4f59fcc58d7dcd818e8ed /src/slskd/Shares/IShareService.cs | |
| parent | dc1e6a63db9ff87813633963b2f3d7acc60d2709 (diff) | |
| parent | fe03a44d359e3bcd39447609a0aa15b8492e5306 (diff) | |
| download | slskd-593308d4e786cd569e3a683f5b02b8f13aa39b23.tar.gz | |
Merge pull request #695 from slskd/multi-shares
Refactor some internals to allow multiple share repositories to be used
Diffstat (limited to 'src/slskd/Shares/IShareService.cs')
| -rw-r--r-- | src/slskd/Shares/IShareService.cs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/slskd/Shares/IShareService.cs b/src/slskd/Shares/IShareService.cs index 2a18f5b3..9d0ba487 100644 --- a/src/slskd/Shares/IShareService.cs +++ b/src/slskd/Shares/IShareService.cs @@ -29,14 +29,20 @@ namespace slskd.Shares public interface IShareService { /// <summary> - /// Gets the list of configured shares. + /// Gets the list of share hosts. /// </summary> - IReadOnlyList<Share> Shares { get; } + IReadOnlyList<Host> Hosts { get; } /// <summary> /// Gets the state monitor for the service. /// </summary> - public IStateMonitor<ShareState> StateMonitor { get; } + IStateMonitor<ShareState> StateMonitor { get; } + + /// <summary> + /// Adds a new, or updates an existing, share host. + /// </summary> + /// <param name="host">The host to add or update.</param> + void AddOrUpdateHost(Host host); /// <summary> /// Returns the entire contents of the share. @@ -70,7 +76,7 @@ namespace slskd.Shares Task<IEnumerable<File>> SearchAsync(SearchQuery query); /// <summary> - /// Scans the configured shares. + /// Scans the configured shares on the local host. /// </summary> /// <returns>The operation context.</returns> /// <exception cref="ShareScanInProgressException">Thrown when a scan is already in progress.</exception> @@ -84,7 +90,7 @@ namespace slskd.Shares Task<(int Directories, int Files)> SummarizeShareAsync(Share share); /// <summary> - /// Cancels the currently running scan, if one is running. + /// Cancels the currently running scan on the local host, if one is running. /// </summary> /// <returns>A value indicating whether a scan was cancelled.</returns> bool TryCancelScan(); |
