// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef REMOTING_HOST_FILE_TRANSFER_BUFFERED_FILE_WRITER_H_ #define REMOTING_HOST_FILE_TRANSFER_BUFFERED_FILE_WRITER_H_ #include <cstdint> #include <memory> #include <vector> #include "base/containers/queue.h" #include "base/files/file_path.h" #include "base/functional/bind.h" #include "base/functional/callback_forward.h" #include "remoting/host/file_transfer/file_operations.h" #include "remoting/proto/file_transfer.pb.h" namespace remoting { // Wrapper around FileOperations::WriteFile that automatically handles queuing // operations. Write can be called immediately after start, can be called // multiple times in sequence, and close can be called at any time. Internally, // BufferedFileWriter will maintain a queue of written chunks and feed them to // the Writer as the latter is ready for them. class BufferedFileWriter { … }; } // namespace remoting #endif // REMOTING_HOST_FILE_TRANSFER_BUFFERED_FILE_WRITER_H_