mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-12 22:39:23 +00:00

git-subtree-dir: submodules/LegacyComponents git-subtree-mainline: 608630530451e02e5aec48389d144dbf7a3625b9 git-subtree-split: d5594346161c1b7f203d1e87068bbe77bcaac019
49 lines
1.9 KiB
Objective-C
49 lines
1.9 KiB
Objective-C
#import <LegacyComponents/TGViewController.h>
|
|
#import <LegacyComponents/LegacyComponentsGlobals.h>
|
|
|
|
typedef enum {
|
|
TGPasscodeEntryControllerModeVerifySimple,
|
|
TGPasscodeEntryControllerModeVerifyComplex,
|
|
TGPasscodeEntryControllerModeSetupSimple,
|
|
TGPasscodeEntryControllerModeSetupComplex,
|
|
TGPasscodeEntryControllerModeChangeSimpleToComplex,
|
|
TGPasscodeEntryControllerModeChangeSimpleToSimple,
|
|
TGPasscodeEntryControllerModeChangeComplexToSimple,
|
|
TGPasscodeEntryControllerModeChangeComplexToComplex
|
|
} TGPasscodeEntryControllerMode;
|
|
|
|
typedef enum {
|
|
TGPasscodeEntryControllerStyleDefault,
|
|
TGPasscodeEntryControllerStyleTranslucent
|
|
} TGPasscodeEntryControllerStyle;
|
|
|
|
@interface TGPasscodeEntryAttemptData : NSObject
|
|
|
|
@property (nonatomic, readonly) NSInteger numberOfInvalidAttempts;
|
|
@property (nonatomic, readonly) double dateOfLastInvalidAttempt;
|
|
|
|
- (instancetype)initWithNumberOfInvalidAttempts:(NSInteger)numberOfInvalidAttempts dateOfLastInvalidAttempt:(double)dateOfLastInvalidAttempt;
|
|
|
|
@end
|
|
|
|
@interface TGPasscodeEntryController : TGViewController
|
|
|
|
@property (nonatomic, copy) void (^completion)(NSString *);
|
|
@property (nonatomic, copy) void (^touchIdCompletion)();
|
|
@property (nonatomic, copy) bool (^checkCurrentPasscode)(NSString *);
|
|
@property (nonatomic, copy) void (^updateAttemptData)(TGPasscodeEntryAttemptData *);
|
|
@property (nonatomic) bool allowTouchId;
|
|
|
|
+ (void)setGlobalsProvider:(id<LegacyComponentsGlobalsProvider>)provider;
|
|
|
|
- (instancetype)initWithContext:(id<LegacyComponentsContext>)context style:(TGPasscodeEntryControllerStyle)style mode:(TGPasscodeEntryControllerMode)mode cancelEnabled:(bool)cancelEnabled allowTouchId:(bool)allowTouchId attemptData:(TGPasscodeEntryAttemptData *)attemptData completion:(void (^)(NSString *))completion;
|
|
- (void)resetMode:(TGPasscodeEntryControllerMode)mode;
|
|
- (void)refreshTouchId;
|
|
|
|
- (NSInteger)invalidPasscodeAttempts;
|
|
|
|
- (void)prepareForAppear;
|
|
- (void)prepareForDisappear;
|
|
|
|
@end
|