1 // Copyright 2020 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef REMOTING_HOST_FILE_TRANSFER_RTC_LOG_FILE_OPERATIONS_H_
6 #define REMOTING_HOST_FILE_TRANSFER_RTC_LOG_FILE_OPERATIONS_H_
7 
8 #include "remoting/host/file_transfer/file_operations.h"
9 
10 namespace remoting {
11 
12 namespace protocol {
13 class ConnectionToClient;
14 }  // namespace protocol
15 
16 // Implementation of FileOperations that sends the RTC event log to the client.
17 // As the event log is held in memory, there is no need for blocking IO and
18 // this class can run on the network thread.
19 class RtcLogFileOperations : public FileOperations {
20  public:
21   explicit RtcLogFileOperations(protocol::ConnectionToClient* connection);
22   ~RtcLogFileOperations() override;
23   RtcLogFileOperations(const RtcLogFileOperations&) = delete;
24   RtcLogFileOperations& operator=(const RtcLogFileOperations&) = delete;
25 
26   // FileOperations interface.
27   std::unique_ptr<Reader> CreateReader() override;
28   std::unique_ptr<Writer> CreateWriter() override;
29 
30  private:
31   protocol::ConnectionToClient* connection_;
32 };
33 
34 }  // namespace remoting
35 
36 #endif  // REMOTING_HOST_FILE_TRANSFER_RTC_LOG_FILE_OPERATIONS_H_
37