Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Side by Side Diff: device/bluetooth/bluetooth_device.h

Issue 287073003: bluetooth_device: Support for Playstation DualShock3 joystick (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/bluetooth/bluetooth_adapter_chromeos.cc ('k') | device/bluetooth/bluetooth_device.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 // Indicates whether the paired device accepts connections initiated from the 271 // Indicates whether the paired device accepts connections initiated from the
272 // adapter. This value is undefined for unpaired devices. 272 // adapter. This value is undefined for unpaired devices.
273 virtual bool IsConnectable() const = 0; 273 virtual bool IsConnectable() const = 0;
274 274
275 // Indicates whether there is a call to Connect() ongoing. For this attribute, 275 // Indicates whether there is a call to Connect() ongoing. For this attribute,
276 // we consider a call is ongoing if none of the callbacks passed to Connect() 276 // we consider a call is ongoing if none of the callbacks passed to Connect()
277 // were called after the corresponding call to Connect(). 277 // were called after the corresponding call to Connect().
278 virtual bool IsConnecting() const = 0; 278 virtual bool IsConnecting() const = 0;
279 279
280 // Indicates whether the device can be trusted, based on device properties,
281 // such as vendor and product id.
282 bool IsTrustable() const;
283
280 // Returns the set of UUIDs that this device supports. For classic Bluetooth 284 // Returns the set of UUIDs that this device supports. For classic Bluetooth
281 // devices this data is collected from both the EIR data and SDP tables, 285 // devices this data is collected from both the EIR data and SDP tables,
282 // for Low Energy devices this data is collected from AD and GATT primary 286 // for Low Energy devices this data is collected from AD and GATT primary
283 // services, for dual mode devices this may be collected from both./ 287 // services, for dual mode devices this may be collected from both./
284 typedef std::vector<BluetoothUUID> UUIDList; 288 typedef std::vector<BluetoothUUID> UUIDList;
285 virtual UUIDList GetUUIDs() const = 0; 289 virtual UUIDList GetUUIDs() const = 0;
286 290
287 // The ErrorCallback is used for methods that can fail in which case it 291 // The ErrorCallback is used for methods that can fail in which case it
288 // is called, in the success case the callback is simply not called. 292 // is called, in the success case the callback is simply not called.
289 typedef base::Callback<void()> ErrorCallback; 293 typedef base::Callback<void()> ErrorCallback;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 435
432 private: 436 private:
433 // Returns a localized string containing the device's bluetooth address and 437 // Returns a localized string containing the device's bluetooth address and
434 // a device type for display when |name_| is empty. 438 // a device type for display when |name_| is empty.
435 base::string16 GetAddressWithLocalizedDeviceTypeName() const; 439 base::string16 GetAddressWithLocalizedDeviceTypeName() const;
436 }; 440 };
437 441
438 } // namespace device 442 } // namespace device
439 443
440 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 444 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_chromeos.cc ('k') | device/bluetooth/bluetooth_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698