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

Unified Diff: device/bluetooth/bluetooth_low_energy_win.h

Issue 379943003: Retrieve "connected" property from BLE devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth_unittests
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_low_energy_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_low_energy_win.h
diff --git a/device/bluetooth/bluetooth_low_energy_win.h b/device/bluetooth/bluetooth_low_energy_win.h
index c08db21947dcd47f8917543aae55020785ef34e4..f71d9bab670107cdd76104f1b62d3481fc669a9a 100644
--- a/device/bluetooth/bluetooth_low_energy_win.h
+++ b/device/bluetooth/bluetooth_low_energy_win.h
@@ -53,7 +53,8 @@ class DeviceRegistryPropertyValue {
// Creates a property value instance, where |property_type| is one of REG_xxx
// registry value type (e.g. REG_SZ, REG_DWORD), |value| is a byte array
// containing the propery value and |value_size| is the number of bytes in
- // |value|. Note the returned instance takes ownership of |value| array.
+ // |value|. Note the returned instance takes ownership of the bytes in
+ // |value|.
static scoped_ptr<DeviceRegistryPropertyValue> Create(
DWORD property_type,
scoped_ptr<uint8_t[]> value,
@@ -78,16 +79,41 @@ class DeviceRegistryPropertyValue {
DISALLOW_COPY_AND_ASSIGN(DeviceRegistryPropertyValue);
};
+// Represents the value associated to a DEVPROPKEY.
+class DevicePropertyValue {
+ public:
+ // Creates a property value instance, where |property_type| is one of
+ // DEVPROP_TYPE_xxx value type , |value| is a byte array containing the
+ // propery value and |value_size| is the number of bytes in |value|. Note the
+ // returned instance takes ownership of the bytes in |value|.
+ DevicePropertyValue(DEVPROPTYPE property_type,
+ scoped_ptr<uint8_t[]> value,
+ size_t value_size);
+
+ DEVPROPTYPE property_type() const { return property_type_; }
+
+ uint32_t AsUint32() const;
+
+ private:
+ DEVPROPTYPE property_type_;
+ scoped_ptr<uint8_t[]> value_;
+ size_t value_size_;
+
+ DISALLOW_COPY_AND_ASSIGN(DevicePropertyValue);
+};
+
// Returns true only on Windows platforms supporting Bluetooth Low Energy.
bool IsBluetoothLowEnergySupported();
struct BluetoothLowEnergyDeviceInfo {
- BluetoothLowEnergyDeviceInfo() { address.ullLong = BLUETOOTH_NULL_ADDRESS; }
+ BluetoothLowEnergyDeviceInfo();
+ ~BluetoothLowEnergyDeviceInfo();
base::FilePath path;
std::string id;
std::string friendly_name;
BLUETOOTH_ADDRESS address;
+ bool connected;
};
// Enumerates the list of known (i.e. already paired) Bluetooth LE devices on
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_low_energy_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698