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_MESSAGE_TRANSFER_OPERATION_H_ | 5 #ifndef CHROMEOS_COMPONENTS_TETHER_MESSAGE_TRANSFER_OPERATION_H_ |
6 #define CHROMEOS_COMPONENTS_TETHER_MESSAGE_TRANSFER_OPERATION_H_ | 6 #define CHROMEOS_COMPONENTS_TETHER_MESSAGE_TRANSFER_OPERATION_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // Returns the type of message that this operation intends to send. | 70 // Returns the type of message that this operation intends to send. |
71 virtual MessageType GetMessageTypeForConnection() = 0; | 71 virtual MessageType GetMessageTypeForConnection() = 0; |
72 | 72 |
73 std::vector<cryptauth::RemoteDevice>& remote_devices() { | 73 std::vector<cryptauth::RemoteDevice>& remote_devices() { |
74 return remote_devices_; | 74 return remote_devices_; |
75 } | 75 } |
76 | 76 |
77 private: | 77 private: |
78 friend class ConnectTetheringOperationTest; | 78 friend class ConnectTetheringOperationTest; |
| 79 friend class DisconnectTetheringOperationTest; |
79 friend class HostScannerOperationTest; | 80 friend class HostScannerOperationTest; |
80 friend class MessageTransferOperationTest; | 81 friend class MessageTransferOperationTest; |
81 | 82 |
82 static uint32_t kMaxConnectionAttemptsPerDevice; | 83 static uint32_t kMaxConnectionAttemptsPerDevice; |
83 | 84 |
84 std::vector<cryptauth::RemoteDevice> remote_devices_; | 85 std::vector<cryptauth::RemoteDevice> remote_devices_; |
85 BleConnectionManager* connection_manager_; | 86 BleConnectionManager* connection_manager_; |
86 | 87 |
87 bool initialized_; | 88 bool initialized_; |
88 std::map<cryptauth::RemoteDevice, uint32_t> | 89 std::map<cryptauth::RemoteDevice, uint32_t> |
89 remote_device_to_num_attempts_map_; | 90 remote_device_to_num_attempts_map_; |
90 | 91 |
91 DISALLOW_COPY_AND_ASSIGN(MessageTransferOperation); | 92 DISALLOW_COPY_AND_ASSIGN(MessageTransferOperation); |
92 }; | 93 }; |
93 | 94 |
94 } // namespace tether | 95 } // namespace tether |
95 | 96 |
96 } // namespace chromeos | 97 } // namespace chromeos |
97 | 98 |
98 #endif // CHROMEOS_COMPONENTS_TETHER_MESSAGE_TRANSFER_OPERATION_H_ | 99 #endif // CHROMEOS_COMPONENTS_TETHER_MESSAGE_TRANSFER_OPERATION_H_ |
OLD | NEW |