Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / remoting / test / remote_host_info.h
blobe74174a35d1c1c3d1249b0719850ab7a9ba9750c
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_REMOTE_HOST_INFO_H_
6 #define REMOTING_TEST_REMOTE_HOST_INFO_H_
8 #include <string>
10 #include "remoting/test/connection_setup_info.h"
12 namespace remoting {
13 namespace test {
15 enum RemoteHostStatus {
16 kRemoteHostStatusReady,
17 kRemoteHostStatusPending,
18 kRemoteHostStatusUnknown
21 // Holds the information needed to establish a connection with a remote host.
22 struct RemoteHostInfo {
23 RemoteHostInfo();
24 ~RemoteHostInfo();
26 // Returns true if the remote host is ready to accept connections.
27 bool IsReadyForConnection() const;
29 // Sets the |remote_host_status| based on the caller supplied string.
30 void SetRemoteHostStatusFromString(const std::string& status_string);
32 // Generates connection information to establish a chromoting connection.
33 ConnectionSetupInfo GenerateConnectionSetupInfo(
34 const std::string& access_token,
35 const std::string& user_name) const;
37 // Data used to establish a connection with a remote host.
38 RemoteHostStatus remote_host_status;
39 std::string application_id;
40 std::string host_id;
41 std::string host_jid;
42 std::string authorization_code;
43 std::string shared_secret;
46 } // namespace test
47 } // namespace remoting
49 #endif // REMOTING_TEST_REMOTE_HOST_INFO_H_