| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMEOS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_ | 5 #ifndef CHROMEOS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_ |
| 6 #define CHROMEOS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_ | 6 #define CHROMEOS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 // HostPairingController: | 64 // HostPairingController: |
| 65 virtual void AddObserver(Observer* observer) override; | 65 virtual void AddObserver(Observer* observer) override; |
| 66 virtual void RemoveObserver(Observer* observer) override; | 66 virtual void RemoveObserver(Observer* observer) override; |
| 67 virtual Stage GetCurrentStage() override; | 67 virtual Stage GetCurrentStage() override; |
| 68 virtual void StartPairing() override; | 68 virtual void StartPairing() override; |
| 69 virtual std::string GetDeviceName() override; | 69 virtual std::string GetDeviceName() override; |
| 70 virtual std::string GetConfirmationCode() override; | 70 virtual std::string GetConfirmationCode() override; |
| 71 virtual std::string GetEnrollmentDomain() override; | 71 virtual std::string GetEnrollmentDomain() override; |
| 72 virtual void OnUpdateStatusChanged(UpdateStatus update_status) override; | 72 virtual void OnUpdateStatusChanged(UpdateStatus update_status) override; |
| 73 virtual void SetEnrollmentComplete(bool success) override; | 73 virtual void OnEnrollmentStatusChanged( |
| 74 EnrollmentStatus enrollment_status) override; |
| 74 | 75 |
| 75 // ProtoDecoder::Observer: | 76 // ProtoDecoder::Observer: |
| 76 virtual void OnHostStatusMessage( | 77 virtual void OnHostStatusMessage( |
| 77 const pairing_api::HostStatus& message) override; | 78 const pairing_api::HostStatus& message) override; |
| 78 virtual void OnConfigureHostMessage( | 79 virtual void OnConfigureHostMessage( |
| 79 const pairing_api::ConfigureHost& message) override; | 80 const pairing_api::ConfigureHost& message) override; |
| 80 virtual void OnPairDevicesMessage( | 81 virtual void OnPairDevicesMessage( |
| 81 const pairing_api::PairDevices& message) override; | 82 const pairing_api::PairDevices& message) override; |
| 82 virtual void OnCompleteSetupMessage( | 83 virtual void OnCompleteSetupMessage( |
| 83 const pairing_api::CompleteSetup& message) override; | 84 const pairing_api::CompleteSetup& message) override; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 97 virtual void KeysEntered(device::BluetoothDevice* device, | 98 virtual void KeysEntered(device::BluetoothDevice* device, |
| 98 uint32 entered) override; | 99 uint32 entered) override; |
| 99 virtual void ConfirmPasskey(device::BluetoothDevice* device, | 100 virtual void ConfirmPasskey(device::BluetoothDevice* device, |
| 100 uint32 passkey) override; | 101 uint32 passkey) override; |
| 101 virtual void AuthorizePairing(device::BluetoothDevice* device) override; | 102 virtual void AuthorizePairing(device::BluetoothDevice* device) override; |
| 102 | 103 |
| 103 Stage current_stage_; | 104 Stage current_stage_; |
| 104 std::string device_name_; | 105 std::string device_name_; |
| 105 std::string confirmation_code_; | 106 std::string confirmation_code_; |
| 106 std::string enrollment_domain_; | 107 std::string enrollment_domain_; |
| 108 UpdateStatus update_status_; |
| 109 EnrollmentStatus enrollment_status_; |
| 107 | 110 |
| 108 scoped_refptr<device::BluetoothAdapter> adapter_; | 111 scoped_refptr<device::BluetoothAdapter> adapter_; |
| 109 device::BluetoothDevice* device_; | 112 device::BluetoothDevice* device_; |
| 110 scoped_refptr<device::BluetoothSocket> service_socket_; | 113 scoped_refptr<device::BluetoothSocket> service_socket_; |
| 111 scoped_refptr<device::BluetoothSocket> controller_socket_; | 114 scoped_refptr<device::BluetoothSocket> controller_socket_; |
| 112 scoped_ptr<ProtoDecoder> proto_decoder_; | 115 scoped_ptr<ProtoDecoder> proto_decoder_; |
| 113 | 116 |
| 114 base::ThreadChecker thread_checker_; | 117 base::ThreadChecker thread_checker_; |
| 115 ObserverList<Observer> observers_; | 118 ObserverList<Observer> observers_; |
| 116 base::WeakPtrFactory<BluetoothHostPairingController> ptr_factory_; | 119 base::WeakPtrFactory<BluetoothHostPairingController> ptr_factory_; |
| 117 | 120 |
| 118 DISALLOW_COPY_AND_ASSIGN(BluetoothHostPairingController); | 121 DISALLOW_COPY_AND_ASSIGN(BluetoothHostPairingController); |
| 119 }; | 122 }; |
| 120 | 123 |
| 121 } // namespace pairing_chromeos | 124 } // namespace pairing_chromeos |
| 122 | 125 |
| 123 #endif // CHROMEOS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_ | 126 #endif // CHROMEOS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_ |
| OLD | NEW |