summaryrefslogtreecommitdiffstats
path: root/device/bluetooth/bluetooth_device.cc
diff options
context:
space:
mode:
authordeymo@chromium.org <deymo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-26 20:35:07 +0000
committerdeymo@chromium.org <deymo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-26 20:35:07 +0000
commit60625cb1fb7cf9f075048175cc4872f050011830 (patch)
treecca52456e42b5dee84172dedd3c70a2bb048128f /device/bluetooth/bluetooth_device.cc
parentdcdda4312c4e0524ba9d35ab5ae78c8f9f69689b (diff)
downloadchromium_src-60625cb1fb7cf9f075048175cc4872f050011830.zip
chromium_src-60625cb1fb7cf9f075048175cc4872f050011830.tar.gz
chromium_src-60625cb1fb7cf9f075048175cc4872f050011830.tar.bz2
Bluetooth: Add a "connecting" property to BluetoothDevice.
The current BluetoothDevice doesn't not permit an external observer (like an option handler) to know if there is a connection in process for a given device. This fix adds the IsConnecting() method exposing if there's is a connection going on for such device. BUG=chromium-os:38411 TEST=Add a log message after each connecting_calls_ change to watch the value in the logs. Works as intended. Review URL: https://chromiumcodereview.appspot.com/12335086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184721 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/bluetooth/bluetooth_device.cc')
-rw-r--r--device/bluetooth/bluetooth_device.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/device/bluetooth/bluetooth_device.cc b/device/bluetooth/bluetooth_device.cc
index 5bad91a..a2249c5 100644
--- a/device/bluetooth/bluetooth_device.cc
+++ b/device/bluetooth/bluetooth_device.cc
@@ -23,7 +23,8 @@ BluetoothDevice::BluetoothDevice()
visible_(false),
bonded_(false),
connected_(false),
- connectable_(true) {
+ connectable_(true),
+ connecting_(false) {
}
BluetoothDevice::~BluetoothDevice() {
@@ -180,6 +181,10 @@ bool BluetoothDevice::IsConnectable() const {
return connectable_;
}
+bool BluetoothDevice::IsConnecting() const {
+ return connecting_;
+}
+
bool BluetoothDevice::ProvidesServiceWithUUID(
const std::string& uuid) const {
std::string canonical_uuid = bluetooth_utils::CanonicalUuid(uuid);