OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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. | |
4 | |
5 #ifndef REMOTING_CLIENT_IOS_DOMAIN_HOST_H_ | |
Sergey Ulanov
2017/02/09 00:52:37
I assume "domain" here doesn't refer to domains in
nicholss
2017/02/09 16:12:40
I am using domain in the 'domain model' sense: htt
| |
6 #define REMOTING_CLIENT_IOS_DOMAIN_HOST_H_ | |
7 | |
8 #import <Foundation/Foundation.h> | |
9 | |
10 // A detail record for a Remoting Host. | |
11 @interface Host : NSObject | |
12 | |
13 // Various properties of the Remoting Host. | |
14 @property(nonatomic, copy) NSString* createdTime; | |
15 @property(nonatomic, copy) NSString* hostId; | |
16 @property(nonatomic, copy) NSString* hostName; | |
17 @property(nonatomic, copy) NSString* hostVersion; | |
18 @property(nonatomic, copy) NSString* jabberId; | |
19 @property(nonatomic, copy) NSString* kind; | |
20 @property(nonatomic, copy) NSString* publicKey; | |
21 @property(nonatomic, copy) NSString* status; | |
22 @property(nonatomic, copy) NSDate* updatedTime; | |
23 // True when |status| is @"ONLINE", anything else is False. | |
24 @property(nonatomic, readonly) bool isOnline; | |
25 | |
26 + (NSMutableArray<Host*>*)parseListFromJSON:(NSMutableData*)data; | |
27 | |
28 // First consider if |isOnline| is greater than anything else, then consider by | |
29 // case insensitive locale of |hostName|. | |
30 - (NSComparisonResult)compare:(Host*)host; | |
31 | |
32 @end | |
33 | |
34 #endif // REMOTING_CLIENT_IOS_DOMAIN_HOST_H_ | |
OLD | NEW |