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

Unified Diff: device/serial/serial.mojom

Issue 363583002: Convert SerialIoHandler to use Mojo types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: device/serial/serial.mojom
diff --git a/device/serial/serial.mojom b/device/serial/serial.mojom
index f925dff33cd1b32c622e5b783057893c7c262379..d23f146ec8ecc2b11fcc269f27d3206c0491e995 100644
--- a/device/serial/serial.mojom
+++ b/device/serial/serial.mojom
@@ -13,4 +13,70 @@ struct SerialDeviceInfo {
string display_name;
};
+enum SendError {
+ SEND_ERROR_NONE,
+ SEND_ERROR_DISCONNECTED,
+ SEND_ERROR_PENDING,
+ SEND_ERROR_TIMEOUT,
+ SEND_ERROR_SYSTEM_ERROR,
+};
+
+enum ReceiveError {
+ RECEIVE_ERROR_NONE,
+ RECEIVE_ERROR_DISCONNECTED,
+ RECEIVE_ERROR_TIMEOUT,
+ RECEIVE_ERROR_DEVICE_LOST,
+ RECEIVE_ERROR_SYSTEM_ERROR,
+};
+
+enum DataBits {
+ DATA_BITS_NONE,
+ DATA_BITS_SEVEN,
+ DATA_BITS_EIGHT,
+};
+
+enum ParityBit {
+ PARITY_BIT_NONE,
+ PARITY_BIT_NO,
+ PARITY_BIT_ODD,
+ PARITY_BIT_EVEN,
+};
+
+enum StopBits {
+ STOP_BITS_NONE,
+ STOP_BITS_ONE,
+ STOP_BITS_TWO,
+};
+
+struct ConnectionOptions {
+ uint32 bitrate = 0;
+ DataBits data_bits = DATA_BITS_NONE;
+ ParityBit parity_bit = PARITY_BIT_NONE;
+ StopBits stop_bits = STOP_BITS_NONE;
+ bool cts_flow_control;
+ bool has_cts_flow_control = false;
+};
+
+struct ConnectionInfo {
+ uint32 bitrate = 0;
+ DataBits data_bits = DATA_BITS_NONE;
+ ParityBit parity_bit = PARITY_BIT_NONE;
+ StopBits stop_bits = STOP_BITS_NONE;
+ bool cts_flow_control;
+};
+
+struct HostControlSignals {
+ bool dtr;
+ bool has_dtr = false;
+ bool rts;
+ bool has_rts = false;
+};
+
+struct DeviceControlSignals {
+ bool dcd;
+ bool cts;
+ bool ri;
+ bool dsr;
+};
+
}

Powered by Google App Engine
This is Rietveld 408576698