diff options
author | deymo@chromium.org <deymo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-23 05:56:53 +0000 |
---|---|---|
committer | deymo@chromium.org <deymo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-23 05:56:53 +0000 |
commit | 9a0f295ea0f00cda9cfa2e5ca001520719936feb (patch) | |
tree | ddc8d3cf85f7a0ae771f517f60c0ceb39985cf7a /device/bluetooth/bluetooth_device.cc | |
parent | 56c4dec4b2fea6158a81d1f8c3d0a81e2da7c2de (diff) | |
download | chromium_src-9a0f295ea0f00cda9cfa2e5ca001520719936feb.zip chromium_src-9a0f295ea0f00cda9cfa2e5ca001520719936feb.tar.gz chromium_src-9a0f295ea0f00cda9cfa2e5ca001520719936feb.tar.bz2 |
Bluetooth: Add a "connectable" property to the BluetoothDevice.
This fix adds a new "connectable" property to the BluetoothDevice telling
whether the device normally accepts connections initiated from the adapter
when the device is paired but disconnected. Mice and keyboards are usually
not connectable under this definition, while any other device is usually
connectable.
BUG=chromium-os:38410
TEST=Run in Debug mode and watch the "connectable" property in the chrome logs. A bluetooth mouse show connectable=0.
Review URL: https://chromiumcodereview.appspot.com/12310048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/bluetooth/bluetooth_device.cc')
-rw-r--r-- | device/bluetooth/bluetooth_device.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/device/bluetooth/bluetooth_device.cc b/device/bluetooth/bluetooth_device.cc index 8c866d4..05a1bdc 100644 --- a/device/bluetooth/bluetooth_device.cc +++ b/device/bluetooth/bluetooth_device.cc @@ -14,7 +14,8 @@ BluetoothDevice::BluetoothDevice() : bluetooth_class_(0), visible_(false), bonded_(false), - connected_(false) { + connected_(false), + connectable_(true) { } BluetoothDevice::~BluetoothDevice() { @@ -167,4 +168,8 @@ bool BluetoothDevice::IsConnected() const { return connected_; } +bool BluetoothDevice::IsConnectable() const { + return connectable_; +} + } // namespace device |