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

Unified Diff: public/platform/modules/bluetooth/WebBluetooth.h

Issue 1168113008: bluetooth: readValue Blink interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@bluetooth-characteristic-implementation-3
Patch Set: readValue blink interface Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/modules/bluetooth/WebBluetooth.h
diff --git a/public/platform/modules/bluetooth/WebBluetooth.h b/public/platform/modules/bluetooth/WebBluetooth.h
index 8dd3d4944cf6788985ba2dea9b7d3ea23fb5ba4c..ef959057e3abaf28907dbcdb46269235bbb0c937 100644
--- a/public/platform/modules/bluetooth/WebBluetooth.h
+++ b/public/platform/modules/bluetooth/WebBluetooth.h
@@ -7,6 +7,7 @@
#include "public/platform/WebCallbacks.h"
#include "public/platform/WebString.h"
+#include "public/platform/WebVector.h"
namespace blink {
@@ -32,6 +33,10 @@ typedef WebCallbacks<WebBluetoothGATTService, WebBluetoothError> WebBluetoothGet
// WebBluetoothCharacteristic and WebBluetoothError object ownership is transferred.
typedef WebCallbacks<WebBluetoothGATTCharacteristic, WebBluetoothError> WebBluetoothGetCharacteristicCallbacks;
+// Success and failure callbacks for readValue.
+// WebVector and WebBluetoothError object ownership is transferred.
+typedef WebCallbacks<WebVector<uint8_t>, WebBluetoothError> WebBluetoothReadValueCallbacks;
+
class WebBluetooth {
public:
virtual ~WebBluetooth() { }
@@ -60,6 +65,11 @@ public:
virtual void getCharacteristic(const WebString& serviceInstanceID,
const WebString& characteristicUUID,
WebBluetoothGetCharacteristicCallbacks*) { }
+
+ // BluetoothGATTCharacteristic methods:
+ // See https://webbluetoothcg.github.io/web-bluetooth/#bluetoothgattcharacteristic
+ virtual void readValue(const WebString& characteristicInstanceID,
+ WebBluetoothReadValueCallbacks*) { }
};
} // namespace blink
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698