PINRemoteLock.h 707 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // PINRemoteLock.h
  3. // Pods
  4. //
  5. // Created by Garrett Moon on 3/17/16.
  6. //
  7. //
  8. #import <Foundation/Foundation.h>
  9. /** The type of lock, either recursive or non-recursive */
  10. typedef NS_ENUM(NSUInteger, PINRemoteLockType) {
  11. /** A non-recursive version of the lock. The default. */
  12. PINRemoteLockTypeNonRecursive = 0,
  13. /** A recursive version of the lock. More expensive. */
  14. PINRemoteLockTypeRecursive,
  15. };
  16. @interface PINRemoteLock : NSObject
  17. - (instancetype)initWithName:(NSString *)lockName lockType:(PINRemoteLockType)lockType NS_DESIGNATED_INITIALIZER;
  18. - (instancetype)initWithName:(NSString *)lockName;
  19. - (void)lockWithBlock:(dispatch_block_t)block;
  20. - (void)lock;
  21. - (void)unlock;
  22. @end