pin_entry_view.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2017 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. #ifndef REMOTING_IOS_APP_PIN_ENTRY_VIEW_H_
  5. #define REMOTING_IOS_APP_PIN_ENTRY_VIEW_H_
  6. #import <UIKit/UIKit.h>
  7. @protocol PinEntryDelegate<NSObject>
  8. // Notifies the delegate that a pin has been provided and if we should pair.
  9. @optional
  10. - (void)didProvidePin:(NSString*)pin createPairing:(BOOL)createPairing;
  11. @end
  12. // This view is the container for a PIN entry box, a button to submit, and the
  13. // option box to remember the pairing. All used for entering a PIN based
  14. // passcode.
  15. @interface PinEntryView : UIView
  16. // Clears the pin entry view.
  17. - (void)clearPinEntry;
  18. // This delegate will handle interactions on the cells in the collection.
  19. @property(weak, nonatomic) id<PinEntryDelegate> delegate;
  20. // |supportsPairing| false will hide the remember pin checkbox.
  21. @property(nonatomic) BOOL supportsPairing;
  22. @end
  23. #endif // REMOTING_IOS_APP_PIN_ENTRY_VIEW_H_