Index: device/bluetooth/bluetooth_adapter_android.h |
diff --git a/device/bluetooth/bluetooth_adapter_android.h b/device/bluetooth/bluetooth_adapter_android.h |
index 52e257d8c1f40d80f71db4ed868361e1112720b1..e41a71fc634f0b3b805117439b284fe1d80df57c 100644 |
--- a/device/bluetooth/bluetooth_adapter_android.h |
+++ b/device/bluetooth/bluetooth_adapter_android.h |
@@ -27,7 +27,9 @@ namespace device { |
// technical reason they can not be supported should a need arrise. |
// |
// BluetoothAdapterAndroid is reference counted, and owns the lifetime of the |
-// Java class BluetoothAdapter via j_adapter_. |
+// Java class BluetoothAdapter via j_adapter_. The adapter also owns a tree of |
+// additional C++ objects (Devices, Services, Characteristics, Descriptors), |
+// with each C++ object owning its associated Java class. |
class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterAndroid final |
: public BluetoothAdapter { |
public: |
@@ -81,7 +83,15 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterAndroid final |
const CreateAdvertisementErrorCallback& error_callback) override; |
// Handles a scan error event by invalidating all discovery sessions. |
- void OnScanFailed(JNIEnv* env, jobject obj); |
+ void OnScanFailed(JNIEnv* env, jobject caller); |
+ |
+ // Creates or updates device with advertised UUID information when a device is |
+ // discovered during a scan. |
+ void CreateOrUpdateDeviceOnScan(JNIEnv* env, |
+ jobject caller, |
+ const jstring& address, |
+ jobject bluetooth_device_wrapper, |
+ jobject advertised_uuids); |
protected: |
BluetoothAdapterAndroid(); |