| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 int max_transmit_power; | 70 int max_transmit_power; |
| 71 | 71 |
| 72 ConnectionInfo(); | 72 ConnectionInfo(); |
| 73 ConnectionInfo(int rssi, int transmit_power, int max_transmit_power); | 73 ConnectionInfo(int rssi, int transmit_power, int max_transmit_power); |
| 74 ~ConnectionInfo(); | 74 ~ConnectionInfo(); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 // Possible errors passed back to an error callback function in case of a | 77 // Possible errors passed back to an error callback function in case of a |
| 78 // failed call to Connect(). | 78 // failed call to Connect(). |
| 79 enum ConnectErrorCode { | 79 enum ConnectErrorCode { |
| 80 ERROR_ATTRIBUTE_LENGTH_INVALID, | |
| 81 ERROR_AUTH_CANCELED, | 80 ERROR_AUTH_CANCELED, |
| 82 ERROR_AUTH_FAILED, | 81 ERROR_AUTH_FAILED, |
| 83 ERROR_AUTH_REJECTED, | 82 ERROR_AUTH_REJECTED, |
| 84 ERROR_AUTH_TIMEOUT, | 83 ERROR_AUTH_TIMEOUT, |
| 85 ERROR_CONNECTION_CONGESTED, | |
| 86 ERROR_FAILED, | 84 ERROR_FAILED, |
| 87 ERROR_INPROGRESS, | 85 ERROR_INPROGRESS, |
| 88 ERROR_INSUFFICIENT_ENCRYPTION, | |
| 89 ERROR_OFFSET_INVALID, | |
| 90 ERROR_READ_NOT_PERMITTED, | |
| 91 ERROR_REQUEST_NOT_SUPPORTED, | |
| 92 ERROR_UNKNOWN, | 86 ERROR_UNKNOWN, |
| 93 ERROR_UNSUPPORTED_DEVICE, | 87 ERROR_UNSUPPORTED_DEVICE, |
| 94 ERROR_WRITE_NOT_PERMITTED, | |
| 95 NUM_CONNECT_ERROR_CODES // Keep as last enum. | 88 NUM_CONNECT_ERROR_CODES // Keep as last enum. |
| 96 }; | 89 }; |
| 97 | 90 |
| 98 typedef std::vector<BluetoothUUID> UUIDList; | 91 typedef std::vector<BluetoothUUID> UUIDList; |
| 99 typedef std::unordered_set<BluetoothUUID, BluetoothUUIDHash> UUIDSet; | 92 typedef std::unordered_set<BluetoothUUID, BluetoothUUIDHash> UUIDSet; |
| 100 typedef std::unordered_map<BluetoothUUID, | 93 typedef std::unordered_map<BluetoothUUID, |
| 101 std::vector<uint8_t>, | 94 std::vector<uint8_t>, |
| 102 BluetoothUUIDHash> | 95 BluetoothUUIDHash> |
| 103 ServiceDataMap; | 96 ServiceDataMap; |
| 104 typedef uint16_t ManufacturerId; | 97 typedef uint16_t ManufacturerId; |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 // Returns a localized string containing the device's bluetooth address and | 684 // Returns a localized string containing the device's bluetooth address and |
| 692 // a device type for display when |name_| is empty. | 685 // a device type for display when |name_| is empty. |
| 693 base::string16 GetAddressWithLocalizedDeviceTypeName() const; | 686 base::string16 GetAddressWithLocalizedDeviceTypeName() const; |
| 694 | 687 |
| 695 DISALLOW_COPY_AND_ASSIGN(BluetoothDevice); | 688 DISALLOW_COPY_AND_ASSIGN(BluetoothDevice); |
| 696 }; | 689 }; |
| 697 | 690 |
| 698 } // namespace device | 691 } // namespace device |
| 699 | 692 |
| 700 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ | 693 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
| OLD | NEW |