2014-10-29 21:58:58 +01:00
|
|
|
//
|
|
|
|
// CodeVerificationViewController.h
|
|
|
|
// Signal
|
|
|
|
//
|
|
|
|
// Created by Dylan Bourgeois on 13/11/14.
|
|
|
|
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
2014-12-03 07:40:07 +01:00
|
|
|
// This class allows the user to send the server their verification code and request new codes to be sent via SMS or voice.
|
|
|
|
//
|
2014-10-29 21:58:58 +01:00
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
|
|
|
@interface CodeVerificationViewController : UIViewController
|
|
|
|
|
2015-01-30 22:58:23 +01:00
|
|
|
@property(nonatomic, strong) IBOutlet UIImageView* signalLogo;
|
|
|
|
|
2014-12-03 07:40:07 +01:00
|
|
|
// Where the user enters the verification code they wish to document
|
2014-10-29 21:58:58 +01:00
|
|
|
@property(nonatomic, strong) IBOutlet UITextField* challengeTextField;
|
|
|
|
|
2015-01-14 22:30:01 +01:00
|
|
|
@property(nonatomic, strong) NSString* formattedPhoneNumber;
|
|
|
|
|
2015-02-18 23:21:03 +01:00
|
|
|
@property(nonatomic,strong) IBOutlet UILabel *headerLabel;
|
2014-12-03 07:40:07 +01:00
|
|
|
// User action buttons
|
2014-11-27 09:49:50 +01:00
|
|
|
@property(nonatomic, strong) IBOutlet UIButton* challengeButton;
|
2014-12-03 07:40:07 +01:00
|
|
|
@property(nonatomic, strong) IBOutlet UIButton* sendCodeViaSMSAgainButton;
|
|
|
|
@property(nonatomic, strong) IBOutlet UIButton* sendCodeViaVoiceButton;
|
|
|
|
|
2015-01-14 22:30:01 +01:00
|
|
|
@property(nonatomic, strong) IBOutlet UIActivityIndicatorView* submitCodeSpinner;
|
|
|
|
@property(nonatomic, strong) IBOutlet UIActivityIndicatorView* requestCodeAgainSpinner;
|
|
|
|
@property(nonatomic, strong) IBOutlet UIActivityIndicatorView* requestCallSpinner;
|
2015-02-18 23:21:03 +01:00
|
|
|
@property(nonatomic, strong) IBOutlet UIButton* changeNumberButton;
|
2015-01-30 22:58:23 +01:00
|
|
|
@property(nonatomic) IBOutlet NSLayoutConstraint *headerConstraint;
|
2015-01-14 22:30:01 +01:00
|
|
|
|
2014-12-03 07:40:07 +01:00
|
|
|
// Displays phone number entered in previous step. There is a UI option (segue) which allows the user to go back and edit this.
|
|
|
|
@property (nonatomic, strong) IBOutlet UILabel* phoneNumberEntered;
|
2014-11-27 09:49:50 +01:00
|
|
|
|
2014-12-03 07:40:07 +01:00
|
|
|
|
|
|
|
// User verifies code
|
2014-11-25 23:52:53 +01:00
|
|
|
- (IBAction)verifyChallengeAction:(id)sender;
|
2014-12-03 07:40:07 +01:00
|
|
|
// User requests new code via SMS
|
|
|
|
- (IBAction)sendCodeSMSAction:(id)sender;
|
|
|
|
// User requests new code via voice phone call
|
|
|
|
- (IBAction)sendCodeVoiceAction:(id)sender;
|
|
|
|
|
|
|
|
// This ensures the user doesn't keep creating server requests before the server has responded for all buttons that result in server requests
|
|
|
|
-(void)enableServerActions:(BOOL)enabled;
|
2014-11-25 23:52:53 +01:00
|
|
|
|
2014-10-29 21:58:58 +01:00
|
|
|
@end
|