Chromium Code Reviews| 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 module device.serial { | 5 module device.serial { |
| 6 | 6 |
| 7 [Client=DataSourceClient] | 7 [Client=DataSourceClient] |
| 8 interface DataSource { | 8 interface DataSource { |
| 9 // Initializes this DataSource with a data pipe handle to use for data | 9 // Initializes this DataSource with a data pipe handle to use for data |
| 10 // transmission. | 10 // transmission. |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 // Reports that the sink has successfully received |bytes_sent| bytes of data. | 36 // Reports that the sink has successfully received |bytes_sent| bytes of data. |
| 37 ReportBytesSent(uint32 bytes_sent); | 37 ReportBytesSent(uint32 bytes_sent); |
| 38 | 38 |
| 39 // Reports that the sink has received |bytes_sent| bytes of data (possibly 0) | 39 // Reports that the sink has received |bytes_sent| bytes of data (possibly 0) |
| 40 // and encountered an error: |error|. The client should respond with | 40 // and encountered an error: |error|. The client should respond with |
| 41 // |bytes_to_flush|, the number of bytes enqueued in the data pipe but not yet | 41 // |bytes_to_flush|, the number of bytes enqueued in the data pipe but not yet |
| 42 // acked so the correct number of bytes can be flushed from the pipe. | 42 // acked so the correct number of bytes can be flushed from the pipe. |
| 43 ReportBytesSentAndError(uint32 bytes_sent, int32 error) => (uint32 bytes_to_fl ush); | 43 ReportBytesSentAndError(uint32 bytes_sent, int32 error) => (uint32 bytes_to_fl ush); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 struct SerializedDataSender { | |
|
raymes
2014/09/17 02:05:04
As noted I think it would be good to move these to
Sam McNally
2014/09/17 08:07:14
Done.
| |
| 47 handle<message_pipe> sink; | |
| 48 handle<data_pipe_producer> data_pipe; | |
| 49 int32 fatal_error_value; | |
| 50 bool shut_down; | |
| 51 }; | |
| 52 | |
| 53 struct SerializedDataReceiver { | |
| 54 handle<message_pipe> source; | |
| 55 handle<data_pipe_consumer> data_pipe; | |
| 56 int32 fatal_error_value; | |
| 57 uint32 bytes_received; | |
| 58 bool paused; | |
| 59 bool shut_down; | |
| 60 }; | |
| 61 | |
| 46 } | 62 } |
| OLD | NEW |