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

Side by Side Diff: remoting/ios/app/client_connection_view_controller.h

Issue 2917253002: [CRD iOS] Create RemotingClient in ClientConnectionViewController (Closed)
Patch Set: resolve feedback Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | remoting/ios/app/client_connection_view_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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;
11
10 // 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.
11 typedef NS_ENUM(NSInteger, ClientConnectionViewState) { 13 typedef NS_ENUM(NSInteger, ClientConnectionViewState) {
12 ClientViewConnecting, 14 ClientViewConnecting,
13 ClientViewPinPrompt, 15 ClientViewPinPrompt,
14 ClientViewConnected, 16 ClientViewConnected,
15 ClientViewClosed, 17 ClientViewClosed,
16 }; 18 };
17 19
18 // The host connection view controller delegate provides feedback for state
19 // changes on Host Connection that the calling view should respond to.
20 @protocol ClientConnectionViewControllerDelegate<NSObject>
21
22 // Notifies the delegate the client is connected to the host.
23 - (void)clientConnected;
24
25 // Gets the current host name the client is attempting to connect to.
26 - (NSString*)getConnectingHostName;
27
28 @end
29
30 // This is the view that shows the user feedback while the client connection is 20 // This is the view that shows the user feedback while the client connection is
31 // being established. If requested the view can also display the pin entry view. 21 // being established. If requested the view can also display the pin entry view.
32 // State communication for this view is handled by NSNotifications, it listens 22 // State communication for this view is handled by NSNotifications, it listens
33 // to kHostSessionStatusChanged events on the default NSNotificationCenter. 23 // to kHostSessionStatusChanged events on the default NSNotificationCenter.
34 // Internally the notification is tied to [self setState] so view setup will 24 // Internally the notification is tied to [self setState] so view setup will
35 // work the same way if state is set directly. 25 // work the same way if state is set directly.
36 @interface ClientConnectionViewController : UIViewController 26 @interface ClientConnectionViewController : UIViewController
37 27
28 - (instancetype)initWithHostInfo:(HostInfo*)hostInfo;
29
38 // Setting state will change the view 30 // Setting state will change the view
39 @property(nonatomic, assign) ClientConnectionViewState state; 31 @property(nonatomic, assign) ClientConnectionViewState state;
40 32
41 // This delegate is used to ask for Host Name and to notify when the connection
42 // has been established.
43 @property(weak, nonatomic) id<ClientConnectionViewControllerDelegate> delegate;
44
45 @end 33 @end
46 34
47 #endif // REMOTING_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_ 35 #endif // REMOTING_IOS_APP_CLIENT_CONNECTION_VIEW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/ios/app/client_connection_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698