| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_COMPONENTS_TETHER_BLE_CONNECTION_MANAGER_H_ | 5 #ifndef CHROMEOS_COMPONENTS_TETHER_BLE_CONNECTION_MANAGER_H_ |
| 6 #define CHROMEOS_COMPONENTS_TETHER_BLE_CONNECTION_MANAGER_H_ | 6 #define CHROMEOS_COMPONENTS_TETHER_BLE_CONNECTION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 ~ConnectionMetadata(); | 140 ~ConnectionMetadata(); |
| 141 | 141 |
| 142 void RegisterConnectionReason(const MessageType& connection_reason); | 142 void RegisterConnectionReason(const MessageType& connection_reason); |
| 143 void UnregisterConnectionReason(const MessageType& connection_reason); | 143 void UnregisterConnectionReason(const MessageType& connection_reason); |
| 144 bool HasReasonForConnection() const; | 144 bool HasReasonForConnection() const; |
| 145 | 145 |
| 146 bool HasEstablishedConnection() const; | 146 bool HasEstablishedConnection() const; |
| 147 cryptauth::SecureChannel::Status GetStatus() const; | 147 cryptauth::SecureChannel::Status GetStatus() const; |
| 148 | 148 |
| 149 void StartConnectionAttemptTimer(bool use_short_error_timeout); | 149 void StartConnectionAttemptTimer(bool use_short_error_timeout); |
| 150 bool HasSecureChannel(); |
| 150 void SetSecureChannel( | 151 void SetSecureChannel( |
| 151 std::unique_ptr<cryptauth::SecureChannel> secure_channel); | 152 std::unique_ptr<cryptauth::SecureChannel> secure_channel); |
| 152 void SendMessage(const std::string& payload); | 153 void SendMessage(const std::string& payload); |
| 153 | 154 |
| 154 // cryptauth::SecureChannel::Observer: | 155 // cryptauth::SecureChannel::Observer: |
| 155 void OnSecureChannelStatusChanged( | 156 void OnSecureChannelStatusChanged( |
| 156 cryptauth::SecureChannel* secure_channel, | 157 cryptauth::SecureChannel* secure_channel, |
| 157 const cryptauth::SecureChannel::Status& old_status, | 158 const cryptauth::SecureChannel::Status& old_status, |
| 158 const cryptauth::SecureChannel::Status& new_status) override; | 159 const cryptauth::SecureChannel::Status& new_status) override; |
| 159 void OnMessageReceived(cryptauth::SecureChannel* secure_channel, | 160 void OnMessageReceived(cryptauth::SecureChannel* secure_channel, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 base::WeakPtrFactory<BleConnectionManager> weak_ptr_factory_; | 223 base::WeakPtrFactory<BleConnectionManager> weak_ptr_factory_; |
| 223 | 224 |
| 224 DISALLOW_COPY_AND_ASSIGN(BleConnectionManager); | 225 DISALLOW_COPY_AND_ASSIGN(BleConnectionManager); |
| 225 }; | 226 }; |
| 226 | 227 |
| 227 } // namespace tether | 228 } // namespace tether |
| 228 | 229 |
| 229 } // namespace chromeos | 230 } // namespace chromeos |
| 230 | 231 |
| 231 #endif // CHROMEOS_COMPONENTS_TETHER_BLE_CONNECTION_MANAGER_H_ | 232 #endif // CHROMEOS_COMPONENTS_TETHER_BLE_CONNECTION_MANAGER_H_ |
| OLD | NEW |