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_TEST_SERIAL_IO_HANDLER_H_ | 5 #ifndef DEVICE_SERIAL_TEST_SERIAL_IO_HANDLER_H_ |
6 #define DEVICE_SERIAL_TEST_SERIAL_IO_HANDLER_H_ | 6 #define DEVICE_SERIAL_TEST_SERIAL_IO_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 const OpenCompleteCallback& callback) override; | 25 const OpenCompleteCallback& callback) override; |
26 void ReadImpl() override; | 26 void ReadImpl() override; |
27 void CancelReadImpl() override; | 27 void CancelReadImpl() override; |
28 void WriteImpl() override; | 28 void WriteImpl() override; |
29 void CancelWriteImpl() override; | 29 void CancelWriteImpl() override; |
30 bool ConfigurePortImpl() override; | 30 bool ConfigurePortImpl() override; |
31 serial::DeviceControlSignalsPtr GetControlSignals() const override; | 31 serial::DeviceControlSignalsPtr GetControlSignals() const override; |
32 serial::ConnectionInfoPtr GetPortInfo() const override; | 32 serial::ConnectionInfoPtr GetPortInfo() const override; |
33 bool Flush() const override; | 33 bool Flush() const override; |
34 bool SetControlSignals(const serial::HostControlSignals& signals) override; | 34 bool SetControlSignals(const serial::HostControlSignals& signals) override; |
| 35 bool SetBreak() override; |
| 36 bool ClearBreak() override; |
35 | 37 |
36 serial::ConnectionInfo* connection_info() { return &info_; } | 38 serial::ConnectionInfo* connection_info() { return &info_; } |
37 serial::DeviceControlSignals* device_control_signals() { | 39 serial::DeviceControlSignals* device_control_signals() { |
38 return &device_control_signals_; | 40 return &device_control_signals_; |
39 } | 41 } |
40 bool dtr() { return dtr_; } | 42 bool dtr() { return dtr_; } |
41 bool rts() { return rts_; } | 43 bool rts() { return rts_; } |
42 int flushes() { return flushes_; } | 44 int flushes() { return flushes_; } |
43 // This callback will be called when this IoHandler processes its next write, | 45 // This callback will be called when this IoHandler processes its next write, |
44 // instead of the normal behavior of echoing the data to reads. | 46 // instead of the normal behavior of echoing the data to reads. |
(...skipping 13 matching lines...) Expand all Loading... |
58 mutable int flushes_; | 60 mutable int flushes_; |
59 std::string buffer_; | 61 std::string buffer_; |
60 base::Closure send_callback_; | 62 base::Closure send_callback_; |
61 | 63 |
62 DISALLOW_COPY_AND_ASSIGN(TestSerialIoHandler); | 64 DISALLOW_COPY_AND_ASSIGN(TestSerialIoHandler); |
63 }; | 65 }; |
64 | 66 |
65 } // namespace device | 67 } // namespace device |
66 | 68 |
67 #endif // DEVICE_SERIAL_TEST_SERIAL_IO_HANDLER_H_ | 69 #endif // DEVICE_SERIAL_TEST_SERIAL_IO_HANDLER_H_ |
OLD | NEW |