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

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

Issue 2638653002: Bluetooth: macOS: DidModifyServices can happens while scanning (Closed)
Patch Set: Merge 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool HasPendingRead() const { 102 bool HasPendingRead() const {
103 return !read_characteristic_value_callbacks_.first.is_null(); 103 return !read_characteristic_value_callbacks_.first.is_null();
104 }; 104 };
105 bool HasPendingWrite() const { 105 bool HasPendingWrite() const {
106 return !write_characteristic_value_callbacks_.first.is_null(); 106 return !write_characteristic_value_callbacks_.first.is_null();
107 }; 107 };
108 // Is true if the characteristic has been discovered with all its descriptors. 108 // Is true if the characteristic has been discovered with all its descriptors
109 // and discovery_pending_count_ is 0.
109 bool is_discovery_complete_; 110 bool is_discovery_complete_;
111 // Increased each time DiscoverDescriptors() is called. And decreased when
112 // DidDiscoverDescriptors() is called.
113 int discovery_pending_count_;
110 // gatt_service_ owns instances of this class. 114 // gatt_service_ owns instances of this class.
111 BluetoothRemoteGattServiceMac* gatt_service_; 115 BluetoothRemoteGattServiceMac* gatt_service_;
112 // A characteristic from CBPeripheral.services.characteristics. 116 // A characteristic from CBPeripheral.services.characteristics.
113 base::scoped_nsobject<CBCharacteristic> cb_characteristic_; 117 base::scoped_nsobject<CBCharacteristic> cb_characteristic_;
114 // Characteristic identifier. 118 // Characteristic identifier.
115 std::string identifier_; 119 std::string identifier_;
116 // Service UUID. 120 // Service UUID.
117 BluetoothUUID uuid_; 121 BluetoothUUID uuid_;
118 // Characteristic value. 122 // Characteristic value.
119 std::vector<uint8_t> value_; 123 std::vector<uint8_t> value_;
(...skipping 15 matching lines...) Expand all
135 }; 139 };
136 140
137 // Stream operator for logging. 141 // Stream operator for logging.
138 DEVICE_BLUETOOTH_EXPORT std::ostream& operator<<( 142 DEVICE_BLUETOOTH_EXPORT std::ostream& operator<<(
139 std::ostream& out, 143 std::ostream& out,
140 const BluetoothRemoteGattCharacteristicMac& characteristic); 144 const BluetoothRemoteGattCharacteristicMac& characteristic);
141 145
142 } // namespace device 146 } // namespace device
143 147
144 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ 148 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_device_mac.mm ('k') | device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698