| 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 the amount of data its client will | 9 // Initializes this DataSource with the amount of data its client will |
| 10 // buffer. | 10 // buffer. |
| 11 Init(uint32 buffer_size); | 11 Init(uint32 buffer_size); |
| 12 | 12 |
| 13 // Resumes sending data after it has been stopped due to an error. | 13 // Resumes sending data after it has been stopped due to an error. |
| 14 Resume(); | 14 Resume(); |
| 15 | 15 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 44 interface DataSinkClient { | 44 interface DataSinkClient { |
| 45 // Reports that the sink has successfully received |bytes_sent| bytes of data. | 45 // Reports that the sink has successfully received |bytes_sent| bytes of data. |
| 46 ReportBytesSent(uint32 bytes_sent); | 46 ReportBytesSent(uint32 bytes_sent); |
| 47 | 47 |
| 48 // Reports that the sink has received |bytes_sent| bytes of data (possibly 0) | 48 // Reports that the sink has received |bytes_sent| bytes of data (possibly 0) |
| 49 // and encountered an error: |error|. Any OnData messages received by the | 49 // and encountered an error: |error|. Any OnData messages received by the |
| 50 // DataSink before the response will be discarded. The client should respond | 50 // DataSink before the response will be discarded. The client should respond |
| 51 // when it is ready to resume sending data. | 51 // when it is ready to resume sending data. |
| 52 ReportBytesSentAndError(uint32 bytes_sent, int32 error) => (); | 52 ReportBytesSentAndError(uint32 bytes_sent, int32 error) => (); |
| 53 }; | 53 }; |
| 54 | |
| 55 } | |
| OLD | NEW |