| 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_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_ | 5 #ifndef REMOTING_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_ |
| 6 #define REMOTING_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_ | 6 #define REMOTING_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 @class HostInfo; | 10 @class HostInfo; |
| 11 | 11 |
| 12 // This enumerated the differnt modes this Client Connection View can be in. | 12 // This enumerated the differnt modes this Client Connection View can be in. |
| 13 typedef NS_ENUM(NSInteger, ClientConnectionViewState) { | 13 typedef NS_ENUM(NSInteger, ClientConnectionViewState) { |
| 14 ClientViewConnecting, | 14 ClientViewConnecting, |
| 15 ClientViewPinPrompt, | 15 ClientViewPinPrompt, |
| 16 ClientViewConnected, | 16 ClientViewConnected, |
| 17 ClientViewReconnect, |
| 17 ClientViewClosed, | 18 ClientViewClosed, |
| 18 ClientViewError, | 19 ClientViewError, |
| 19 }; | 20 }; |
| 20 | 21 |
| 21 // This is the view that shows the user feedback while the client connection is | 22 // This is the view that shows the user feedback while the client connection is |
| 22 // being established. If requested the view can also display the pin entry view. | 23 // being established. If requested the view can also display the pin entry view. |
| 23 // State communication for this view is handled by NSNotifications, it listens | 24 // State communication for this view is handled by NSNotifications, it listens |
| 24 // to kHostSessionStatusChanged events on the default NSNotificationCenter. | 25 // to kHostSessionStatusChanged events on the default NSNotificationCenter. |
| 25 // Internally the notification is tied to [self setState] so view setup will | 26 // Internally the notification is tied to [self setState] so view setup will |
| 26 // work the same way if state is set directly. | 27 // work the same way if state is set directly. |
| 27 @interface ClientConnectionViewController : UIViewController | 28 @interface ClientConnectionViewController : UIViewController |
| 28 | 29 |
| 29 - (instancetype)initWithHostInfo:(HostInfo*)hostInfo; | 30 - (instancetype)initWithHostInfo:(HostInfo*)hostInfo; |
| 30 | 31 |
| 31 // Setting state will change the view | 32 // Setting state will change the view |
| 32 @property(nonatomic, assign) ClientConnectionViewState state; | 33 @property(nonatomic, assign) ClientConnectionViewState state; |
| 33 | 34 |
| 34 @end | 35 @end |
| 35 | 36 |
| 36 #endif // REMOTING_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_ | 37 #endif // REMOTING_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_ |
| OLD | NEW |