Index: device/serial/data_stream_serialization.mojom |
diff --git a/device/serial/data_stream_serialization.mojom b/device/serial/data_stream_serialization.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..381347b5da065317ddfa1db9d7a982792b81eec2 |
--- /dev/null |
+++ b/device/serial/data_stream_serialization.mojom |
@@ -0,0 +1,53 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+import "data_stream.mojom" |
+ |
+module device.serial { |
+ |
+// A serialized form of a DataSender. |
+struct SerializedDataSender { |
+ // The control channel to the DataSink to which this DataSender sends data. |
+ DataSink sink; |
+ |
+ // The data pipe this DataSender uses to send data to the DataSink. |
+ handle<data_pipe_producer> data_pipe; |
+ |
+ // The error to report for sends in progress when a fatal error occurs. |
+ int32 fatal_error_value; |
+}; |
+ |
+// A pending receive error. |
+struct PendingReceiveError { |
+ // The value of the error. |
+ int32 error; |
+ |
+ // The location of the error. |
+ uint32 offset; |
+}; |
+ |
+// A serialized form of a DataReceiver. |
+struct SerializedDataReceiver { |
+ // The control channel to the DataSource from which this DataReceiver receives |
+ // data. |
+ DataSource source; |
+ |
+ // The data pipe this DataReceiver uses to receive data from the DataSource. |
+ handle<data_pipe_consumer> data_pipe; |
+ |
+ // The error to report for a receive in progress when a fatal error occurs. |
+ int32 fatal_error_value; |
+ |
+ // The number of bytes this DataReceiver has received from the DataSource. |
+ uint32 bytes_received; |
+ |
+ // Whether a Resume() message needs to be sent to the DataSource for it to |
+ // resume sending data. |
+ bool paused; |
+ |
+ // The pending receive error if there is one. |
+ PendingReceiveError? pending_error; |
+}; |
+ |
+} |