OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_REMOTE_GATT_DESCRIPTOR_ANDROID_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_ANDROID_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_ANDROID_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_ANDROID_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 // BluetoothRemoteGattDescriptor interface: | 43 // BluetoothRemoteGattDescriptor interface: |
44 std::string GetIdentifier() const override; | 44 std::string GetIdentifier() const override; |
45 BluetoothUUID GetUUID() const override; | 45 BluetoothUUID GetUUID() const override; |
46 const std::vector<uint8_t>& GetValue() const override; | 46 const std::vector<uint8_t>& GetValue() const override; |
47 BluetoothRemoteGattCharacteristic* GetCharacteristic() const override; | 47 BluetoothRemoteGattCharacteristic* GetCharacteristic() const override; |
48 BluetoothRemoteGattCharacteristic::Permissions GetPermissions() | 48 BluetoothRemoteGattCharacteristic::Permissions GetPermissions() |
49 const override; | 49 const override; |
50 void ReadRemoteDescriptor(const ValueCallback& callback, | 50 void ReadRemoteDescriptor(const ValueCallback& callback, |
51 const ErrorCallback& error_callback) override; | 51 const ErrorCallback& error_callback) override; |
52 void WriteRemoteDescriptor(const std::vector<uint8_t>& new_value, | 52 void WriteRemoteDescriptor(const std::vector<uint8_t>& value, |
53 const base::Closure& callback, | 53 const base::Closure& callback, |
54 const ErrorCallback& error_callback) override; | 54 const ErrorCallback& error_callback) override; |
55 | 55 |
56 // Called when Read operation completes. | 56 // Called when Read operation completes. |
57 void OnRead(JNIEnv* env, | 57 void OnRead(JNIEnv* env, |
58 const base::android::JavaParamRef<jobject>& jcaller, | 58 const base::android::JavaParamRef<jobject>& jcaller, |
59 int32_t status, | 59 int32_t status, |
60 const base::android::JavaParamRef<jbyteArray>& value); | 60 const base::android::JavaParamRef<jbyteArray>& value); |
61 | 61 |
62 // Called when Write operation completes. | 62 // Called when Write operation completes. |
(...skipping 22 matching lines...) Expand all Loading... |
85 ErrorCallback write_error_callback_; | 85 ErrorCallback write_error_callback_; |
86 | 86 |
87 std::vector<uint8_t> value_; | 87 std::vector<uint8_t> value_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptorAndroid); | 89 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptorAndroid); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace device | 92 } // namespace device |
93 | 93 |
94 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_ANDROID_H_ | 94 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_ANDROID_H_ |
OLD | NEW |