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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_android.h

Issue 1712593002: bluetooth: android: Confirm the notify session after the descriptor has been written. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added the comment that Gio requested 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_android.h
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
index 4493a94579509581601d8e049126bb8f656d010a..65a761215be20a529fcd543ea21f228d30f36668 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
@@ -7,6 +7,8 @@
#include <stdint.h>
+#include <queue>
+
#include "base/android/jni_android.h"
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/macros.h"
@@ -78,6 +80,11 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicAndroid
const base::android::JavaParamRef<jobject>& jcaller,
const base::android::JavaParamRef<jbyteArray>& value);
+ // Callback after StartNotifySession operation completes.
scheib 2016/02/26 04:27:01 Called when StartNotifySession operation completes
tommyt 2016/03/01 14:45:15 Done.
+ void OnStartNotifySession(JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& jcaller,
+ int32_t status);
+
// Callback after Read operation completes.
void OnRead(JNIEnv* env,
const base::android::JavaParamRef<jobject>& jcaller,
@@ -123,6 +130,11 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicAndroid
// Adapter unique instance ID.
std::string instance_id_;
+ // StartNotifySession callbacks and pending state.
+ typedef std::pair<NotifySessionCallback, ErrorCallback>
+ PendingStartNotifyCall;
+ std::queue<PendingStartNotifyCall> pending_start_notify_calls_;
+
// ReadRemoteCharacteristic callbacks and pending state.
bool read_pending_ = false;
ValueCallback read_callback_;

Powered by Google App Engine
This is Rietveld 408576698