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 6c997e9317442c8539d137e3fd19ddef488c8f38..c08db21947dcd47f8917543aae55020785ef34e4 100644 |
--- a/device/bluetooth/bluetooth_low_energy_win.h |
+++ b/device/bluetooth/bluetooth_low_energy_win.h |
@@ -40,12 +40,44 @@ DEFINE_GUID(GUID_BLUETOOTHLE_DEVICE_INTERFACE, |
#include <bluetoothapis.h> |
#include "base/files/file_path.h" |
+#include "base/memory/scoped_ptr.h" |
#include "base/memory/scoped_vector.h" |
#include "base/win/scoped_handle.h" |
namespace device { |
namespace win { |
+// Represents a device registry property value |
+class DeviceRegistryPropertyValue { |
+ public: |
+ // 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. |
+ static scoped_ptr<DeviceRegistryPropertyValue> Create( |
+ DWORD property_type, |
+ scoped_ptr<uint8_t[]> value, |
+ size_t value_size); |
+ ~DeviceRegistryPropertyValue(); |
+ |
+ // Returns the vaue type a REG_xxx value (e.g. REG_SZ, REG_DWORD, ...) |
+ DWORD property_type() const { return property_type_; } |
+ |
+ std::string AsString() const; |
+ DWORD AsDWORD() const; |
+ |
+ private: |
+ DeviceRegistryPropertyValue(DWORD property_type, |
+ scoped_ptr<uint8_t[]> value, |
+ size_t value_size); |
+ |
+ DWORD property_type_; |
+ scoped_ptr<uint8_t[]> value_; |
+ size_t value_size_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DeviceRegistryPropertyValue); |
+}; |
+ |
// Returns true only on Windows platforms supporting Bluetooth Low Energy. |
bool IsBluetoothLowEnergySupported(); |