An Objective-C wrapper for Mac OS X’s FSEvents C API.
Revisión | 58ab9283660faf83b1ebbeefa69e8d74c973c18e (tree) |
---|---|
Tiempo | 2010-04-04 17:38:28 |
Autor | Aron Cedercrantz <aron@cede...> |
Commiter | Aron Cedercrantz |
Merge branch 'release/1.0.1'
@@ -46,6 +46,13 @@ | ||
46 | 46 | */ |
47 | 47 | typedef NSUInteger CDEventIdentifier; |
48 | 48 | |
49 | +/** | |
50 | + * The event stream event flags type. | |
51 | + * | |
52 | + * @since 1.0.1 | |
53 | + */ | |
54 | +typedef NSUInteger CDEventFlags; | |
55 | + | |
49 | 56 | |
50 | 57 | /** |
51 | 58 | * An Objective-C wrapper for a <code>FSEvents</code> event data. |
@@ -62,7 +69,7 @@ typedef NSUInteger CDEventIdentifier; | ||
62 | 69 | CDEventIdentifier _identifier; |
63 | 70 | NSDate *_date; |
64 | 71 | NSURL *_URL; |
65 | - FSEventStreamEventFlags _flags; | |
72 | + CDEventFlags _flags; | |
66 | 73 | } |
67 | 74 | |
68 | 75 | #pragma mark Properties |
@@ -106,7 +113,7 @@ typedef NSUInteger CDEventIdentifier; | ||
106 | 113 | * |
107 | 114 | * @since 1.0.0 |
108 | 115 | */ |
109 | -@property (readonly) FSEventStreamEventFlags flags; | |
116 | +@property (readonly) CDEventFlags flags; | |
110 | 117 | |
111 | 118 | #pragma mark Class object creators |
112 | 119 |
@@ -127,7 +134,7 @@ typedef NSUInteger CDEventIdentifier; | ||
127 | 134 | + (CDEvent *)eventWithIdentifier:(NSUInteger)identifier |
128 | 135 | date:(NSDate *)date |
129 | 136 | URL:(NSURL *)URL |
130 | - flags:(FSEventStreamEventFlags)flags; | |
137 | + flags:(CDEventFlags)flags; | |
131 | 138 | |
132 | 139 | #pragma mark Init methods |
133 | 140 | /** |
@@ -146,6 +153,6 @@ typedef NSUInteger CDEventIdentifier; | ||
146 | 153 | - (id)initWithIdentifier:(NSUInteger)identifier |
147 | 154 | date:(NSDate *)date |
148 | 155 | URL:(NSURL *)URL |
149 | - flags:(FSEventStreamEventFlags)flags; | |
156 | + flags:(CDEventFlags)flags; | |
150 | 157 | |
151 | 158 | @end |
@@ -146,15 +146,14 @@ ignoreEventsFromSubDirs:(BOOL)ignoreEventsFromSubDirs | ||
146 | 146 | #pragma mark NSCopying method |
147 | 147 | - (id)copyWithZone:(NSZone *)zone |
148 | 148 | { |
149 | - CDEvents *copy = [[CDEvents alloc] init]; | |
150 | - | |
151 | - copy->_delegate = _delegate; | |
152 | - copy->_notificationLatency = [self notificationLatency]; | |
153 | - copy->_ignoreEventsFromSubDirectories = [self ignoreEventsFromSubDirectories]; | |
154 | - copy->_lastEvent = [[self lastEvent] retain]; | |
155 | - copy->_sinceEventIdentifier = _sinceEventIdentifier; | |
156 | - copy->_watchedURLs = [[self watchedURLs] copyWithZone:zone]; | |
157 | - copy->_excludedURLs = [[self excludedURLs] copyWithZone:zone]; | |
149 | + CDEvents *copy = [[CDEvents alloc] initWithURLs:[self watchedURLs] | |
150 | + delegate:[self delegate] | |
151 | + onRunLoop:[NSRunLoop currentRunLoop] | |
152 | + sinceEventIdentifier:[self sinceEventIdentifier] | |
153 | + notificationLantency:[self notificationLatency] | |
154 | + ignoreEventsFromSubDirs:[self ignoreEventsFromSubDirectories] | |
155 | + excludeURLs:[self excludedURLs] | |
156 | + streamCreationFlags:_eventStreamCreationFlags]; | |
158 | 157 | |
159 | 158 | return copy; |
160 | 159 | } |
@@ -26,7 +26,7 @@ | ||
26 | 26 | isa = PBXContainerItemProxy; |
27 | 27 | containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; |
28 | 28 | proxyType = 1; |
29 | - remoteGlobalIDString = 8DC2EF4F0486A6940098B216 /* CDEvents */; | |
29 | + remoteGlobalIDString = 8DC2EF4F0486A6940098B216; | |
30 | 30 | remoteInfo = CDEvents; |
31 | 31 | }; |
32 | 32 | /* End PBXContainerItemProxy section */ |
@@ -325,8 +325,9 @@ | ||
325 | 325 | GCC_OPTIMIZATION_LEVEL = 0; |
326 | 326 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
327 | 327 | GCC_PREFIX_HEADER = CDEvents_Prefix.pch; |
328 | + GCC_VERSION = ""; | |
328 | 329 | INFOPLIST_FILE = Info.plist; |
329 | - INSTALL_PATH = "@rpath"; | |
330 | + INSTALL_PATH = "@loader_path/../Frameworks"; | |
330 | 331 | PRODUCT_NAME = CDEvents; |
331 | 332 | WRAPPER_EXTENSION = framework; |
332 | 333 | }; |
@@ -344,8 +345,9 @@ | ||
344 | 345 | GCC_MODEL_TUNING = G5; |
345 | 346 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
346 | 347 | GCC_PREFIX_HEADER = CDEvents_Prefix.pch; |
348 | + GCC_VERSION = ""; | |
347 | 349 | INFOPLIST_FILE = Info.plist; |
348 | - INSTALL_PATH = "@rpath"; | |
350 | + INSTALL_PATH = "@loader_path/../Frameworks"; | |
349 | 351 | PRODUCT_NAME = CDEvents; |
350 | 352 | WRAPPER_EXTENSION = framework; |
351 | 353 | }; |