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

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

Issue 2638653002: Bluetooth: macOS: DidModifyServices can happens while scanning (Closed)
Patch Set: Adding comments and Mac suffix Created 3 years, 7 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 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_CHARACTERISTIC_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_
7 7
8 #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" 8 #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h"
9 9
10 #import <CoreBluetooth/CoreBluetooth.h> 10 #import <CoreBluetooth/CoreBluetooth.h>
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 CBCharacteristic* GetCBCharacteristic() const; 92 CBCharacteristic* GetCBCharacteristic() const;
93 // Returns the mac adapter. 93 // Returns the mac adapter.
94 BluetoothAdapterMac* GetMacAdapter() const; 94 BluetoothAdapterMac* GetMacAdapter() const;
95 // Returns CoreBluetooth peripheral. 95 // Returns CoreBluetooth peripheral.
96 CBPeripheral* GetCBPeripheral() const; 96 CBPeripheral* GetCBPeripheral() const;
97 // Returns true if this characteristic has been fully discovered. 97 // Returns true if this characteristic has been fully discovered.
98 bool IsDiscoveryComplete() const; 98 bool IsDiscoveryComplete() const;
99 // Returns BluetoothRemoteGattDescriptorMac from CBDescriptor. 99 // Returns BluetoothRemoteGattDescriptorMac from CBDescriptor.
100 BluetoothRemoteGattDescriptorMac* GetBluetoothRemoteGattDescriptorMac( 100 BluetoothRemoteGattDescriptorMac* GetBluetoothRemoteGattDescriptorMac(
101 CBDescriptor* cb_descriptor) const; 101 CBDescriptor* cb_descriptor) const;
102 // Is true if the characteristic has been discovered with all its descriptors. 102 // Is true if the characteristic has been discovered with all its descriptors
103 // and discovery_pending_count_ is 0.
103 bool is_discovery_complete_; 104 bool is_discovery_complete_;
105 // Increased each time DiscoverDescriptors() is called. And decreased when
106 // DidDiscoverDescriptors() is called.
107 int discovery_pending_count_;
104 // gatt_service_ owns instances of this class. 108 // gatt_service_ owns instances of this class.
105 BluetoothRemoteGattServiceMac* gatt_service_; 109 BluetoothRemoteGattServiceMac* gatt_service_;
106 // A characteristic from CBPeripheral.services.characteristics. 110 // A characteristic from CBPeripheral.services.characteristics.
107 base::scoped_nsobject<CBCharacteristic> cb_characteristic_; 111 base::scoped_nsobject<CBCharacteristic> cb_characteristic_;
108 // Characteristic identifier. 112 // Characteristic identifier.
109 std::string identifier_; 113 std::string identifier_;
110 // Service UUID. 114 // Service UUID.
111 BluetoothUUID uuid_; 115 BluetoothUUID uuid_;
112 // Characteristic value. 116 // Characteristic value.
113 std::vector<uint8_t> value_; 117 std::vector<uint8_t> value_;
(...skipping 17 matching lines...) Expand all
131 }; 135 };
132 136
133 // Stream operator for logging. 137 // Stream operator for logging.
134 DEVICE_BLUETOOTH_EXPORT std::ostream& operator<<( 138 DEVICE_BLUETOOTH_EXPORT std::ostream& operator<<(
135 std::ostream& out, 139 std::ostream& out,
136 const BluetoothRemoteGattCharacteristicMac& characteristic); 140 const BluetoothRemoteGattCharacteristicMac& characteristic);
137 141
138 } // namespace device 142 } // namespace device
139 143
140 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ 144 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698