| OLD | NEW |
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 jobject advertised_uuids); // Java Type: List<ParcelUuid> | 55 jobject advertised_uuids); // Java Type: List<ParcelUuid> |
| 56 | 56 |
| 57 // BluetoothDevice: | 57 // BluetoothDevice: |
| 58 uint32_t GetBluetoothClass() const override; | 58 uint32_t GetBluetoothClass() const override; |
| 59 std::string GetAddress() const override; | 59 std::string GetAddress() const override; |
| 60 VendorIDSource GetVendorIDSource() const override; | 60 VendorIDSource GetVendorIDSource() const override; |
| 61 uint16_t GetVendorID() const override; | 61 uint16_t GetVendorID() const override; |
| 62 uint16_t GetProductID() const override; | 62 uint16_t GetProductID() const override; |
| 63 uint16_t GetDeviceID() const override; | 63 uint16_t GetDeviceID() const override; |
| 64 uint16_t GetAppearance() const override; | 64 uint16_t GetAppearance() const override; |
| 65 base::Optional<std::string> GetName() const override; |
| 65 bool IsPaired() const override; | 66 bool IsPaired() const override; |
| 66 bool IsConnected() const override; | 67 bool IsConnected() const override; |
| 67 bool IsGattConnected() const override; | 68 bool IsGattConnected() const override; |
| 68 bool IsConnectable() const override; | 69 bool IsConnectable() const override; |
| 69 bool IsConnecting() const override; | 70 bool IsConnecting() const override; |
| 70 UUIDList GetUUIDs() const override; | 71 UUIDList GetUUIDs() const override; |
| 71 int16_t GetInquiryRSSI() const override; | 72 int16_t GetInquiryRSSI() const override; |
| 72 int16_t GetInquiryTxPower() const override; | 73 int16_t GetInquiryTxPower() const override; |
| 73 bool ExpectingPinCode() const override; | 74 bool ExpectingPinCode() const override; |
| 74 bool ExpectingPasskey() const override; | 75 bool ExpectingPasskey() const override; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 JNIEnv* env, | 116 JNIEnv* env, |
| 116 const base::android::JavaParamRef<jobject>& caller, | 117 const base::android::JavaParamRef<jobject>& caller, |
| 117 const base::android::JavaParamRef<jstring>& instance_id, | 118 const base::android::JavaParamRef<jstring>& instance_id, |
| 118 const base::android::JavaParamRef<jobject>& | 119 const base::android::JavaParamRef<jobject>& |
| 119 bluetooth_gatt_service_wrapper); // BluetoothGattServiceWrapper | 120 bluetooth_gatt_service_wrapper); // BluetoothGattServiceWrapper |
| 120 | 121 |
| 121 protected: | 122 protected: |
| 122 BluetoothDeviceAndroid(BluetoothAdapterAndroid* adapter); | 123 BluetoothDeviceAndroid(BluetoothAdapterAndroid* adapter); |
| 123 | 124 |
| 124 // BluetoothDevice: | 125 // BluetoothDevice: |
| 125 std::string GetDeviceName() const override; | |
| 126 void CreateGattConnectionImpl() override; | 126 void CreateGattConnectionImpl() override; |
| 127 void DisconnectGatt() override; | 127 void DisconnectGatt() override; |
| 128 | 128 |
| 129 // Java object org.chromium.device.bluetooth.ChromeBluetoothDevice. | 129 // Java object org.chromium.device.bluetooth.ChromeBluetoothDevice. |
| 130 base::android::ScopedJavaGlobalRef<jobject> j_device_; | 130 base::android::ScopedJavaGlobalRef<jobject> j_device_; |
| 131 | 131 |
| 132 bool gatt_connected_ = false; | 132 bool gatt_connected_ = false; |
| 133 | 133 |
| 134 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceAndroid); | 134 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceAndroid); |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 } // namespace device | 137 } // namespace device |
| 138 | 138 |
| 139 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ | 139 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ |
| OLD | NEW |