• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

An Objective-C wrapper for Mac OS X’s FSEvents C API.


Commit MetaInfo

Revisão4e5bf67637a2d5e9457d47cfa3b09e681020eb21 (tree)
Hora2010-04-04 00:14:29
AutorAron Cedercrantz <aron@cede...>
CommiterAron Cedercrantz

Mensagem de Log

Changed the way to start/init a CDEvents object.

Mudança Sumário

Diff

--- a/CDEvents.h
+++ b/CDEvents.h
@@ -175,35 +175,39 @@
175175 + (CDEventIdentifier)lastEventIdentifierForURL:(NSURL *)URL time:(NSDate *)time;
176176
177177
178-#pragma mark Start and stop watching paths
178+#pragma mark Init methods
179179 /**
180180 * Returns an <code>CDEvents</code> object initialized with the given URLs to watch.
181181 *
182182 * @param URLs An array of URLs we want to watch.
183+ * @param delegate The delegate object the <code>CDEvents</code> object calls when it recieves an event.
183184 * @return An <code>CDEvents</code> object initialized with the given URLs to watch.
184185 * @throws NSInvalidArgumentException if <em>URLs</em> is empty or points to <code>nil</code>.
186+ * @throws NSInvalidArgumentException if <em>delegate</em>is <code>nil</code>.
185187 *
186- * @see startWatchingURLs:onRunLoop:
187- * @see startWatchingURLs:onRunLoop:notificationLantency:ignoreEventsFromSubDirs:excludeURLs:
188+ * @see startWatchingURLs:delegate:onRunLoop:
189+ * @see startWatchingURLs:delegate:onRunLoop:notificationLantency:ignoreEventsFromSubDirs:excludeURLs:
188190 * @see stopWatchingURLs
189191 *
190192 * @discussion Calls startWatchingURLs:onRunLoop:notificationLantency:ignoreEventsFromSubDirs:excludeURLs:
191- * with <em>runLoop</em> set to the current run loop, <em>sinceEventIdentifier</em>
192- * with the current event identifier, <em>notificationLatency</em> set to 3.0
193- * seconds, <em>ignoreEventsFromSubDirectories</em> set to <code>NO</code>
194- * <em>excludedURLs</em> to no URLs. and schedueled on the current run loop.
193+ * with <em>sinceEventIdentifier</em> with the current event identifier,
194+ * <em>notificationLatency</em> set to 3.0 seconds,
195+ * <em>ignoreEventsFromSubDirectories</em> set to <code>NO</code>
196+ * <em>excludedURLs</em> to no URLs and schedueled on the current run loop.
195197 *
196198 * @since 1.0.0
197199 */
198-- (void)startWatchingURLs:(NSArray *)URLs;
200+- (id)initWithURLs:(NSArray *)URLs delegate:(id<CDEventsDelegate>)delegate;
199201
200202 /**
201203 * Returns an <code>CDEvents</code> object initialized with the given URLs to watch and schedules the watcher on the given run loop.
202204 *
203205 * @param URLs An array of URLs we want to watch.
206+ * @param delegate The delegate object the <code>CDEvents</code> object calls when it recieves an event.
204207 * @param The run loop which the which the watcher should be schedueled on.
205208 * @return An <code>CDEvents</code> object initialized with the given URLs to watch.
206209 * @throws NSInvalidArgumentException if <em>URLs</em> is empty or points to <code>nil</code>.
210+ * @throws NSInvalidArgumentException if <em>delegate</em>is <code>nil</code>.
207211 *
208212 * @see startWatchingURLs:
209213 * @see startWatchingURLs:onRunLoop:notificationLantency:ignoreEventsFromSubDirs:excludeURLs:
@@ -217,12 +221,15 @@
217221 *
218222 * @since 1.0.0
219223 */
220-- (void)startWatchingURLs:(NSArray *)URLs onRunLoop:(NSRunLoop *)runLoop;
224+- (void)initWithURLs:(NSArray *)URLs
225+ delegate:(id<CDEventsDelegate>)delegate
226+ onRunLoop:(NSRunLoop *)runLoop;
221227
222228 /**
223229 * Returns an <code>CDEvents</code> object initialized with the given URLs to watch, URLs to exclude, wheter events from sub-directories are ignored or not and schedules the watcher on the given run loop.
224230 *
225231 * @param URLs An array of URLs we want to watch.
232+ * @param delegate The delegate object the <code>CDEvents</code> object calls when it recieves an event.
226233 * @param runLoop The run loop which the which the watcher should be schedueled on.
227234 * @param sinceEventIdentifier Events that have happened after the given event identifier will be supplied.
228235 * @param notificationLatency The (approximate) time intervall between notifications sent to the delegate.
@@ -230,6 +237,7 @@
230237 * @param exludeURLs An array of URLs that we should ignore events from. Pass <code>nil</code> if none should be excluded.
231238 * @return An <code>CDEvents</code> object initialized with the given URLs to watch, URLs to exclude, wheter events from sub-directories are ignored or not and run on the given run loop.
232239 * @throws NSInvalidArgumentException if the parameter URLs is empty or points to <code>nil</code>.
240+ * @throws NSInvalidArgumentException if <em>delegate</em>is <code>nil</code>.
233241 *
234242 * @see startWatchingURLs:
235243 * @see startWatchingURLs:onRunLoop:
@@ -242,23 +250,13 @@
242250 *
243251 * @since 1.0.0
244252 */
245-- (void)startWatchingURLs:(NSArray *)URLs
246- onRunLoop:(NSRunLoop *)runLoop
247- sinceEventIdentifier:(CDEventIdentifier)sinceEventIdentifier
248- notificationLantency:(CFTimeInterval)notificationLatency
249- ignoreEventsFromSubDirs:(BOOL)ignoreEventsFromSubDirs
250- excludeURLs:(NSArray *)exludeURLs;
251-
252-/**
253- * Stop watching the URLs.
254- *
255- * @see startWatchingURLs:
256- * @see startWatchingURLs:onRunLoop:
257- * @see startWatchingURLs:onRunLoop:notificationLantency:ignoreEventsFromSubDirs:excludeURLs:
258- *
259- * @since 1.0.0
260- */
261-- (void)stopWatchingURLs;
253+- (void)initWithURLs:(NSArray *)URLs
254+ delegate:(id<CDEventsDelegate>)delegate
255+ onRunLoop:(NSRunLoop *)runLoop
256+sinceEventIdentifier:(CDEventIdentifier)sinceEventIdentifier
257+notificationLantency:(CFTimeInterval)notificationLatency
258+ignoreEventsFromSubDirs:(BOOL)ignoreEventsFromSubDirs
259+ excludeURLs:(NSArray *)exludeURLs;
262260
263261 #pragma mark Flush methods
264262