Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Side by Side Diff: device/serial/data_stream.mojom

Issue 2410743002: Remove the mojo serial interfaces and related infrastructure. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/serial/data_source_unittest.cc ('k') | device/serial/data_stream_serialization.mojom » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 module device.serial;
6
7 interface DataSource {
8 // Initializes this DataSource with the amount of data its client will
9 // buffer.
10 Init(uint32 buffer_size);
11
12 // Resumes sending data after it has been stopped due to an error.
13 Resume();
14
15 // Reports that |bytes_sent| bytes have been successfully passed to the
16 // client.
17 ReportBytesReceived(uint32 bytes_sent);
18 };
19
20 interface DataSourceClient {
21 // Invoked to report |error| from the DataSource. No further bytes will be
22 // transmitted from the DataSource until Resume() is called.
23 OnError(int32 error);
24
25 // Invoked to transmit data from the DataSource.
26 OnData(array<uint8> data);
27 };
28
29 interface DataSink {
30 // Requests the cancellation of any data that has been written to the pipe,
31 // but has not yet been sent to the sink.
32 Cancel(int32 error);
33
34 // Invoked to pass |data| to the sink. The response contains the number of
35 // bytes successfully sent and an optional error. If |error| is zero,
36 // |bytes_sent| will the size of |data|.
37 OnData(array<uint8> data) => (uint32 bytes_sent, int32 error);
38
39 // Called to clear the error and resume data transmission after an error
40 // occurs. After an error is reported in response to an OnData until
41 // ClearError is called, any further OnData calls will report the same error
42 // as the first error response.
43 ClearError();
44 };
OLDNEW
« no previous file with comments | « device/serial/data_source_unittest.cc ('k') | device/serial/data_stream_serialization.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698