forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata_stream_serialization.mojom
49 lines (37 loc) · 1.3 KB
/
data_stream_serialization.mojom
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// 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.
module device.serial;
import "data_stream.mojom";
// A serialized form of a DataSender.
struct SerializedDataSender {
// The control channel to the DataSink to which this DataSender sends data.
DataSink sink;
// 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;
// DataSourceClient&
handle<message_pipe> client;
// 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;
array<array<uint8>> pending_data;
};