OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ADAPTER_MAC_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ |
7 | 7 |
8 #include <IOKit/IOReturn.h> | 8 #include <IOKit/IOReturn.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 void ClassicDeviceAdded(IOBluetoothDevice* device); | 160 void ClassicDeviceAdded(IOBluetoothDevice* device); |
161 | 161 |
162 // BluetoothLowEnergyDiscoveryManagerMac::Observer override: | 162 // BluetoothLowEnergyDiscoveryManagerMac::Observer override: |
163 void LowEnergyDeviceUpdated(CBPeripheral* peripheral, | 163 void LowEnergyDeviceUpdated(CBPeripheral* peripheral, |
164 NSDictionary* advertisement_data, | 164 NSDictionary* advertisement_data, |
165 int rssi) override; | 165 int rssi) override; |
166 | 166 |
167 // Updates |devices_| when there is a change to the CBCentralManager's state. | 167 // Updates |devices_| when there is a change to the CBCentralManager's state. |
168 void LowEnergyCentralManagerUpdatedState(); | 168 void LowEnergyCentralManagerUpdatedState(); |
169 | 169 |
170 // Removes from |devices_| any previously paired, connected or seen devices | |
171 // which are no longer present. Notifies observers. | |
172 void RemoveTimedOutDevices(); | |
173 | |
174 // Updates |devices_| to include the currently paired devices and notifies | 170 // Updates |devices_| to include the currently paired devices and notifies |
175 // observers. | 171 // observers. |
176 void AddPairedDevices(); | 172 void AddPairedDevices(); |
177 | 173 |
178 // Returns the BLE device associated with the CoreBluetooth peripheral. | 174 // Returns the BLE device associated with the CoreBluetooth peripheral. |
179 BluetoothLowEnergyDeviceMac* GetBluetoothLowEnergyDeviceMac( | 175 BluetoothLowEnergyDeviceMac* GetBluetoothLowEnergyDeviceMac( |
180 CBPeripheral* peripheral); | 176 CBPeripheral* peripheral); |
181 | 177 |
182 std::string address_; | 178 std::string address_; |
183 std::string name_; | 179 std::string name_; |
(...skipping 15 matching lines...) Expand all Loading... |
199 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; | 195 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; |
200 | 196 |
201 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; | 197 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; |
202 | 198 |
203 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); | 199 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); |
204 }; | 200 }; |
205 | 201 |
206 } // namespace device | 202 } // namespace device |
207 | 203 |
208 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ | 204 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ |
OLD | NEW |