Chromium Code Reviews| 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 436 // BluetoothDevice::Disconnect or other unexpected circumstances, the | 436 // BluetoothDevice::Disconnect or other unexpected circumstances, the |
| 437 // returned BluetoothGattConnection will be automatically marked as inactive. | 437 // returned BluetoothGattConnection will be automatically marked as inactive. |
| 438 // To monitor the state of the connection, observe the | 438 // To monitor the state of the connection, observe the |
| 439 // BluetoothAdapter::Observer::DeviceChanged method. | 439 // BluetoothAdapter::Observer::DeviceChanged method. |
| 440 typedef base::Callback<void(scoped_ptr<BluetoothGattConnection>)> | 440 typedef base::Callback<void(scoped_ptr<BluetoothGattConnection>)> |
| 441 GattConnectionCallback; | 441 GattConnectionCallback; |
| 442 virtual void CreateGattConnection(const GattConnectionCallback& callback, | 442 virtual void CreateGattConnection(const GattConnectionCallback& callback, |
| 443 const ConnectErrorCallback& error_callback); | 443 const ConnectErrorCallback& error_callback); |
| 444 | 444 |
| 445 // Set the gatt services discovery complete flag for this device. | 445 // Set the gatt services discovery complete flag for this device. |
| 446 void SetGattServicesDiscoveryComplete(bool complete); | 446 virtual void SetGattServicesDiscoveryComplete(bool complete); |
|
ortuno
2016/04/20 20:19:14
I had to fix some tests that required this to be v
| |
| 447 | 447 |
| 448 // Indicates whether service discovery is complete for this device. | 448 // Indicates whether service discovery is complete for this device. |
| 449 bool IsGattServicesDiscoveryComplete() const; | 449 virtual bool IsGattServicesDiscoveryComplete() const; |
| 450 | 450 |
| 451 // Returns the list of discovered GATT services. | 451 // Returns the list of discovered GATT services. |
| 452 virtual std::vector<BluetoothGattService*> GetGattServices() const; | 452 virtual std::vector<BluetoothGattService*> GetGattServices() const; |
| 453 | 453 |
| 454 // Returns the GATT service with device-specific identifier |identifier|. | 454 // Returns the GATT service with device-specific identifier |identifier|. |
| 455 // Returns NULL, if no such service exists. | 455 // Returns NULL, if no such service exists. |
| 456 virtual BluetoothGattService* GetGattService( | 456 virtual BluetoothGattService* GetGattService( |
| 457 const std::string& identifier) const; | 457 const std::string& identifier) const; |
| 458 | 458 |
| 459 // Returns service data of a service given its UUID. | 459 // Returns service data of a service given its UUID. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 549 | 549 |
| 550 private: | 550 private: |
| 551 // Returns a localized string containing the device's bluetooth address and | 551 // Returns a localized string containing the device's bluetooth address and |
| 552 // a device type for display when |name_| is empty. | 552 // a device type for display when |name_| is empty. |
| 553 base::string16 GetAddressWithLocalizedDeviceTypeName() const; | 553 base::string16 GetAddressWithLocalizedDeviceTypeName() const; |
| 554 }; | 554 }; |
| 555 | 555 |
| 556 } // namespace device | 556 } // namespace device |
| 557 | 557 |
| 558 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ | 558 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
| OLD | NEW |