| 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|. | 161 // Returns the GATT characteristic descriptors that match |uuid|. There may be |
| 162 virtual BluetoothGattDescriptor* GetDescriptorForUUID( | 162 // multiple, as illustrated by Core Bluetooth Specification [V4.2 Vol 3 Part G |
| 163 // 3.3.3.5 Characteristic Presentation Format]. |
| 164 std::vector<BluetoothGattDescriptor*> GetDescriptorsByUUID( |
| 163 const BluetoothUUID& uuid); | 165 const BluetoothUUID& uuid); |
| 164 | 166 |
| 165 // Adds a characteristic descriptor to the locally hosted characteristic | 167 // Adds a characteristic descriptor to the locally hosted characteristic |
| 166 // represented by this instance. This method only makes sense for local | 168 // represented by this instance. This method only makes sense for local |
| 167 // characteristics and won't have an effect if this instance represents a | 169 // characteristics and won't have an effect if this instance represents a |
| 168 // remote GATT service and will return false. This method takes ownership | 170 // remote GATT service and will return false. This method takes ownership |
| 169 // of |descriptor|. | 171 // of |descriptor|. |
| 170 virtual bool AddDescriptor(BluetoothGattDescriptor* descriptor) = 0; | 172 virtual bool AddDescriptor(BluetoothGattDescriptor* descriptor) = 0; |
| 171 | 173 |
| 172 // For locally hosted characteristics, updates the characteristic's value. | 174 // For locally hosted characteristics, updates the characteristic's value. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 BluetoothGattCharacteristic(); | 217 BluetoothGattCharacteristic(); |
| 216 virtual ~BluetoothGattCharacteristic(); | 218 virtual ~BluetoothGattCharacteristic(); |
| 217 | 219 |
| 218 private: | 220 private: |
| 219 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristic); | 221 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristic); |
| 220 }; | 222 }; |
| 221 | 223 |
| 222 } // namespace device | 224 } // namespace device |
| 223 | 225 |
| 224 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ | 226 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
| OLD | NEW |