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

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: remove "default" case 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..a0205ae1a0875d0b165f6f56d23cd5b59d38831c 100644
--- a/device/serial/serial.mojom
+++ b/device/serial/serial.mojom
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-module device {
+module device.serial {
-struct SerialDeviceInfo {
+struct DeviceInfo {
string path;
uint16 vendor_id;
bool has_vendor_id = false;
@@ -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;
+};
+
}
« no previous file with comments | « chrome/browser/extensions/api/serial/serial_io_handler_win.cc ('k') | device/serial/serial_device_enumerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698