Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Side by Side Diff: remoting/ios/facade/host_info.h

Issue 2912293003: [CRD iOS] Consistent host list order and showing last online time (Closed)
Patch Set: Fix comment Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 REMOTING_IOS_FACADE_HOST_INFO_H_ 5 #ifndef REMOTING_IOS_FACADE_HOST_INFO_H_
6 #define REMOTING_IOS_FACADE_HOST_INFO_H_ 6 #define REMOTING_IOS_FACADE_HOST_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/time/time.h"
11 #include "base/values.h" 12 #include "base/values.h"
12 13
13 namespace remoting { 14 namespace remoting {
14 15
15 enum HostStatus { kHostStatusOnline, kHostStatusOffline }; 16 enum HostStatus { kHostStatusOnline, kHostStatusOffline };
16 17
17 // |remoting::HostInfo| is an object containing the data from host list fetch 18 // |remoting::HostInfo| is an object containing the data from host list fetch
18 // for transport in native code. 19 // for transport in native code.
19 struct HostInfo { 20 struct HostInfo {
20 HostInfo(); 21 HostInfo();
21 HostInfo(const HostInfo& other); 22 HostInfo(const HostInfo& other);
22 ~HostInfo(); 23 ~HostInfo();
23 24
24 // Returns true if |host_info| is valid and initializes HostInfo. 25 // Returns true if |host_info| is valid and initializes HostInfo.
25 bool ParseHostInfo(const base::DictionaryValue& host_info); 26 bool ParseHostInfo(const base::DictionaryValue& host_info);
26 27
27 // Returns true if the chromoting host is ready to accept connections. 28 // Returns true if the chromoting host is ready to accept connections.
28 bool IsReadyForConnection() const; 29 bool IsReadyForConnection() const;
29 30
30 std::string host_id; 31 std::string host_id;
31 std::string host_jid; 32 std::string host_jid;
32 std::string host_name; 33 std::string host_name;
33 std::string host_os; 34 std::string host_os;
34 std::string host_os_version; 35 std::string host_os_version;
35 std::string host_version; 36 std::string host_version;
36 HostStatus status = kHostStatusOffline; 37 HostStatus status = kHostStatusOffline;
37 std::string offline_reason; 38 std::string offline_reason;
38 std::string public_key; 39 std::string public_key;
40 base::Time updated_time;
39 std::vector<std::string> token_url_patterns; 41 std::vector<std::string> token_url_patterns;
40 }; 42 };
41 43
42 } // namespace remoting 44 } // namespace remoting
43 45
44 #endif // REMOTING_IOS_FACADE_HOST_INFO_H_ 46 #endif // REMOTING_IOS_FACADE_HOST_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698