OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 REMOTING_TEST_REMOTE_HOST_INFO_H_ | 5 #ifndef REMOTING_TEST_REMOTE_HOST_INFO_H_ |
6 #define REMOTING_TEST_REMOTE_HOST_INFO_H_ | 6 #define REMOTING_TEST_REMOTE_HOST_INFO_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace remoting { | 10 namespace remoting { |
11 namespace test { | 11 namespace test { |
12 | 12 |
13 enum RemoteHostStatus { | 13 enum RemoteHostStatus { |
14 kRemoteHostStatusReady, | 14 kRemoteHostStatusReady, |
15 kRemoteHostStatusPending, | 15 kRemoteHostStatusPending, |
16 kRemoteHostStatusUnknown | 16 kRemoteHostStatusUnknown |
17 }; | 17 }; |
18 | 18 |
19 // Holds the information needed to establish a connection with a remote host. | 19 // Holds the information needed to establish a connection with a remote host. |
20 struct RemoteHostInfo { | 20 struct RemoteHostInfo { |
21 RemoteHostInfo(); | 21 RemoteHostInfo(); |
22 ~RemoteHostInfo(); | 22 ~RemoteHostInfo(); |
23 | 23 |
24 // Returns true if the remote host is ready to accept connections. | 24 // Returns true if the remote host is ready to accept connections. |
25 bool IsReadyForConnection() const; | 25 bool IsReadyForConnection() const; |
26 | 26 |
27 // Sets the |remote_host_status| based on the caller supplied string. | 27 // Sets the |remote_host_status| based on the caller supplied string. |
28 void SetRemoteHostStatusFromString(const std::string& status_string); | 28 void SetRemoteHostStatusFromString(const std::string& status_string); |
29 | 29 |
30 // Data used to establish a connection with a remote host. | 30 // Data used to establish a connection with a remote host. |
31 RemoteHostStatus remote_host_status; | 31 RemoteHostStatus remote_host_status; |
32 std::string application_id; | 32 std::string application_id; |
33 std::string host_id; | 33 std::string host_id; |
34 std::string host_jid; | 34 std::string host_jid; |
35 std::string authorization_code; | 35 std::string authorization_code; |
36 std::string shared_secret; | 36 std::string shared_secret; |
37 }; | 37 }; |
38 | 38 |
39 } // namespace test | 39 } // namespace test |
40 } // namespace remoting | 40 } // namespace remoting |
41 | 41 |
42 #endif // REMOTING_TEST_REMOTE_HOST_INFO_H_ | 42 #endif // REMOTING_TEST_REMOTE_HOST_INFO_H_ |
OLD | NEW |