Index: content/common/bluetooth/bluetooth_device.h |
diff --git a/content/common/bluetooth/bluetooth_device.h b/content/common/bluetooth/bluetooth_device.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3e6df4179af4992f135731b2bcaaaec23627fb98 |
--- /dev/null |
+++ b/content/common/bluetooth/bluetooth_device.h |
@@ -0,0 +1,50 @@ |
+// 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. |
+ |
+#ifndef CONTENT_COMMON_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
+#define CONTENT_COMMON_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
+ |
+#include <string> |
+ |
+#include "base/basictypes.h" |
+#include "base/strings/string16.h" |
+#include "content/common/content_export.h" |
+#include "device/bluetooth/bluetooth_device.h" |
+ |
+namespace content { |
+ |
+// Data sent over IPC representing a Bluetooth device, corresponding to |
+// blink::WebBluetoothDevice. |
+struct CONTENT_EXPORT BluetoothDevice { |
Marijn Kruisselbrink
2015/01/28 21:45:56
I was wondering if you could just use blink::WebBl
scheib
2015/01/28 22:23:55
Yes, the strings and vectors are a major issue, al
|
+ BluetoothDevice(); |
+ BluetoothDevice(const std::string& instance_id, |
+ const base::string16& name_in, |
Marijn Kruisselbrink
2015/01/28 21:45:56
why name_in and not just name?
scheib
2015/01/28 22:23:55
Done.
|
+ uint32 device_class, |
+ device::BluetoothDevice::VendorIDSource vendor_id_source, |
+ uint16 vendor_id, |
+ uint16 product_id, |
+ uint16 product_version, |
+ bool paired, |
+ bool connected, |
+ const std::vector<std::string>& uuids); |
+ ~BluetoothDevice(); |
+ |
+ static std::vector<std::string> UUIDsFromBluetoothUUIDs( |
+ const device::BluetoothDevice::UUIDList& uuid_list); |
+ |
+ std::string instance_id; |
+ base::string16 name; |
+ uint32 device_class; |
+ device::BluetoothDevice::VendorIDSource vendor_id_source; |
+ uint16 vendor_id; |
+ uint16 product_id; |
+ uint16 product_version; |
+ bool paired; |
+ bool connected; |
+ std::vector<std::string> uuids; // 128bit UUIDs with dashes. 36 chars. |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_COMMON_BLUETOOTH_BLUETOOTH_DEVICE_H_ |