-
Notifications
You must be signed in to change notification settings - Fork 1
/
FSEvents+Convenience.h
43 lines (27 loc) · 1.19 KB
/
FSEvents+Convenience.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// FSEvents+Convenience.h
// Guardian
//
// Created by Alexander Ivanov on 16.12.16.
// Copyright © 2016 NATEK. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "NSArray+Convenience.h"
#import "NSObject+Convenience.h"
@interface FSEventStream : NSObject
- (instancetype)initWithURL:(NSURL *)URL handler:(void(^)(NSDictionary *events))handler;
@property (assign, nonatomic, readonly) BOOL started;
- (BOOL)start;
- (void)stop;
+ (instancetype)startEventStreamWithURL:(NSURL *)URL handler:(void(^)(NSDictionary *events))handler;
@end
@interface FSHelper : NSObject
+ (FSEventStreamRef)createStream:(NSArray *)URLs callback:(FSEventStreamCallback)callback info:(id)info latency:(NSTimeInterval)latency fileEvents:(BOOL)fileEvents;
+ (void)scheduleStream:(FSEventStreamRef)stream onRunLoop:(CFRunLoopRef)runLoop;
+ (BOOL)startSendingEvents:(FSEventStreamRef)stream;
+ (void)stopSendingEvents:(FSEventStreamRef)stream;
+ (void)unscheduleStream:(FSEventStreamRef)stream fromRunLoop:(CFRunLoopRef)runLoop;
+ (void)invalidateStream:(FSEventStreamRef)stream;
+ (void)releaseStream:(FSEventStreamRef)stream;
+ (NSString *)streamEventFlagsDescription:(FSEventStreamEventFlags)flags;
@end