OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef REMOTING_CLIENT_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_ |
| 6 #define REMOTING_CLIENT_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 // This enumerated the differnt modes this Client Connection View can be in. |
| 11 typedef NS_ENUM(NSInteger, ClientConnectionViewState) { |
| 12 ClientViewConnecting, |
| 13 ClientViewPinPrompt, |
| 14 ClientViewConnected, |
| 15 }; |
| 16 |
| 17 // The host connection view controller delegate provides feedback for state |
| 18 // changes on Host Connection that the calling view should respond to. |
| 19 @protocol ClientConnectionViewControllerDelegate<NSObject> |
| 20 |
| 21 // Notifies the delegate the client is connected to the host. |
| 22 - (void)clientConnected; |
| 23 |
| 24 // Gets the current host name the client is attempting to connect to. |
| 25 - (NSString*)getConnectingHostName; |
| 26 |
| 27 @end |
| 28 |
| 29 // This is the view that shows the user feedback while the client connection is |
| 30 // being established. If requested the view can also display the pin entry view. |
| 31 // State communication for this view is handled by NSNotifications, it listens |
| 32 // to kHostSessionStatusChanged events on the default NSNotificationCenter. |
| 33 // Internally the notification is tied to [self setState] so view setup will |
| 34 // work the same way if state is set directly. |
| 35 @interface ClientConnectionViewController : UIViewController |
| 36 |
| 37 // Setting state will change the view |
| 38 @property(nonatomic, assign) ClientConnectionViewState state; |
| 39 |
| 40 // This delegate is used to ask for Host Name and to notify when the connection |
| 41 // has been established. |
| 42 @property(weak, nonatomic) id<ClientConnectionViewControllerDelegate> delegate; |
| 43 |
| 44 @end |
| 45 |
| 46 #endif // REMOTING_CLIENT_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_ |
OLD | NEW |