[chore] remove SetOnFileComplete() in class FileReceiver

This commit is contained in:
dijunkun
2025-12-29 12:48:14 +08:00
parent ab89a3d41a
commit 78c82f778a
2 changed files with 0 additions and 7 deletions

View File

@@ -298,10 +298,6 @@ bool FileReceiver::HandleChunk(const FileChunkHeader& header,
LOG_INFO("FileReceiver: file received complete, file_id={}, size={}",
header.file_id, ctx.received);
if (on_file_complete_) {
on_file_complete_(saved_path);
}
contexts_.erase(header.file_id);
}

View File

@@ -93,8 +93,6 @@ class FileReceiver {
// return true if parsed and processed successfully, false otherwise.
bool OnData(const char* data, size_t size);
void SetOnFileComplete(OnFileComplete cb) { on_file_complete_ = cb; }
void SetOnSendAck(OnSendAck cb) { on_send_ack_ = cb; }
const std::filesystem::path& OutputDir() const { return output_dir_; }
@@ -108,7 +106,6 @@ class FileReceiver {
private:
std::filesystem::path output_dir_;
std::unordered_map<uint32_t, FileContext> contexts_;
OnFileComplete on_file_complete_ = nullptr;
OnSendAck on_send_ack_ = nullptr;
};