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