From 1e27fdb2e5de7de63fdabcd2b36607658edd2bf7 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 22 Oct 2022 09:38:53 -0500 Subject: rename GetFileUpload to GetFile --- src/slskd/Network/NetworkService.cs | 12 ++++++------ src/slskd/Shares/ShareScanner.cs | 1 + src/slskd/Transfers/Uploads/UploadService.cs | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/slskd/Network/NetworkService.cs b/src/slskd/Network/NetworkService.cs index 682985b9..8f25da5d 100644 --- a/src/slskd/Network/NetworkService.cs +++ b/src/slskd/Network/NetworkService.cs @@ -68,13 +68,13 @@ namespace slskd.Network Task<(bool Exists, long Length)> GetFileInfo(string agentName, string filename, int timeout = 3000); /// - /// Retrieves an upload of the specified from the specified . + /// Retrieves a stream of the specified from the specified . /// /// The agent from which to retrieve the file. /// The file to retrieve. /// An optional timeout value. /// The operation context, including a stream containing the requested file, and an upload TaskCompletionSource. - Task<(Stream Stream, TaskCompletionSource Completion)> GetFileUpload(string agentName, string filename, int timeout = 3000); + Task<(Stream Stream, TaskCompletionSource Completion)> GetFile(string agentName, string filename, int timeout = 3000); /// /// Registers the specified with the specified . @@ -111,10 +111,10 @@ namespace slskd.Network /// Validates an authentication challenge response. /// /// The ID of the agent connection. - /// The agent name. + /// The agent name. /// The challenge response provided by the agent. /// A value indicating whether the response is valid. - bool TryValidateAuthenticationChallengeResponse(string connectionId, string agent, string challengeResponse); + bool TryValidateAuthenticationChallengeResponse(string connectionId, string agentName, string challengeResponse); /// /// Attempts to retrieve the specified share upload . @@ -242,13 +242,13 @@ namespace slskd.Network } /// - /// Retrieves an upload of the specified from the specified . + /// Retrieves a stream of the specified from the specified . /// /// The agent from which to retrieve the file. /// The file to retrieve. /// An optional timeout value. /// The operation context, including a stream containing the requested file, and an upload TaskCompletionSource. - public async Task<(Stream Stream, TaskCompletionSource Completion)> GetFileUpload(string agentName, string filename, int timeout = 3000) + public async Task<(Stream Stream, TaskCompletionSource Completion)> GetFile(string agentName, string filename, int timeout = 3000) { var id = Guid.NewGuid(); diff --git a/src/slskd/Shares/ShareScanner.cs b/src/slskd/Shares/ShareScanner.cs index 7a174396..de765308 100644 --- a/src/slskd/Shares/ShareScanner.cs +++ b/src/slskd/Shares/ShareScanner.cs @@ -64,6 +64,7 @@ namespace slskd.Shares /// Initializes a new instance of the class. /// /// + /// /// public ShareScanner( int workerCount, diff --git a/src/slskd/Transfers/Uploads/UploadService.cs b/src/slskd/Transfers/Uploads/UploadService.cs index 2af3005a..64a8f21e 100644 --- a/src/slskd/Transfers/Uploads/UploadService.cs +++ b/src/slskd/Transfers/Uploads/UploadService.cs @@ -273,7 +273,7 @@ namespace slskd.Transfers.Uploads size: localFileLength, inputStreamFactory: async () => { - var (stream, completion) = await Network.GetFileUpload(agentName: host, filename); + var (stream, completion) = await Network.GetFile(agentName: host, filename); uploadCompletion = completion; return stream; }, -- cgit v1.2.3