OLD | NEW |
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_CLIENT_IOS_DOMAIN_CLIENT_SESSION_DETAILS_H_ | 5 #ifndef REMOTING_IOS_DOMAIN_CLIENT_SESSION_DETAILS_H_ |
6 #define REMOTING_CLIENT_IOS_DOMAIN_CLIENT_SESSION_DETAILS_H_ | 6 #define REMOTING_IOS_DOMAIN_CLIENT_SESSION_DETAILS_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 @class HostInfo; | 10 @class HostInfo; |
11 | 11 |
12 // Session states that map to |remoting::protocol::ConnectionToHost::State| with | 12 // Session states that map to |remoting::protocol::ConnectionToHost::State| with |
13 // the added state of PinPrompt. This can be used to track the state of the | 13 // the added state of PinPrompt. This can be used to track the state of the |
14 // session for the duration of the connection. | 14 // session for the duration of the connection. |
15 typedef NS_ENUM(NSInteger, SessionState) { | 15 typedef NS_ENUM(NSInteger, SessionState) { |
16 SessionInitializing, | 16 SessionInitializing, |
17 SessionConnecting, | 17 SessionConnecting, |
18 SessionPinPrompt, | 18 SessionPinPrompt, |
19 SessionAuthenticated, | 19 SessionAuthenticated, |
20 SessionConnected, | 20 SessionConnected, |
21 SessionFailed, | 21 SessionFailed, |
22 SessionClosed, | 22 SessionClosed, |
23 }; | 23 }; |
24 | 24 |
25 // The current state of a session and data needed for session context. | 25 // The current state of a session and data needed for session context. |
26 @interface ClientSessionDetails : NSObject | 26 @interface ClientSessionDetails : NSObject |
27 | 27 |
28 // This is the object that describes the host this session is centered around. | 28 // This is the object that describes the host this session is centered around. |
29 @property(nonatomic) HostInfo* hostInfo; | 29 @property(nonatomic) HostInfo* hostInfo; |
30 // The current state of the session. | 30 // The current state of the session. |
31 @property(nonatomic, assign) SessionState state; | 31 @property(nonatomic, assign) SessionState state; |
32 | 32 |
33 @end | 33 @end |
34 | 34 |
35 #endif // REMOTING_CLIENT_IOS_DOMAIN_CLIENT_SESSION_DETAILS_H_ | 35 #endif // REMOTING_IOS_DOMAIN_CLIENT_SESSION_DETAILS_H_ |
OLD | NEW |