JKLLockScreenViewController.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // This file is based on third party code, see below for the original author
  2. // and original license.
  3. // Modifications are (c) by Threema GmbH and licensed under the AGPLv3.
  4. //
  5. // JKLLockScreenViewController.h
  6. // JKLib
  7. //
  8. // @date 2015. 03. 25.
  9. // @author Choi JoongKwan
  10. // @email joongkwan.choi@gmail.com
  11. // @brief Lock Screen View Controller class
  12. //
  13. #import <UIKit/UIKit.h>
  14. typedef NS_ENUM(NSInteger, LockScreenMode) {
  15. LockScreenModeNormal = 0, // [일반 모드]
  16. LockScreenModeNew, // [신규 모드]
  17. LockScreenModeChange, // [변경 모드]
  18. LockScreenModeVerification, // [확인 모드]
  19. //------------------ Threema edit begin ---------------------------
  20. LockScreenModeChangeCheck,
  21. LockScreenModeDisable,
  22. LockScreenModeExtension,
  23. //------------------ Threema edit end ---------------------------
  24. };
  25. @protocol JKLLockScreenViewControllerDelegate;
  26. @protocol JKLLockScreenViewControllerDataSource;
  27. @interface JKLLockScreenViewController : UIViewController
  28. @property (nonatomic, unsafe_unretained) LockScreenMode lockScreenMode;
  29. @property (nonatomic, weak) IBOutlet id<JKLLockScreenViewControllerDelegate> delegate;
  30. @property (nonatomic, weak) IBOutlet id<JKLLockScreenViewControllerDataSource> dataSource;
  31. /**
  32. * Tint color for the buttons
  33. */
  34. @property (nonatomic, weak) UIColor *tintColor;
  35. @end
  36. @protocol JKLLockScreenViewControllerDelegate <NSObject>
  37. @optional
  38. - (void)unlockWasSuccessfulLockScreenViewController:(JKLLockScreenViewController *)lockScreenViewController pincode:(NSString *)pincode; // support for number
  39. - (void)unlockWasSuccessfulLockScreenViewController:(JKLLockScreenViewController *)lockScreenViewController; // support for touch id
  40. - (void)unlockWasCancelledLockScreenViewController:(JKLLockScreenViewController *)lockScreenViewController;
  41. - (void)unlockWasFailureLockScreenViewController:(JKLLockScreenViewController *)lockScreenViewController;
  42. //------------------ Threema edit begin ---------------------------
  43. - (void)didPasscodeEnteredCorrectly:(JKLLockScreenViewController*)viewController;
  44. - (void)didPasscodeEnteredIncorrectly:(JKLLockScreenViewController*)viewController;
  45. - (void)shouldEraseApplicationData:(JKLLockScreenViewController*)viewController;
  46. - (void)didSettingsChanged:(JKLLockScreenViewController*)viewController;
  47. - (void)didPasscodeViewDismiss:(JKLLockScreenViewController*)viewController;
  48. //------------------ Threema edit end ---------------------------
  49. @end
  50. @protocol JKLLockScreenViewControllerDataSource <NSObject>
  51. @required
  52. - (BOOL)lockScreenViewController:(JKLLockScreenViewController *)lockScreenViewController pincode:(NSString *)pincode;
  53. @optional
  54. - (BOOL)allowTouchIDLockScreenViewController:(JKLLockScreenViewController *)lockScreenViewController;
  55. @end