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_HOST_INFO_H_ | 5 #ifndef REMOTING_TEST_HOST_INFO_H_ |
6 #define REMOTING_TEST_HOST_INFO_H_ | 6 #define REMOTING_TEST_HOST_INFO_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "remoting/test/connection_setup_info.h" | |
12 | 13 |
13 namespace remoting { | 14 namespace remoting { |
14 namespace test { | 15 namespace test { |
15 | 16 |
16 enum HostStatus { | 17 enum HostStatus { |
17 kHostStatusOnline, | 18 kHostStatusOnline, |
18 kHostStatusOffline | 19 kHostStatusOffline |
19 }; | 20 }; |
20 | 21 |
21 struct HostInfo { | 22 struct HostInfo { |
22 HostInfo(); | 23 HostInfo(); |
23 ~HostInfo(); | 24 ~HostInfo(); |
24 | 25 |
25 bool ParseHostInfo(const base::DictionaryValue& host_info); | 26 bool ParseHostInfo(const base::DictionaryValue& host_info); |
26 | 27 |
28 // Returns true if the remote host is ready to accept connections. | |
joedow
2015/07/17 23:26:30
remote host or chromoting host? Since this is a h
tonychun
2015/07/20 14:29:17
Done.
| |
29 bool IsReadyForConnection() const; | |
30 | |
31 // Generates connection information to establish a chromoting connection. | |
32 ConnectionSetupInfo GenerateConnectionSetupInfo( | |
33 const std::string& access_token, | |
34 const std::string& user_name, | |
35 const std::string& pin) const; | |
36 | |
27 std::string host_id; | 37 std::string host_id; |
28 std::string host_jid; | 38 std::string host_jid; |
29 std::string host_name; | 39 std::string host_name; |
30 HostStatus status = kHostStatusOffline; | 40 HostStatus status = kHostStatusOffline; |
31 std::string offline_reason; | 41 std::string offline_reason; |
32 std::string public_key; | 42 std::string public_key; |
33 std::vector<std::string> token_url_patterns; | 43 std::vector<std::string> token_url_patterns; |
34 }; | 44 }; |
35 | 45 |
36 } // namespace test | 46 } // namespace test |
37 } // namespace remoting | 47 } // namespace remoting |
38 | 48 |
39 #endif // REMOTING_TEST_HOST_INFO_H_ | 49 #endif // REMOTING_TEST_HOST_INFO_H_ |
OLD | NEW |