diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-11-27 19:14:20 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2025-11-27 19:14:20 -0600 |
| commit | 60520cdb16f8a01ed753ee1905053d9ec99a9950 (patch) | |
| tree | a4f870b3b09fe06d86b29c0ac61ab85215a50ad5 /src | |
| parent | 8792e614e7c3b181bdb37bb6b94bce08f04ab256 (diff) | |
| download | slskd-60520cdb16f8a01ed753ee1905053d9ec99a9950.tar.gz | |
add missing interface method
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Transfers/Downloads/DownloadService.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/slskd/Transfers/Downloads/DownloadService.cs b/src/slskd/Transfers/Downloads/DownloadService.cs index 9d0a8ed9..bb4c5417 100644 --- a/src/slskd/Transfers/Downloads/DownloadService.cs +++ b/src/slskd/Transfers/Downloads/DownloadService.cs @@ -108,6 +108,20 @@ namespace slskd.Transfers.Downloads bool TryCancel(Guid id); /// <summary> + /// Fails the download matching the specified <paramref name="id"/> with the specified <paramref name="exception"/>, + /// and sets the final state accordingly. + /// </summary> + /// <remarks> + /// This method is designed to be idempotent, meaning subsequent calls for a given transfer shouldn't change + /// the EndedAt or Exception properties if they have already been set. If the transfer State already includes + /// the terminal Completed flag, it is unchanged. + /// </remarks> + /// <param name="id">The unique identifier for the download.</param> + /// <param name="exception">The exception that caused the failure.</param> + /// <returns>A value indicating whether the download was successfully failed.</returns> + bool TryFail(Guid id, Exception exception); + + /// <summary> /// Updates the specified <paramref name="transfer"/>. /// </summary> /// <param name="transfer">The transfer to update.</param> |
