| 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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 FRIEND_TEST_ALL_PREFIXES( | 477 FRIEND_TEST_ALL_PREFIXES( |
| 478 BluetoothTest, | 478 BluetoothTest, |
| 479 BluetoothGattConnection_DisconnectGatt_SimulateConnect); | 479 BluetoothGattConnection_DisconnectGatt_SimulateConnect); |
| 480 FRIEND_TEST_ALL_PREFIXES( | 480 FRIEND_TEST_ALL_PREFIXES( |
| 481 BluetoothTest, | 481 BluetoothTest, |
| 482 BluetoothGattConnection_DisconnectGatt_SimulateDisconnect); | 482 BluetoothGattConnection_DisconnectGatt_SimulateDisconnect); |
| 483 FRIEND_TEST_ALL_PREFIXES(BluetoothTest, | 483 FRIEND_TEST_ALL_PREFIXES(BluetoothTest, |
| 484 BluetoothGattConnection_ErrorAfterConnection); | 484 BluetoothGattConnection_ErrorAfterConnection); |
| 485 FRIEND_TEST_ALL_PREFIXES(BluetoothTest, | 485 FRIEND_TEST_ALL_PREFIXES(BluetoothTest, |
| 486 BluetoothGattConnection_DisconnectGatt_Cleanup); | 486 BluetoothGattConnection_DisconnectGatt_Cleanup); |
| 487 FRIEND_TEST_ALL_PREFIXES(BluetoothTest, GetDeviceName_NullName); |
| 487 | 488 |
| 488 BluetoothDevice(BluetoothAdapter* adapter); | 489 BluetoothDevice(BluetoothAdapter* adapter); |
| 489 | 490 |
| 490 // Returns the internal name of the Bluetooth device, used by GetName(). | 491 // Returns the internal name of the Bluetooth device, used by GetName(). |
| 491 virtual std::string GetDeviceName() const = 0; | 492 virtual std::string GetDeviceName() const = 0; |
| 492 | 493 |
| 493 // Implements platform specific operations to initiate a GATT connection. | 494 // Implements platform specific operations to initiate a GATT connection. |
| 494 // Subclasses must also call DidConnectGatt, DidFailToConnectGatt, or | 495 // Subclasses must also call DidConnectGatt, DidFailToConnectGatt, or |
| 495 // DidDisconnectGatt immediately or asynchronously as the connection state | 496 // DidDisconnectGatt immediately or asynchronously as the connection state |
| 496 // changes. | 497 // changes. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 | 552 |
| 552 private: | 553 private: |
| 553 // Returns a localized string containing the device's bluetooth address and | 554 // Returns a localized string containing the device's bluetooth address and |
| 554 // a device type for display when |name_| is empty. | 555 // a device type for display when |name_| is empty. |
| 555 base::string16 GetAddressWithLocalizedDeviceTypeName() const; | 556 base::string16 GetAddressWithLocalizedDeviceTypeName() const; |
| 556 }; | 557 }; |
| 557 | 558 |
| 558 } // namespace device | 559 } // namespace device |
| 559 | 560 |
| 560 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ | 561 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
| OLD | NEW |