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 #include "device/bluetooth/bluetooth_device_chromeos.h" | 5 #include "device/bluetooth/bluetooth_device_chromeos.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 ParseModalias(object_path_, NULL, NULL, &product_id, NULL); | 205 ParseModalias(object_path_, NULL, NULL, &product_id, NULL); |
206 return product_id; | 206 return product_id; |
207 } | 207 } |
208 | 208 |
209 uint16 BluetoothDeviceChromeOS::GetDeviceID() const { | 209 uint16 BluetoothDeviceChromeOS::GetDeviceID() const { |
210 uint16 device_id = 0; | 210 uint16 device_id = 0; |
211 ParseModalias(object_path_, NULL, NULL, NULL, &device_id); | 211 ParseModalias(object_path_, NULL, NULL, NULL, &device_id); |
212 return device_id; | 212 return device_id; |
213 } | 213 } |
214 | 214 |
| 215 int BluetoothDeviceChromeOS::GetRSSI() const { |
| 216 NOTIMPLEMENTED(); |
| 217 return kUnknownPower; |
| 218 } |
| 219 |
| 220 int BluetoothDeviceChromeOS::GetCurrentHostTransmitPower() const { |
| 221 NOTIMPLEMENTED(); |
| 222 return kUnknownPower; |
| 223 } |
| 224 |
| 225 int BluetoothDeviceChromeOS::GetMaximumHostTransmitPower() const { |
| 226 NOTIMPLEMENTED(); |
| 227 return kUnknownPower; |
| 228 } |
| 229 |
215 bool BluetoothDeviceChromeOS::IsPaired() const { | 230 bool BluetoothDeviceChromeOS::IsPaired() const { |
216 BluetoothDeviceClient::Properties* properties = | 231 BluetoothDeviceClient::Properties* properties = |
217 DBusThreadManager::Get()->GetBluetoothDeviceClient()-> | 232 DBusThreadManager::Get()->GetBluetoothDeviceClient()-> |
218 GetProperties(object_path_); | 233 GetProperties(object_path_); |
219 DCHECK(properties); | 234 DCHECK(properties); |
220 | 235 |
221 // Trusted devices are devices that don't support pairing but that the | 236 // Trusted devices are devices that don't support pairing but that the |
222 // user has explicitly connected; it makes no sense for UI purposes to | 237 // user has explicitly connected; it makes no sense for UI purposes to |
223 // treat them differently from each other. | 238 // treat them differently from each other. |
224 return properties->paired.value() || properties->trusted.value(); | 239 return properties->paired.value() || properties->trusted.value(); |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 const std::string& error_message) { | 677 const std::string& error_message) { |
663 BluetoothProfileChromeOS* profile_chromeos = | 678 BluetoothProfileChromeOS* profile_chromeos = |
664 static_cast<BluetoothProfileChromeOS*>(profile); | 679 static_cast<BluetoothProfileChromeOS*>(profile); |
665 VLOG(1) << object_path_.value() << ": Profile connection failed: " | 680 VLOG(1) << object_path_.value() << ": Profile connection failed: " |
666 << profile_chromeos->uuid().canonical_value() << ": " | 681 << profile_chromeos->uuid().canonical_value() << ": " |
667 << error_name << ": " << error_message; | 682 << error_name << ": " << error_message; |
668 error_callback.Run(error_message); | 683 error_callback.Run(error_message); |
669 } | 684 } |
670 | 685 |
671 } // namespace chromeos | 686 } // namespace chromeos |
OLD | NEW |