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

Side by Side Diff: device/bluetooth/bluetooth_device_android.h

Issue 2205693003: bluetooth: Replace old advertised uuids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Fix mac Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 static bool RegisterJNI(JNIEnv* env); 42 static bool RegisterJNI(JNIEnv* env);
43 43
44 // Returns the associated ChromeBluetoothDevice Java object. 44 // Returns the associated ChromeBluetoothDevice Java object.
45 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); 45 base::android::ScopedJavaLocalRef<jobject> GetJavaObject();
46 46
47 // Get owning BluetoothAdapter cast to BluetoothAdapterAndroid. 47 // Get owning BluetoothAdapter cast to BluetoothAdapterAndroid.
48 BluetoothAdapterAndroid* GetAndroidAdapter() { 48 BluetoothAdapterAndroid* GetAndroidAdapter() {
49 return static_cast<BluetoothAdapterAndroid*>(adapter_); 49 return static_cast<BluetoothAdapterAndroid*>(adapter_);
50 } 50 }
51 51
52 // Updates cached copy of advertised UUIDs discovered during a scan. 52 // Replaces cached copy of advertised UUIDs discovered during a scan.
53 // Returns true if new UUIDs differed from cached values. 53 void UpdateAdvertisedUUIDs(
scheib 2016/08/05 18:49:31 Why drop the bool return value? We shouldn't re-no
ortuno 2016/08/05 23:00:17 We will notify for each advertisement. So the bool
54 bool UpdateAdvertisedUUIDs( 54 jobjectArray advertised_uuids); // Java Type: String[]
55 jobject advertised_uuids); // Java Type: List<ParcelUuid>
56 55
57 // BluetoothDevice: 56 // BluetoothDevice:
58 uint32_t GetBluetoothClass() const override; 57 uint32_t GetBluetoothClass() const override;
59 std::string GetAddress() const override; 58 std::string GetAddress() const override;
60 VendorIDSource GetVendorIDSource() const override; 59 VendorIDSource GetVendorIDSource() const override;
61 uint16_t GetVendorID() const override; 60 uint16_t GetVendorID() const override;
62 uint16_t GetProductID() const override; 61 uint16_t GetProductID() const override;
63 uint16_t GetDeviceID() const override; 62 uint16_t GetDeviceID() const override;
64 uint16_t GetAppearance() const override; 63 uint16_t GetAppearance() const override;
65 base::Optional<std::string> GetName() const override; 64 base::Optional<std::string> GetName() const override;
66 bool IsPaired() const override; 65 bool IsPaired() const override;
67 bool IsConnected() const override; 66 bool IsConnected() const override;
68 bool IsGattConnected() const override; 67 bool IsGattConnected() const override;
69 bool IsConnectable() const override; 68 bool IsConnectable() const override;
70 bool IsConnecting() const override; 69 bool IsConnecting() const override;
71 UUIDList GetUUIDs() const override;
72 int16_t GetInquiryRSSI() const override; 70 int16_t GetInquiryRSSI() const override;
73 int16_t GetInquiryTxPower() const override; 71 int16_t GetInquiryTxPower() const override;
74 bool ExpectingPinCode() const override; 72 bool ExpectingPinCode() const override;
75 bool ExpectingPasskey() const override; 73 bool ExpectingPasskey() const override;
76 bool ExpectingConfirmation() const override; 74 bool ExpectingConfirmation() const override;
77 void GetConnectionInfo(const ConnectionInfoCallback& callback) override; 75 void GetConnectionInfo(const ConnectionInfoCallback& callback) override;
78 void Connect(device::BluetoothDevice::PairingDelegate* pairing_delegate, 76 void Connect(device::BluetoothDevice::PairingDelegate* pairing_delegate,
79 const base::Closure& callback, 77 const base::Closure& callback,
80 const ConnectErrorCallback& error_callback) override; 78 const ConnectErrorCallback& error_callback) override;
81 void SetPinCode(const std::string& pincode) override; 79 void SetPinCode(const std::string& pincode) override;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 base::android::ScopedJavaGlobalRef<jobject> j_device_; 128 base::android::ScopedJavaGlobalRef<jobject> j_device_;
131 129
132 bool gatt_connected_ = false; 130 bool gatt_connected_ = false;
133 131
134 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceAndroid); 132 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceAndroid);
135 }; 133 };
136 134
137 } // namespace device 135 } // namespace device
138 136
139 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ 137 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698