| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_ | 5 #ifndef DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_ |
| 6 #define DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_ | 6 #define DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/files/file_descriptor_watcher_posix.h" | 10 #include "base/files/file_descriptor_watcher_posix.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 enum class ErrorDetectState { NO_ERROR, MARK_377_SEEN, MARK_0_SEEN }; | 21 enum class ErrorDetectState { NO_ERROR, MARK_377_SEEN, MARK_0_SEEN }; |
| 22 | 22 |
| 23 class SerialIoHandlerPosix : public SerialIoHandler { | 23 class SerialIoHandlerPosix : public SerialIoHandler { |
| 24 protected: | 24 protected: |
| 25 // SerialIoHandler impl. | 25 // SerialIoHandler impl. |
| 26 void ReadImpl() override; | 26 void ReadImpl() override; |
| 27 void WriteImpl() override; | 27 void WriteImpl() override; |
| 28 void CancelReadImpl() override; | 28 void CancelReadImpl() override; |
| 29 void CancelWriteImpl() override; | 29 void CancelWriteImpl() override; |
| 30 bool ConfigurePortImpl() override; | 30 bool ConfigurePortImpl() override; |
| 31 bool PostOpen() override; |
| 31 bool Flush() const override; | 32 bool Flush() const override; |
| 32 serial::DeviceControlSignalsPtr GetControlSignals() const override; | 33 serial::DeviceControlSignalsPtr GetControlSignals() const override; |
| 33 bool SetControlSignals( | 34 bool SetControlSignals( |
| 34 const serial::HostControlSignals& control_signals) override; | 35 const serial::HostControlSignals& control_signals) override; |
| 35 serial::ConnectionInfoPtr GetPortInfo() const override; | 36 serial::ConnectionInfoPtr GetPortInfo() const override; |
| 36 bool SetBreak() override; | 37 bool SetBreak() override; |
| 37 bool ClearBreak() override; | 38 bool ClearBreak() override; |
| 38 int CheckReceiveError(char* buffer, | 39 int CheckReceiveError(char* buffer, |
| 39 int buffer_len, | 40 int buffer_len, |
| 40 int bytes_read, | 41 int bytes_read, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 68 bool parity_check_enabled_; | 69 bool parity_check_enabled_; |
| 69 char chars_stashed_[2]; | 70 char chars_stashed_[2]; |
| 70 int num_chars_stashed_; | 71 int num_chars_stashed_; |
| 71 | 72 |
| 72 DISALLOW_COPY_AND_ASSIGN(SerialIoHandlerPosix); | 73 DISALLOW_COPY_AND_ASSIGN(SerialIoHandlerPosix); |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 } // namespace device | 76 } // namespace device |
| 76 | 77 |
| 77 #endif // DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_ | 78 #endif // DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_ |
| OLD | NEW |