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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_win.h

Issue 1739383002: Implement read & write remote GATT characteristic value for Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix conversion from 'size_t' to 'ULONG' error on trybot Created 4 years, 10 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/bluetooth/bluetooth_remote_gatt_characteristic_win.h
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_win.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_win.h
index 98601163ccbe35051dbf82cc3b048456019ea4be..190e8922fdc09cb018f24169b26a231f3d945b82 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_win.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_win.h
@@ -75,6 +75,12 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicWin
uint16_t num,
BluetoothRemoteGattDescriptorWin* descriptor);
+ void OnReadRemoteCharacteristicValueCallback(
+ scoped_ptr<BTH_LE_GATT_CHARACTERISTIC_VALUE> value,
+ HRESULT hr);
+ void OnWriteRemoteCharacteristicValueCallback(HRESULT hr);
+ BluetoothGattService::GattErrorCode HRESULTToGattErrorCode(HRESULT hr);
+
BluetoothRemoteGattServiceWin* parent_service_;
scoped_refptr<BluetoothTaskManagerWin> task_manager_;
@@ -96,6 +102,14 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicWin
// has been sent out to avoid duplicate notification.
bool characteristic_added_notified_;
+ // Vector stores ReadRemoteCharacteristic request callbacks.
+ std::vector<std::pair<ValueCallback, ErrorCallback>>
+ read_remote_characteristic_value_callbacks_;
+
+ // Vector stores WriteRemoteCharacteristic request callbacks.
+ std::vector<std::pair<base::Closure, ErrorCallback>>
+ write_remote_characteristic_value_callbacks_;
+
base::WeakPtrFactory<BluetoothRemoteGattCharacteristicWin> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicWin);
};

Powered by Google App Engine
This is Rietveld 408576698