Permalink
Browse files

Delete UKKQueue

Can always add it back as a submodule if desperately needed, but GCD is
likely a better fit these days anyway
  • Loading branch information...
mikeabdullah committed Mar 22, 2013
1 parent e36a074 commit b7dd189eaccd350bdfc41f2a9d6ba8c2287a1d63
@@ -78,13 +78,6 @@
791E83050B0EDAC90060E5FC /* error.png in Resources */ = {isa = PBXBuildFile; fileRef = 791E83030B0EDAC90060E5FC /* error.png */; };
791E83060B0EDAC90060E5FC /* finished.png in Resources */ = {isa = PBXBuildFile; fileRef = 791E83040B0EDAC90060E5FC /* finished.png */; };
792BC96C0ABF7EC10022415A /* NSString+Connection.h in Headers */ = {isa = PBXBuildFile; fileRef = 792BC8B00ABF6B2E0022415A /* NSString+Connection.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 795AFEF50B115511006905FA /* UKFileWatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 795AFEEC0B115511006905FA /* UKFileWatcher.h */; };
- 795AFEF60B115511006905FA /* UKFileWatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 795AFEED0B115511006905FA /* UKFileWatcher.m */; };
- 795AFEF90B115511006905FA /* UKKQueue Readme.txt in Resources */ = {isa = PBXBuildFile; fileRef = 795AFEF00B115511006905FA /* UKKQueue Readme.txt */; };
- 795AFEFA0B115511006905FA /* UKKQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 795AFEF10B115511006905FA /* UKKQueue.h */; };
- 795AFEFB0B115511006905FA /* UKKQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 795AFEF20B115511006905FA /* UKKQueue.m */; };
- 795AFEFC0B115511006905FA /* UKMainThreadProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 795AFEF30B115511006905FA /* UKMainThreadProxy.h */; };
- 795AFEFD0B115511006905FA /* UKMainThreadProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 795AFEF40B115511006905FA /* UKMainThreadProxy.m */; };
795E44DF0AC5F748007912A2 /* NSString+Connection.m in Sources */ = {isa = PBXBuildFile; fileRef = 792BC8B10ABF6B2E0022415A /* NSString+Connection.m */; };
796DB30109F8BB1D0065897B /* SecurityInterface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 796DB2F609F8BB1D0065897B /* SecurityInterface.framework */; };
7978FC150B117D7C0048168B /* bookmark.tif in Resources */ = {isa = PBXBuildFile; fileRef = 7978FC140B117D7C0048168B /* bookmark.tif */; };
@@ -276,13 +269,6 @@
792BC8B10ABF6B2E0022415A /* NSString+Connection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSString+Connection.m"; path = "ConnectionKit/NSString+Connection.m"; sourceTree = "<group>"; };
7946B0FC0AC0F4A400CAE90F /* CKS3Connection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CKS3Connection.h; sourceTree = "<group>"; };
7946B0FD0AC0F4A400CAE90F /* CKS3Connection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CKS3Connection.m; sourceTree = "<group>"; };
- 795AFEEC0B115511006905FA /* UKFileWatcher.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = UKFileWatcher.h; sourceTree = "<group>"; };
- 795AFEED0B115511006905FA /* UKFileWatcher.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = UKFileWatcher.m; sourceTree = "<group>"; };
- 795AFEF00B115511006905FA /* UKKQueue Readme.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "UKKQueue Readme.txt"; sourceTree = "<group>"; };
- 795AFEF10B115511006905FA /* UKKQueue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = UKKQueue.h; sourceTree = "<group>"; };
- 795AFEF20B115511006905FA /* UKKQueue.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = UKKQueue.m; sourceTree = "<group>"; };
- 795AFEF30B115511006905FA /* UKMainThreadProxy.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = UKMainThreadProxy.h; sourceTree = "<group>"; };
- 795AFEF40B115511006905FA /* UKMainThreadProxy.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = UKMainThreadProxy.m; sourceTree = "<group>"; };
796DB2F609F8BB1D0065897B /* SecurityInterface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SecurityInterface.framework; path = /System/Library/Frameworks/SecurityInterface.framework; sourceTree = "<absolute>"; };
7978FC140B117D7C0048168B /* bookmark.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = bookmark.tif; sourceTree = "<group>"; };
797CC8C609F861770063FF9B /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; lineEnding = 0; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -620,21 +606,6 @@
name = Frameworks;
sourceTree = "<group>";
};
- 795AFEE50B1154E2006905FA /* UKKQueue */ = {
- isa = PBXGroup;
- children = (
- 795AFEEC0B115511006905FA /* UKFileWatcher.h */,
- 795AFEED0B115511006905FA /* UKFileWatcher.m */,
- 795AFEF00B115511006905FA /* UKKQueue Readme.txt */,
- 795AFEF10B115511006905FA /* UKKQueue.h */,
- 795AFEF20B115511006905FA /* UKKQueue.m */,
- 795AFEF30B115511006905FA /* UKMainThreadProxy.h */,
- 795AFEF40B115511006905FA /* UKMainThreadProxy.m */,
- );
- name = UKKQueue;
- path = ../UKQueue;
- sourceTree = "<group>";
- };
79CFD11A09F7022900172CDD /* Connections */ = {
isa = PBXGroup;
children = (
@@ -650,7 +621,6 @@
79CFD8A009F705B400172CDD /* Utility */ = {
isa = PBXGroup;
children = (
- 795AFEE50B1154E2006905FA /* UKKQueue */,
2790A8201626CA67000C9D9F /* CK2RemoteURL.h */,
2790A8211626CA67000C9D9F /* CK2RemoteURL.m */,
);
@@ -696,9 +666,6 @@
79CFD89509F704F400172CDD /* Connection.h in Headers */,
7983DF8E0B0C0FAC00F5078E /* CKTransferRecord.h in Headers */,
798313C90B0D67E000F5078E /* CKTransferProgressCell.h in Headers */,
- 795AFEF50B115511006905FA /* UKFileWatcher.h in Headers */,
- 795AFEFA0B115511006905FA /* UKKQueue.h in Headers */,
- 795AFEFC0B115511006905FA /* UKMainThreadProxy.h in Headers */,
27D03B421471787000FEA588 /* CKUploader.h in Headers */,
2702E3EF1459CB550085BBC4 /* CK2SFTPFileHandle.h in Headers */,
2702E3F11459CB550085BBC4 /* CK2SFTPSession.h in Headers */,
@@ -880,7 +847,6 @@
797CC8C709F861770063FF9B /* Localizable.strings in Resources */,
791E83050B0EDAC90060E5FC /* error.png in Resources */,
791E83060B0EDAC90060E5FC /* finished.png in Resources */,
- 795AFEF90B115511006905FA /* UKKQueue Readme.txt in Resources */,
7978FC150B117D7C0048168B /* bookmark.tif in Resources */,
227113BF168388FD00280005 /* http.json in Resources */,
);
@@ -983,9 +949,6 @@
795E44DF0AC5F748007912A2 /* NSString+Connection.m in Sources */,
7983DF8F0B0C0FAC00F5078E /* CKTransferRecord.m in Sources */,
798313CA0B0D67E000F5078E /* CKTransferProgressCell.m in Sources */,
- 795AFEF60B115511006905FA /* UKFileWatcher.m in Sources */,
- 795AFEFB0B115511006905FA /* UKKQueue.m in Sources */,
- 795AFEFD0B115511006905FA /* UKMainThreadProxy.m in Sources */,
2702E3F01459CB550085BBC4 /* CK2SFTPFileHandle.m in Sources */,
2702E3F21459CB550085BBC4 /* CK2SFTPSession.m in Sources */,
27D03B431471787000FEA588 /* CKUploader.m in Sources */,
View
@@ -1,62 +0,0 @@
-/* =============================================================================
- FILE: UKFileWatcher.h
- PROJECT: Filie
-
- COPYRIGHT: (c) 2005 M. Uli Kusterer, all rights reserved.
-
- AUTHORS: M. Uli Kusterer - UK
-
- LICENSES: MIT License
-
- REVISIONS:
- 2006-03-13 UK Moved notification constants to .m file.
- 2005-02-25 UK Created.
- ========================================================================== */
-
-/*
- This is a protocol that file change notification classes should adopt.
- That way, no matter whether you use Carbon's FNNotify/FNSubscribe, BSD's
- kqueue or whatever, the object being notified can react to change
- notifications the same way, and you can easily swap one out for the other
- to cater to different OS versions, target volumes etc.
-*/
-
-// -----------------------------------------------------------------------------
-// Protocol:
-// -----------------------------------------------------------------------------
-
-@protocol UKFileWatcher
-
-// +(id) sharedFileWatcher; // Singleton accessor. Not officially part of the protocol, but use this name if you provide a singleton.
-
--(void) addPath: (NSString*)path;
--(void) removePath: (NSString*)path;
-
--(id) delegate;
--(void) setDelegate: (id)newDelegate;
-
-@end
-
-// -----------------------------------------------------------------------------
-// Methods delegates need to provide:
-// -----------------------------------------------------------------------------
-
-@interface NSObject (UKFileWatcherDelegate)
-
--(void) watcher: (id<UKFileWatcher>)kq receivedNotification: (NSString*)nm forPath: (NSString*)fpath;
-
-@end
-
-
-// Notifications this sends:
-/* object = the file watcher object
- userInfo.path = file path watched
- These notifications are sent via the NSWorkspace notification center */
-extern NSString* UKFileWatcherRenameNotification;
-extern NSString* UKFileWatcherWriteNotification;
-extern NSString* UKFileWatcherDeleteNotification;
-extern NSString* UKFileWatcherAttributeChangeNotification;
-extern NSString* UKFileWatcherSizeIncreaseNotification;
-extern NSString* UKFileWatcherLinkCountChangeNotification;
-extern NSString* UKFileWatcherAccessRevocationNotification;
-
View
@@ -1,38 +0,0 @@
-/* =============================================================================
- FILE: UKKQueue.m
- PROJECT: Filie
-
- COPYRIGHT: (c) 2005-06 M. Uli Kusterer, all rights reserved.
-
- AUTHORS: M. Uli Kusterer - UK
-
- LICENSES: MIT License
-
- REVISIONS:
- 2006-03-13 UK Created, moved notification constants here as exportable
- symbols.
- ========================================================================== */
-
-// -----------------------------------------------------------------------------
-// Headers:
-// -----------------------------------------------------------------------------
-
-#import <Cocoa/Cocoa.h>
-#import "UKFileWatcher.h"
-
-
-// -----------------------------------------------------------------------------
-// Constants:
-// -----------------------------------------------------------------------------
-
-// Do not rely on the actual contents of these constants. They will eventually
-// be changed to be more generic and less KQueue-specific.
-
-NSString* UKFileWatcherRenameNotification = @"UKKQueueFileRenamedNotification";
-NSString* UKFileWatcherWriteNotification = @"UKKQueueFileWrittenToNotification";
-NSString* UKFileWatcherDeleteNotification = @"UKKQueueFileDeletedNotification";
-NSString* UKFileWatcherAttributeChangeNotification = @"UKKQueueFileAttributesChangedNotification";
-NSString* UKFileWatcherSizeIncreaseNotification = @"UKKQueueFileSizeIncreasedNotification";
-NSString* UKFileWatcherLinkCountChangeNotification = @"UKKQueueFileLinkCountChangedNotification";
-NSString* UKFileWatcherAccessRevocationNotification = @"UKKQueueFileAccessRevocationNotification";
-
@@ -1,32 +0,0 @@
-UKKQUEUE
---------
-
-A wrapper class around the kqueue file change notification mechanism.
-
-Simply create a UKKQueue (or use the singleton), add a few paths to it and listen to the change notifications via NSWorkspace's notification center.
-
-LICENSE:
-
-(c) 2003-06 by M. Uli Kusterer. You may redistribute, modify, use in
-commercial products free of charge, however distributing modified copies
-requires that you clearly mark them as having been modified by you, while
-maintaining the original markings and copyrights. I don't like getting bug
-reports about code I wasn't involved in.
-
-I'd also appreciate if you gave credit in your app's about screen or a similar
-place. A simple "Thanks to M. Uli Kusterer" is quite sufficient.
-Also, I rarely turn down any postcards, gifts, complementary copies of
-applications etc.
-
-
-REVISION HISTORY:
-0.1 - Initial release.
-0.2 - Now calls delegate on main thread using UKMainThreadProxy, and checks retain count to make sure the object is released even when the thread is still holding on to it. Equivalent to SVN revision 79.
-0.3 - Now adopts UKFileWatcher protocol to allow swapping out a kqueue for another scheme easily. Uses O_EVONLY instead of O_RDONLY to open the file without preventing it from being deleted or its drive ejected.
-0.4 - Now includes UKFNSubscribeFileWatcher, and closes the kqueue file descriptor in a separate thread (thanks to Dominic Yu for the suggestion!) so you don't have to wait for close() to time out.
-0.5 - Turns off all deprecated features. Changes the notifications to make it possible to subscribe to them more selectively. Changes notification constants to be safer for apps that expose KQueue to their plugins. FNSubscribeFileWatcher now also sends notifications (sorry, "write" only).
-
-
-CONTACT:
-Get the newest version at http://www.zathras.de
-E-Mail me at witness (at) zathras (dot) de or witness (dot) of (dot) teachtext (at) gmx (dot) net
View
@@ -1,122 +0,0 @@
-/* =============================================================================
- FILE: UKKQueue.h
- PROJECT: Filie
-
- COPYRIGHT: (c) 2003 M. Uli Kusterer, all rights reserved.
-
- AUTHORS: M. Uli Kusterer - UK
-
- LICENSES: MIT License
-
- REVISIONS:
- 2006-03-13 UK Clarified license, streamlined UKFileWatcher stuff,
- Changed notifications to be useful and turned off by
- default some deprecated stuff.
- 2003-12-21 UK Created.
- ========================================================================== */
-
-// -----------------------------------------------------------------------------
-// Headers:
-// -----------------------------------------------------------------------------
-
-#import <Foundation/Foundation.h>
-#include <sys/types.h>
-#include <sys/event.h>
-#import "UKFileWatcher.h"
-
-
-// -----------------------------------------------------------------------------
-// Constants:
-// -----------------------------------------------------------------------------
-
-// Backwards compatibility constants. Don't rely on code commented out with these constants, because it may be deleted in a future version.
-#ifndef UKKQUEUE_BACKWARDS_COMPATIBLE
-#define UKKQUEUE_BACKWARDS_COMPATIBLE 0 // 1 to send old-style kqueue:receivedNotification:forFile: messages to objects that accept them.
-#endif
-
-#ifndef UKKQUEUE_SEND_STUPID_NOTIFICATIONS
-#define UKKQUEUE_SEND_STUPID_NOTIFICATIONS 0 // 1 to send old-style notifications that have the path as the object and no userInfo dictionary.
-#endif
-
-#ifndef UKKQUEUE_OLD_SINGLETON_ACCESSOR_NAME
-#define UKKQUEUE_OLD_SINGLETON_ACCESSOR_NAME 0 // 1 to allow use of sharedQueue instead of sharedFileWatcher.
-#endif
-
-#ifndef UKKQUEUE_OLD_NOTIFICATION_NAMES
-#define UKKQUEUE_OLD_NOTIFICATION_NAMES 0 // 1 to allow use of old KQueue-style notification names instead of the new more generic ones in UKFileWatcher.
-#endif
-
-// Flags for notifyingAbout:
-#define UKKQueueNotifyAboutRename NOTE_RENAME // Item was renamed.
-#define UKKQueueNotifyAboutWrite NOTE_WRITE // Item contents changed (also folder contents changed).
-#define UKKQueueNotifyAboutDelete NOTE_DELETE // item was removed.
-#define UKKQueueNotifyAboutAttributeChange NOTE_ATTRIB // Item attributes changed.
-#define UKKQueueNotifyAboutSizeIncrease NOTE_EXTEND // Item size increased.
-#define UKKQueueNotifyAboutLinkCountChanged NOTE_LINK // Item's link count changed.
-#define UKKQueueNotifyAboutAccessRevocation NOTE_REVOKE // Access to item was revoked.
-
-// Notifications this sends:
-// (see UKFileWatcher)
-// Old names: *deprecated*
-#if UKKQUEUE_OLD_NOTIFICATION_NAMES
-#define UKKQueueFileRenamedNotification UKFileWatcherRenameNotification
-#define UKKQueueFileWrittenToNotification UKFileWatcherWriteNotification
-#define UKKQueueFileDeletedNotification UKFileWatcherDeleteNotification
-#define UKKQueueFileAttributesChangedNotification UKFileWatcherAttributeChangeNotification
-#define UKKQueueFileSizeIncreasedNotification UKFileWatcherSizeIncreaseNotification
-#define UKKQueueFileLinkCountChangedNotification UKFileWatcherLinkCountChangeNotification
-#define UKKQueueFileAccessRevocationNotification UKFileWatcherAccessRevocationNotification
-#endif
-
-
-// -----------------------------------------------------------------------------
-// UKKQueue:
-// -----------------------------------------------------------------------------
-
-@interface UKKQueue : NSObject <UKFileWatcher>
-{
- int queueFD; // The actual queue ID (Unix file descriptor).
- NSMutableArray* watchedPaths; // List of NSStrings containing the paths we're watching.
- NSMutableArray* watchedFDs; // List of NSNumbers containing the file descriptors we're watching.
- id delegate; // Gets messages about changes instead of notification center, if specified.
- id delegateProxy; // Proxy object to which we send messages so they reach delegate on the main thread.
- BOOL alwaysNotify; // Send notifications even if we have a delegate? Defaults to NO.
- BOOL keepThreadRunning; // Termination criterion of our thread.
-}
-
-+(id) sharedFileWatcher; // Returns a singleton, a shared kqueue object Handy if you're subscribing to the notifications. Use this, or just create separate objects using alloc/init. Whatever floats your boat.
-
--(int) queueFD; // I know you unix geeks want this...
-
-// High-level file watching: (use UKFileWatcher protocol methods instead, where possible!)
--(void) addPathToQueue: (NSString*)path;
--(void) addPathToQueue: (NSString*)path notifyingAbout: (u_int)fflags;
--(void) removePathFromQueue: (NSString*)path;
-
--(id) delegate;
--(void) setDelegate: (id)newDelegate;
-
--(BOOL) alwaysNotify;
--(void) setAlwaysNotify: (BOOL)n;
-
-#if UKKQUEUE_OLD_SINGLETON_ACCESSOR_NAME
-+(UKKQueue*) sharedQueue;
-#endif
-
-// private:
--(void) watcherThread: (id)sender;
--(void) postNotification: (NSString*)nm forFile: (NSString*)fp; // Message-posting bottleneck.
-
-@end
-
-
-// -----------------------------------------------------------------------------
-// Methods delegates need to provide:
-// * DEPRECATED * use UKFileWatcher delegate methods instead!
-// -----------------------------------------------------------------------------
-
-@interface NSObject (UKKQueueDelegate)
-
--(void) kqueue: (UKKQueue*)kq receivedNotification: (NSString*)nm forFile: (NSString*)fpath;
-
-@end
Oops, something went wrong.

0 comments on commit b7dd189

Please sign in to comment.