Index: components/pairing/bluetooth_host_pairing_controller.h |
diff --git a/components/pairing/bluetooth_host_pairing_controller.h b/components/pairing/bluetooth_host_pairing_controller.h |
index a9a9d4010a2a2475e8ce726f217ef7b50546d0ec..8eabce07d5f4cfcc8d706a3eecf29934983b8aec 100644 |
--- a/components/pairing/bluetooth_host_pairing_controller.h |
+++ b/components/pairing/bluetooth_host_pairing_controller.h |
@@ -74,6 +74,7 @@ class BluetoothHostPairingController |
void ChangeStage(Stage new_stage); |
void SendHostStatus(); |
+ void SendErrorCodeAndMessage(); |
void OnGetAdapter(scoped_refptr<device::BluetoothAdapter> adapter); |
void SetPowered(); |
@@ -109,6 +110,8 @@ class BluetoothHostPairingController |
void OnUpdateStatusChanged(UpdateStatus update_status) override; |
void OnEnrollmentStatusChanged(EnrollmentStatus enrollment_status) override; |
void SetPermanentId(const std::string& permanent_id) override; |
+ void SetErrorCodeAndMessage(int error_code, |
+ const std::string& error_message) override; |
void Reset() override; |
// ProtoDecoder::Observer: |
@@ -148,6 +151,17 @@ class BluetoothHostPairingController |
std::string controller_device_address_; |
bool was_powered_ = false; |
+ // The format of the |error_code_| is: |
+ // [0, "no error"] |
+ // [1*, "network error"] |
+ // [2*, "authentication error"], e.g., [21, "Service unavailable"], ... |
+ // [3*, "enrollment error"], e.g., [31, "DMserver registration error"], ... |
+ // [4*, "other error"] |
+ // The |error_code_| and |error_message_| will pass over to the master device |
+ // to assist error diagnosis. |
+ int error_code_ = 0; |
+ std::string error_message_; |
+ |
scoped_refptr<device::BluetoothAdapter> adapter_; |
scoped_refptr<device::BluetoothSocket> service_socket_; |
scoped_refptr<device::BluetoothSocket> controller_socket_; |