Update V8 to version 4.6.55.
[chromium-blink-merge.git] / remoting / test / host_info.h
blob1c5028c69a956943909d4e02d4141adc04aa5c79
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
3 // found in the LICENSE file.
5 #ifndef REMOTING_TEST_HOST_INFO_H_
6 #define REMOTING_TEST_HOST_INFO_H_
8 #include <string>
9 #include <vector>
11 #include "base/values.h"
12 #include "remoting/test/connection_setup_info.h"
14 namespace remoting {
15 namespace test {
17 enum HostStatus {
18 kHostStatusOnline,
19 kHostStatusOffline
22 struct HostInfo {
23 HostInfo();
24 ~HostInfo();
26 // Returns true if |host_info| is valid and initializes HostInfo.
27 bool ParseHostInfo(const base::DictionaryValue& host_info);
29 // Returns true if the chromoting host is ready to accept connections.
30 bool IsReadyForConnection() const;
32 // Generates connection information to establish a chromoting connection.
33 ConnectionSetupInfo GenerateConnectionSetupInfo(
34 const std::string& access_token,
35 const std::string& user_name,
36 const std::string& pin) const;
38 std::string host_id;
39 std::string host_jid;
40 std::string host_name;
41 HostStatus status = kHostStatusOffline;
42 std::string offline_reason;
43 std::string public_key;
44 std::vector<std::string> token_url_patterns;
47 } // namespace test
48 } // namespace remoting
50 #endif // REMOTING_TEST_HOST_INFO_H_