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