Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: device/bluetooth/bluetooth_device.h

Issue 1464443002: bluetooth: android: Add BluetoothDevice::ConnectErrorCode enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: VI Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 int max_transmit_power; 85 int max_transmit_power;
86 86
87 ConnectionInfo(); 87 ConnectionInfo();
88 ConnectionInfo(int rssi, int transmit_power, int max_transmit_power); 88 ConnectionInfo(int rssi, int transmit_power, int max_transmit_power);
89 ~ConnectionInfo(); 89 ~ConnectionInfo();
90 }; 90 };
91 91
92 // Possible errors passed back to an error callback function in case of a 92 // Possible errors passed back to an error callback function in case of a
93 // failed call to Connect(). 93 // failed call to Connect().
94 enum ConnectErrorCode { 94 enum ConnectErrorCode {
95 ERROR_UNKNOWN, 95 ERROR_ATTRIBUTE_LENGTH_INVALID,
96 ERROR_INPROGRESS, 96 ERROR_AUTH_CANCELED,
97 ERROR_FAILED,
98 ERROR_AUTH_FAILED, 97 ERROR_AUTH_FAILED,
99 ERROR_AUTH_CANCELED,
100 ERROR_AUTH_REJECTED, 98 ERROR_AUTH_REJECTED,
101 ERROR_AUTH_TIMEOUT, 99 ERROR_AUTH_TIMEOUT,
102 ERROR_UNSUPPORTED_DEVICE 100 ERROR_CONNECTION_CONGESTED,
101 ERROR_FAILED,
102 ERROR_INPROGRESS,
103 ERROR_INSUFFICIENT_ENCRYPTION,
104 ERROR_OFFSET_INVALID,
105 ERROR_READ_NOT_PERMITTED,
106 ERROR_REQUEST_NOT_SUPPORTED,
107 ERROR_UNKNOWN,
108 ERROR_UNSUPPORTED_DEVICE,
109 ERROR_WRITE_NOT_PERMITTED,
110 NUM_CONNECT_ERROR_CODES // Keep as last enum.
103 }; 111 };
104 112
105 typedef std::vector<BluetoothUUID> UUIDList; 113 typedef std::vector<BluetoothUUID> UUIDList;
106 114
107 // Interface for negotiating pairing of bluetooth devices. 115 // Interface for negotiating pairing of bluetooth devices.
108 class PairingDelegate { 116 class PairingDelegate {
109 public: 117 public:
110 virtual ~PairingDelegate() {} 118 virtual ~PairingDelegate() {}
111 119
112 // This method will be called when the Bluetooth daemon requires a 120 // This method will be called when the Bluetooth daemon requires a
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 527
520 private: 528 private:
521 // Returns a localized string containing the device's bluetooth address and 529 // Returns a localized string containing the device's bluetooth address and
522 // a device type for display when |name_| is empty. 530 // a device type for display when |name_| is empty.
523 base::string16 GetAddressWithLocalizedDeviceTypeName() const; 531 base::string16 GetAddressWithLocalizedDeviceTypeName() const;
524 }; 532 };
525 533
526 } // namespace device 534 } // namespace device
527 535
528 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 536 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698