KKPasscodeSettingsViewController.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // Copyright 2011-2012 Kosher Penguin LLC
  3. // Created by Adar Porat (https://github.com/aporat) on 1/16/2012.
  4. //
  5. // Licensed under the Apache License, Version 2.0 (the "License");
  6. // you may not use this file except in compliance with the License.
  7. // You may obtain a copy of the License at
  8. //
  9. // http://www.apache.org/licenses/LICENSE-2.0
  10. //
  11. // Unless required by applicable law or agreed to in writing, software
  12. // distributed under the License is distributed on an "AS IS" BASIS,
  13. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. // See the License for the specific language governing permissions and
  15. // limitations under the License.
  16. //
  17. #import <UIKit/UIKit.h>
  18. #import "KKPasscodeViewController.h"
  19. #import "ThemedTableViewController.h"
  20. #import "JKLLockScreenViewController.h"
  21. @class KKPasscodeSettingsViewController;
  22. @protocol KKPasscodeSettingsViewControllerDelegate <NSObject>
  23. @optional
  24. /**
  25. * called when the passcode settings (either turned on/off) is changed
  26. */
  27. - (void)didSettingsChanged:(KKPasscodeSettingsViewController*)viewController;
  28. @end
  29. @interface KKPasscodeSettingsViewController : ThemedTableViewController <UIAlertViewDelegate, KKPasscodeViewControllerDelegate, JKLLockScreenViewControllerDelegate> {
  30. // delegate which notified then the passcode is turned on/off
  31. id <KKPasscodeSettingsViewControllerDelegate> __unsafe_unretained _delegate;
  32. // the erase content switch.
  33. UISwitch* _eraseDataSwitch;
  34. UISwitch* _touchIdSwitch;
  35. // whatever the passcode lock is turned on or off
  36. BOOL _passcodeLockOn;
  37. // whatever the erase data option is turned on or off
  38. BOOL _eraseDataOn;
  39. // seconds before passcode is required
  40. int _gracePeriod;
  41. // whether Touch ID is enabled
  42. BOOL _touchIdOn;
  43. }
  44. @property (nonatomic, unsafe_unretained) id <KKPasscodeSettingsViewControllerDelegate> delegate;
  45. + (NSString*)textForGracePeriod:(int)gracePeriod shortForm:(BOOL)shortForm;
  46. @end