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

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

Issue 1765773002: bluetooth: Refactor GetDescriptorForUUID to GetDescriptorsForUUID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-notify-tommyt-
Patch Set: GetDescriptorsForUUID split from other changes. Created 4 years, 9 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 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
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*> GetDescriptorsForUUID(
ortuno 2016/03/13 20:41:44 nit: Do you think GetDescriptorsByUUID or GetDescr
scheib 2016/03/25 00:13:57 Done: Renamed to 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 BluetoothGattCharacteristic(); 211 BluetoothGattCharacteristic();
210 virtual ~BluetoothGattCharacteristic(); 212 virtual ~BluetoothGattCharacteristic();
211 213
212 private: 214 private:
213 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristic); 215 DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristic);
214 }; 216 };
215 217
216 } // namespace device 218 } // namespace device
217 219
218 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_ 220 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698