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

Unified Diff: remoting/client/ios/domain/host.h

Issue 2681173002: Adding domain and facade supporting classes for remoting iOS app. (Closed)
Patch Set: Renaming access code to authorization code per spec language. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/ios/domain/host.h
diff --git a/remoting/client/ios/domain/host.h b/remoting/client/ios/domain/host.h
new file mode 100644
index 0000000000000000000000000000000000000000..b6fea1dd42caeee1779d4c1e193db6f036a81c78
--- /dev/null
+++ b/remoting/client/ios/domain/host.h
@@ -0,0 +1,34 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_CLIENT_IOS_DOMAIN_HOST_H_
+#define REMOTING_CLIENT_IOS_DOMAIN_HOST_H_
+
+#import <Foundation/Foundation.h>
+
+// A detail record for a Remoting Host.
+@interface Host : NSObject
Sergey Ulanov 2017/02/10 19:02:01 I suggest renaming this to HostInfo. It would be m
nicholss 2017/02/13 22:10:11 Sounds good. Will do.
+
+// Various properties of the Remoting Host.
+@property(nonatomic, copy) NSString* createdTime;
+@property(nonatomic, copy) NSString* hostId;
+@property(nonatomic, copy) NSString* hostName;
+@property(nonatomic, copy) NSString* hostVersion;
+@property(nonatomic, copy) NSString* jabberId;
+@property(nonatomic, copy) NSString* kind;
+@property(nonatomic, copy) NSString* publicKey;
+@property(nonatomic, copy) NSString* status;
+@property(nonatomic, copy) NSDate* updatedTime;
+// True when |status| is @"ONLINE", anything else is False.
+@property(nonatomic, readonly) bool isOnline;
+
++ (NSMutableArray<Host*>*)parseListFromJSON:(NSMutableData*)data;
+
+// First consider if |isOnline| is greater than anything else, then consider by
+// case insensitive locale of |hostName|.
+- (NSComparisonResult)compare:(Host*)host;
+
+@end
+
+#endif // REMOTING_CLIENT_IOS_DOMAIN_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698