| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_ | 6 #define CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 class BluetoothManagerClient; | 27 class BluetoothManagerClient; |
| 28 | 28 |
| 29 // BluetoothAdapterClient is used to communicate with a bluetooth Adapter | 29 // BluetoothAdapterClient is used to communicate with a bluetooth Adapter |
| 30 // interface. | 30 // interface. |
| 31 class CHROMEOS_EXPORT BluetoothAdapterClient { | 31 class CHROMEOS_EXPORT BluetoothAdapterClient { |
| 32 public: | 32 public: |
| 33 // Structure of properties associated with bluetooth adapters. | 33 // Structure of properties associated with bluetooth adapters. |
| 34 struct Properties : public BluetoothPropertySet { | 34 struct Properties : public BluetoothPropertySet { |
| 35 // The Bluetooth device address of the adapter. Read-only. | 35 // The Bluetooth device address of the adapter. Read-only. |
| 36 BluetoothProperty<std::string> address; | 36 dbus::Property<std::string> address; |
| 37 | 37 |
| 38 // The Bluetooth friendly name of the adapter, unlike remote devices, | 38 // The Bluetooth friendly name of the adapter, unlike remote devices, |
| 39 // this property can be changed to change the presentation for when | 39 // this property can be changed to change the presentation for when |
| 40 // the adapter is discoverable. | 40 // the adapter is discoverable. |
| 41 BluetoothProperty<std::string> name; | 41 dbus::Property<std::string> name; |
| 42 | 42 |
| 43 // The Bluetooth class of the adapter device. Read-only. | 43 // The Bluetooth class of the adapter device. Read-only. |
| 44 BluetoothProperty<uint32> bluetooth_class; | 44 dbus::Property<uint32> bluetooth_class; |
| 45 | 45 |
| 46 // Whether the adapter radio is powered. | 46 // Whether the adapter radio is powered. |
| 47 BluetoothProperty<bool> powered; | 47 dbus::Property<bool> powered; |
| 48 | 48 |
| 49 // Whether the adapter is discoverable by other Bluetooth devices. | 49 // Whether the adapter is discoverable by other Bluetooth devices. |
| 50 // |discovering_timeout| is used to automatically disable after a time | 50 // |discovering_timeout| is used to automatically disable after a time |
| 51 // period. | 51 // period. |
| 52 BluetoothProperty<bool> discoverable; | 52 dbus::Property<bool> discoverable; |
| 53 | 53 |
| 54 // Whether the adapter accepts incoming pairing requests from other | 54 // Whether the adapter accepts incoming pairing requests from other |
| 55 // Bluetooth devices. |pairable_timeout| is used to automatically disable | 55 // Bluetooth devices. |pairable_timeout| is used to automatically disable |
| 56 // after a time period. | 56 // after a time period. |
| 57 BluetoothProperty<bool> pairable; | 57 dbus::Property<bool> pairable; |
| 58 | 58 |
| 59 // The timeout in seconds to cease accepting incoming pairing requests | 59 // The timeout in seconds to cease accepting incoming pairing requests |
| 60 // after |pairable| is set to true. Zero means adapter remains pairable | 60 // after |pairable| is set to true. Zero means adapter remains pairable |
| 61 // forever. | 61 // forever. |
| 62 BluetoothProperty<uint32> pairable_timeout; | 62 dbus::Property<uint32> pairable_timeout; |
| 63 | 63 |
| 64 // The timeout in seconds to cease the adapter being discoverable by | 64 // The timeout in seconds to cease the adapter being discoverable by |
| 65 // other Bluetooth devices after |discoverable| is set to true. Zero | 65 // other Bluetooth devices after |discoverable| is set to true. Zero |
| 66 // means adapter remains discoverable forever. | 66 // means adapter remains discoverable forever. |
| 67 BluetoothProperty<uint32> discoverable_timeout; | 67 dbus::Property<uint32> discoverable_timeout; |
| 68 | 68 |
| 69 // Indicates that the adapter is discovering other Bluetooth Devices. | 69 // Indicates that the adapter is discovering other Bluetooth Devices. |
| 70 // Read-only. Use StartDiscovery() to begin discovery. | 70 // Read-only. Use StartDiscovery() to begin discovery. |
| 71 BluetoothProperty<bool> discovering; | 71 dbus::Property<bool> discovering; |
| 72 | 72 |
| 73 // List of object paths of known Bluetooth devices, known devices are | 73 // List of object paths of known Bluetooth devices, known devices are |
| 74 // those that have previously been connected or paired or are currently | 74 // those that have previously been connected or paired or are currently |
| 75 // connected or paired. Read-only. | 75 // connected or paired. Read-only. |
| 76 BluetoothProperty<std::vector<dbus::ObjectPath> > devices; | 76 dbus::Property<std::vector<dbus::ObjectPath> > devices; |
| 77 | 77 |
| 78 // List of 128-bit UUIDs that represent the available local services. | 78 // List of 128-bit UUIDs that represent the available local services. |
| 79 // Read-only. | 79 // Read-only. |
| 80 BluetoothProperty<std::vector<std::string> > uuids; | 80 dbus::Property<std::vector<std::string> > uuids; |
| 81 | 81 |
| 82 Properties(dbus::ObjectProxy* object_proxy, | 82 Properties(dbus::ObjectProxy* object_proxy, |
| 83 PropertyChangedCallback callback); | 83 PropertyChangedCallback callback); |
| 84 virtual ~Properties(); | 84 virtual ~Properties(); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 // Interface for observing changes from a local bluetooth adapter. | 87 // Interface for observing changes from a local bluetooth adapter. |
| 88 class Observer { | 88 class Observer { |
| 89 public: | 89 public: |
| 90 virtual ~Observer() {} | 90 virtual ~Observer() {} |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 protected: | 257 protected: |
| 258 BluetoothAdapterClient(); | 258 BluetoothAdapterClient(); |
| 259 | 259 |
| 260 private: | 260 private: |
| 261 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterClient); | 261 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterClient); |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 } // namespace chromeos | 264 } // namespace chromeos |
| 265 | 265 |
| 266 #endif // CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_ | 266 #endif // CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_ |
| OLD | NEW |