| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2014 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_IOS_UI_PIN_ENTRY_VIEW_CONTROLLER_H_ |
| 6 #define REMOTING_IOS_UI_PIN_ENTRY_VIEW_CONTROLLER_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 // Contract to handle finalization for Pin Prompt |
| 11 @protocol PinEntryViewControllerDelegate<NSObject> |
| 12 |
| 13 // Returns with user's Pin. Pin has not been validated with the server yet. |
| 14 // |shouldPrompt| indicates whether a prompt should be needed for the next login |
| 15 // attempt with this host. |
| 16 - (void)connectToHostWithPin:(NSString*)hostPin shouldPrompt:(BOOL)shouldPrompt; |
| 17 |
| 18 // Returns when the user has cancelled the input, effectively closing the |
| 19 // connection attempt. |
| 20 - (void)cancelledConnectToHostWithPin; |
| 21 |
| 22 @end |
| 23 |
| 24 // Dialog for user's Pin input. If a host has |pairingSupported| then user has |
| 25 // the option to save a token for authentication. |
| 26 @interface PinEntryViewController : UIViewController<UITextFieldDelegate> { |
| 27 @private |
| 28 __weak IBOutlet UIView* _controlView; |
| 29 __weak IBOutlet UIButton* _cancelButton; |
| 30 __weak IBOutlet UIButton* _connectButton; |
| 31 __weak IBOutlet UILabel* _host; |
| 32 __weak IBOutlet UISwitch* _switchAskAgain; |
| 33 __weak IBOutlet UILabel* _shouldSavePin; |
| 34 __weak IBOutlet UITextField* _hostPin; |
| 35 } |
| 36 |
| 37 @property(weak, nonatomic) id<PinEntryViewControllerDelegate> delegate; |
| 38 @property(nonatomic, copy) NSString* hostName; |
| 39 @property(nonatomic) BOOL shouldPrompt; |
| 40 @property(nonatomic) BOOL pairingSupported; |
| 41 |
| 42 - (IBAction)buttonCancelClicked:(id)sender; |
| 43 - (IBAction)buttonConnectClicked:(id)sender; |
| 44 |
| 45 @end |
| 46 |
| 47 #endif // REMOTING_IOS_UI_PIN_ENTRY_VIEW_CONTROLLER_H_ |
| OLD | NEW |