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

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

Issue 1220713006: Renaming BluetoothDeviceMac as BluetoothClassicDeviceMac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dm
Patch Set: Created 5 years, 5 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
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // authorized. The delegate should decide whether the user should confirm 181 // authorized. The delegate should decide whether the user should confirm
182 // or not, then call ConfirmPairing() on the device to confirm the pairing 182 // or not, then call ConfirmPairing() on the device to confirm the pairing
183 // (whether by user action or by default), RejectPairing() on the device to 183 // (whether by user action or by default), RejectPairing() on the device to
184 // reject or CancelPairing() on the device to cancel authorization for 184 // reject or CancelPairing() on the device to cancel authorization for
185 // any other reason. 185 // any other reason.
186 virtual void AuthorizePairing(BluetoothDevice* device) = 0; 186 virtual void AuthorizePairing(BluetoothDevice* device) = 0;
187 }; 187 };
188 188
189 virtual ~BluetoothDevice(); 189 virtual ~BluetoothDevice();
190 190
191 // Indicates whether the device supports bluetooth low energy. Note that false
192 // negatives are possible if supports_low_energy_ is not set on construction.
193 virtual bool SupportsLowEnergy() const;
scheib 2015/06/29 20:44:24 Unless Arman is already on board with this, I thin
krstnmnlsn 2015/06/30 00:50:35 Done. See https://codereview.chromium.org/12110130
194
195 // Indicates whether the device supports bluetooth classic. Note that false
196 // negatives are possible if supports_classic_ is not set on construction.
197 virtual bool SupportsClassic() const;
198
191 // Returns the Bluetooth class of the device, used by GetDeviceType() 199 // Returns the Bluetooth class of the device, used by GetDeviceType()
192 // and metrics logging, 200 // and metrics logging,
193 virtual uint32 GetBluetoothClass() const = 0; 201 virtual uint32 GetBluetoothClass() const = 0;
194 202
195 // Returns the identifier of the bluetooth device. 203 // Returns the identifier of the bluetooth device.
196 virtual std::string GetIdentifier() const; 204 virtual std::string GetIdentifier() const;
197 205
198 // Returns the Bluetooth of address the device. This should be used as 206 // Returns the Bluetooth of address the device. This should be used as
199 // a unique key to identify the device and copied where needed. 207 // a unique key to identify the device and copied where needed.
200 virtual std::string GetAddress() const = 0; 208 virtual std::string GetAddress() const = 0;
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // Mapping from the platform-specific GATT service identifiers to 453 // Mapping from the platform-specific GATT service identifiers to
446 // BluetoothGattService objects. 454 // BluetoothGattService objects.
447 typedef std::map<std::string, BluetoothGattService*> GattServiceMap; 455 typedef std::map<std::string, BluetoothGattService*> GattServiceMap;
448 GattServiceMap gatt_services_; 456 GattServiceMap gatt_services_;
449 457
450 // Mapping from service UUID represented as a std::string of a bluetooth 458 // Mapping from service UUID represented as a std::string of a bluetooth
451 // service to 459 // service to
452 // the specific data. The data is stored as BinaryValue. 460 // the specific data. The data is stored as BinaryValue.
453 scoped_ptr<base::DictionaryValue> services_data_; 461 scoped_ptr<base::DictionaryValue> services_data_;
454 462
463 // Indicates whether the device supports low energy and classic.
464 bool supports_low_energy_;
scheib 2015/06/29 20:44:24 Members need values in constructor or being added
krstnmnlsn 2015/06/30 00:50:35 Acknowledged.
465 bool supports_classic_;
466
455 private: 467 private:
456 // Returns a localized string containing the device's bluetooth address and 468 // Returns a localized string containing the device's bluetooth address and
457 // a device type for display when |name_| is empty. 469 // a device type for display when |name_| is empty.
458 base::string16 GetAddressWithLocalizedDeviceTypeName() const; 470 base::string16 GetAddressWithLocalizedDeviceTypeName() const;
459 }; 471 };
460 472
461 } // namespace device 473 } // namespace device
462 474
463 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 475 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698