OLD | NEW |
---|---|
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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
310 // * For classic Bluetooth devices this data is collected from both the EIR | 310 // * For classic Bluetooth devices this data is collected from both the EIR |
311 // data and SDP tables. | 311 // data and SDP tables. |
312 // * For non-connected Low Energy Devices this returns the latest advertised | 312 // * For non-connected Low Energy Devices this returns the latest advertised |
313 // UUIDs. | 313 // UUIDs. |
314 // * For connected Low Energy Devices for which services have not been | 314 // * For connected Low Energy Devices for which services have not been |
315 // discovered returns an empty list. | 315 // discovered returns an empty list. |
316 // * For connected Low Energy Devices for which services have been discovered | 316 // * For connected Low Energy Devices for which services have been discovered |
317 // returns the UUIDs of the device's services. | 317 // returns the UUIDs of the device's services. |
318 // * For dual mode devices this may be collected from both. | 318 // * For dual mode devices this may be collected from both. |
319 // | 319 // |
320 // Note: On ChromeOS and Linux, Bluez persists all services meaning if | 320 // Note: On ChromeOS and Linux, BlueZ persists all services meaning if |
321 // a device stops advertising a service this function will still return | 321 // a device stops advertising a service this function will still return |
322 // its UUID. | 322 // its UUID. |
323 virtual UUIDSet GetUUIDs() const; | 323 virtual UUIDSet GetUUIDs() const; |
324 | 324 |
325 // Returns the last advertised Service Data. Returns an empty map if the | 325 // Returns the last advertised Service Data. Returns an empty map if the |
326 // adapter is not discovering. | 326 // adapter is not discovering. |
327 // | |
328 // Note: On ChromeOS and Linux, BlueZ persists all service data meaning if | |
329 // a device stops advertising service data this function will still return | |
ortuno
2016/10/06 02:09:01
nit:
// a device stops advertising service data fo
puthik_chromium
2016/10/06 02:26:12
Done.
| |
330 // the cached value. | |
327 const ServiceDataMap& GetServiceData() const; | 331 const ServiceDataMap& GetServiceData() const; |
328 | 332 |
329 // Returns the UUIDs of services for which the device advertises Service Data. | 333 // Returns the UUIDs of services for which the device advertises Service Data. |
330 // Returns an empty set if the adapter is not discovering. | 334 // Returns an empty set if the adapter is not discovering. |
331 UUIDSet GetServiceDataUUIDs() const; | 335 UUIDSet GetServiceDataUUIDs() const; |
332 | 336 |
333 // Returns a pointer to the Service Data for Service with |uuid|. Returns | 337 // Returns a pointer to the Service Data for Service with |uuid|. Returns |
334 // nullptr if |uuid| has no Service Data. | 338 // nullptr if |uuid| has no Service Data. |
335 const std::vector<uint8_t>* GetServiceDataForUUID( | 339 const std::vector<uint8_t>* GetServiceDataForUUID( |
336 const BluetoothUUID& uuid) const; | 340 const BluetoothUUID& uuid) const; |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
646 | 650 |
647 private: | 651 private: |
648 // Returns a localized string containing the device's bluetooth address and | 652 // Returns a localized string containing the device's bluetooth address and |
649 // a device type for display when |name_| is empty. | 653 // a device type for display when |name_| is empty. |
650 base::string16 GetAddressWithLocalizedDeviceTypeName() const; | 654 base::string16 GetAddressWithLocalizedDeviceTypeName() const; |
651 }; | 655 }; |
652 | 656 |
653 } // namespace device | 657 } // namespace device |
654 | 658 |
655 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ | 659 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
OLD | NEW |