Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_GATT_CHARACTERISTIC_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 // Returns the list of GATT characteristic descriptors that provide more | 151 // Returns the list of GATT characteristic descriptors that provide more |
| 152 // information about this characteristic. | 152 // information about this characteristic. |
| 153 virtual std::vector<BluetoothGattDescriptor*> | 153 virtual std::vector<BluetoothGattDescriptor*> |
| 154 GetDescriptors() const = 0; | 154 GetDescriptors() const = 0; |
| 155 | 155 |
| 156 // Returns the GATT characteristic descriptor with identifier |identifier| if | 156 // Returns the GATT characteristic descriptor with identifier |identifier| if |
| 157 // it belongs to this GATT characteristic. | 157 // it belongs to this GATT characteristic. |
| 158 virtual BluetoothGattDescriptor* GetDescriptor( | 158 virtual BluetoothGattDescriptor* GetDescriptor( |
| 159 const std::string& identifier) const = 0; | 159 const std::string& identifier) const = 0; |
| 160 | 160 |
| 161 // Returns the GATT characteristic descriptor that matches |uuid|. | |
|
ortuno
2016/03/04 17:39:47
I think this should be GetDescriptorsByUUID (plura
scheib
2016/03/11 03:17:30
Done.
| |
| 162 virtual BluetoothGattDescriptor* GetDescriptorForUUID( | |
| 163 const BluetoothUUID& uuid); | |
| 164 | |
| 161 // Adds a characteristic descriptor to the locally hosted characteristic | 165 // Adds a characteristic descriptor to the locally hosted characteristic |
| 162 // represented by this instance. This method only makes sense for local | 166 // represented by this instance. This method only makes sense for local |
| 163 // characteristics and won't have an effect if this instance represents a | 167 // characteristics and won't have an effect if this instance represents a |
| 164 // remote GATT service and will return false. This method takes ownership | 168 // remote GATT service and will return false. This method takes ownership |
| 165 // of |descriptor|. | 169 // of |descriptor|. |
| 166 virtual bool AddDescriptor(BluetoothGattDescriptor* descriptor) = 0; | 170 virtual bool AddDescriptor(BluetoothGattDescriptor* descriptor) = 0; |
| 167 | 171 |
| 168 // For locally hosted characteristics, updates the characteristic's value. | 172 // For locally hosted characteristics, updates the characteristic's value. |
| 169 // This will update the value that is visible to remote devices and send out | 173 // This will update the value that is visible to remote devices and send out |
| 170 // any notifications and indications that have been configured. This method | 174 // any notifications and indications that have been configured. This method |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 205 BluetoothGattCharacteristic(); | 209 BluetoothGattCharacteristic(); |
| 206 virtual ~BluetoothGattCharacteristic(); | 210 virtual ~BluetoothGattCharacteristic(); |
| 207 | 211 |
| 208 private: | 212 private: |
| 209 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristic); | 213 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristic); |
| 210 }; | 214 }; |
| 211 | 215 |
| 212 } // namespace device | 216 } // namespace device |
| 213 | 217 |
| 214 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ | 218 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
| OLD | NEW |