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_BLUEZ_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_BLUEZ_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_BLUEZ_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_BLUEZ_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 // with path |object_path|. Returns the existing pairing object if the device | 241 // with path |object_path|. Returns the existing pairing object if the device |
242 // already has one (usually an outgoing connection in progress) or a new | 242 // already has one (usually an outgoing connection in progress) or a new |
243 // pairing object with the default pairing delegate if not. If no default | 243 // pairing object with the default pairing delegate if not. If no default |
244 // pairing object exists, NULL will be returned. | 244 // pairing object exists, NULL will be returned. |
245 BluetoothPairingBlueZ* GetPairing(const dbus::ObjectPath& object_path); | 245 BluetoothPairingBlueZ* GetPairing(const dbus::ObjectPath& object_path); |
246 | 246 |
247 // Set the tracked adapter to the one in |object_path|, this object will | 247 // Set the tracked adapter to the one in |object_path|, this object will |
248 // subsequently operate on that adapter until it is removed. | 248 // subsequently operate on that adapter until it is removed. |
249 void SetAdapter(const dbus::ObjectPath& object_path); | 249 void SetAdapter(const dbus::ObjectPath& object_path); |
250 | 250 |
| 251 #if defined(OS_CHROMEOS) |
251 // Set the adapter name to one chosen from the system information. | 252 // Set the adapter name to one chosen from the system information. |
252 void SetDefaultAdapterName(); | 253 void SetStandardChromeOSAdapterName(); |
| 254 #endif |
253 | 255 |
254 // Remove the currently tracked adapter. IsPresent() will return false after | 256 // Remove the currently tracked adapter. IsPresent() will return false after |
255 // this is called. | 257 // this is called. |
256 void RemoveAdapter(); | 258 void RemoveAdapter(); |
257 | 259 |
258 // Announce to observers a change in the adapter state. | 260 // Announce to observers a change in the adapter state. |
259 void PoweredChanged(bool powered); | 261 void PoweredChanged(bool powered); |
260 void DiscoverableChanged(bool discoverable); | 262 void DiscoverableChanged(bool discoverable); |
261 void DiscoveringChanged(bool discovering); | 263 void DiscoveringChanged(bool discovering); |
262 void PresentChanged(bool present); | 264 void PresentChanged(bool present); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 // Note: This should remain the last member so it'll be destroyed and | 389 // Note: This should remain the last member so it'll be destroyed and |
388 // invalidate its weak pointers before any other members are destroyed. | 390 // invalidate its weak pointers before any other members are destroyed. |
389 base::WeakPtrFactory<BluetoothAdapterBlueZ> weak_ptr_factory_; | 391 base::WeakPtrFactory<BluetoothAdapterBlueZ> weak_ptr_factory_; |
390 | 392 |
391 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterBlueZ); | 393 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterBlueZ); |
392 }; | 394 }; |
393 | 395 |
394 } // namespace bluez | 396 } // namespace bluez |
395 | 397 |
396 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_BLUEZ_H_ | 398 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_BLUEZ_H_ |
OLD | NEW |