Commits

Anonymous committed 912fcd2

Added declarations for all Foundation protocols.

Comments (0)

Files changed (2)

+2003-03-09  Bill Bumgarner  <bbum@codefab.com>
+    * Lib/Foundation/__init__.py: Added declarations for all of the informal
+      protocols in Foundation.
+
 2003-02-28  Bill Bumgarner  <bbum@codefab.com>
     * Lib/AppKit/__init__.py: Added three (void) methods to
     NSTableViewDelegate and added NSOutlineViewDelegate.

pyobjc/Lib/Foundation/__init__.py

     # when needed. This is needed so other Python threads get a chance
     # to run while we're inside the event loop.
     autoGIL.installAutoGIL()
+
+NSConnectionDelegateMethods = _objc.informal_protocol(
+    'NSConnectionDelegateMethods',
+    [
+# - (BOOL)makeNewConnection:(NSConnection *)conn sender:(NSConnection *)ancestor;
+        _objc.selector(
+            None, 
+            selector='makeNewConnection:sender:',
+            signature='c@:@@',
+            required=0
+        ),
+# - (BOOL)connection:(NSConnection *)ancestor shouldMakeNewConnection:(NSConnection *)conn;
+        _objc.selector(
+            None, 
+            selector='connection:shouldMakeNewConnection:',
+            signature='c@:@@',
+            required=0
+        ),
+# - (NSData *)authenticationDataForComponents:(NSArray *)components;
+        _objc.selector(
+            None, 
+            selector='authenticationDataForComponents:',
+            signature='@@:@',
+            required=0
+        ),
+# - (BOOL)authenticateComponents:(NSArray *)components withData:(NSData *)signature;
+        _objc.selector(
+            None, 
+            selector='authenticateComponents:withData:',
+            signature='@@:@@',
+            required=0
+        ),
+# - (id)createConversationForConnection:(NSConnection *)conn;
+        _objc.selector(
+            None, 
+            selector='createConversationForConnection:',
+            signature='@@:@',
+            required=0
+        ),
+        ]
+    )
+
+NSDistantObjectRequestMethods = _objc.informal_protocol(
+    'NSDistantObjectRequestMethods',
+    [
+# - (BOOL)connection:(NSConnection *)connection handleRequest:(NSDistantObjectRequest *)doreq;
+        _objc.selector(
+            None, 
+            selector='connection:handleRequest:',
+            signature='c@:@@',
+            required=0
+        ),
+        ]
+    )
+
+NSCopyLinkMoveHandler = _objc.informal_protocol(
+    'NSCopyLinkMoveHandler',
+    [
+# - (BOOL)fileManager:(NSFileManager *)fm shouldProceedAfterError:(NSDictionary *)errorInfo;
+        _objc.selector(
+            None, 
+            selector='fileManager:shouldProceedAfterError:',
+            signature='c@:@@',
+            required=0
+        ),
+# - (void)fileManager:(NSFileManager *)fm willProcessPath:(NSString *)path;
+        _objc.selector(
+            None, 
+            selector='replacementObjectForArchiver:',
+            signature='v@:@@',
+            required=0
+        ),
+        ]
+    )
+
+NSKeyedArchiverDelegate = _objc.informal_protocol(
+    'NSKeyedArchiverDelegate',
+    [
+# - (id)archiver:(NSKeyedArchiver *)archiver willEncodeObject:(id)object;
+        _objc.selector(
+            None, 
+            selector='archiver:willEncodeObject:',
+            signature='@@:@@',
+            required=0
+        ),
+# - (void)archiver:(NSKeyedArchiver *)archiver didEncodeObject:(id)object;
+        _objc.selector(
+            None, 
+            selector='archiver:didEncodeObject:',
+            signature='v@:@@',
+            required=0
+        ),
+# - (void)archiver:(NSKeyedArchiver *)archiver willReplaceObject:(id)object withObject:(id)newObject;
+        _objc.selector(
+            None, 
+            selector='archiver:willReplaceObject:willReplaceObject:',
+            signature='v@:@@@',
+            required=0
+        ),
+# - (void)archiverWillFinish:(NSKeyedArchiver *)archiver;
+        _objc.selector(
+            None, 
+            selector='archiverWillFinish:',
+            signature='v@:@',
+            required=0
+        ),
+# - (void)archiverDidFinish:(NSKeyedArchiver *)archiver;
+        _objc.selector(
+            None, 
+            selector='archiverDidFinish:',
+            signature='v@:@',
+            required=0
+        ),
+        ]
+    )
+
+NSKeyedUnarchiverDelegate = _objc.informal_protocol(
+    'NSKeyedUnarchiverDelegate',
+    [
+# - (Class)unarchiver:(NSKeyedUnarchiver *)unarchiver cannotDecodeObjectOfClassName:(NSString *)name originalClasses:(NSArray *)classNames;
+        _objc.selector(
+            None, 
+            selector='unarchiver:cannotDecodeObjectOfClassName:originalClasses:',
+            signature='#@:@@@',
+            required=0
+        ),
+# - (id)unarchiver:(NSKeyedUnarchiver *)unarchiver didDecodeObject:(id)object;
+        _objc.selector(
+            None, 
+            selector='unarchiver:didDecodeObject:',
+            signature='@@:@@',
+            required=0
+        ),
+# - (void)unarchiver:(NSKeyedUnarchiver *)unarchiver willReplaceObject:(id)object withObject:(id)newObject;
+        _objc.selector(
+            None, 
+            selector='unarchiver:willReplaceObject:withObject:',
+            signature='v@:@@@',
+            required=0
+        ),
+# - (void)unarchiverWillFinish:(NSKeyedUnarchiver *)unarchiver;
+        _objc.selector(
+            None, 
+            selector='unarchiverWillFinish:',
+            signature='v@:@',
+            required=0
+        ),
+# - (void)unarchiverDidFinish:(NSKeyedUnarchiver *)unarchiver;
+        _objc.selector(
+            None, 
+            selector='unarchiverDidFinish:',
+            signature='v@:@',
+            required=0
+        ),
+        ]
+    )
+
+NSNetServiceDelegateMethods = _objc.informal_protocol(
+    'NSNetServiceDelegateMethods',
+    [
+# - (void)netServiceWillPublish:(NSNetService *)sender;
+        _objc.selector(
+            None, 
+            selector='netServiceWillPublish:',
+            signature='v@:@',
+            required=0
+        ),
+# - (void)netServiceWillResolve:(NSNetService *)sender;
+        _objc.selector(
+            None, 
+            selector='netServiceWillResolve:',
+            signature='v@:@',
+            required=0
+        ),
+# - (void)netService:(NSNetService *)sender didNotPublish:(NSDictionary *)errorDict;
+        _objc.selector(
+            None, 
+            selector='netService:didNotPublish:',
+            signature='v@:@@',
+            required=0
+        ),
+# - (void)netServiceDidResolveAddress:(NSNetService *)sender;
+        _objc.selector(
+            None, 
+            selector='netServiceDidResolveAddress:',
+            signature='v@:@',
+            required=0
+        ),
+# - (void)netService:(NSNetService *)sender didNotResolve:(NSDictionary *)errorDict;
+        _objc.selector(
+            None, 
+            selector='netService:didNotResolve:',
+            signature='v@:@@',
+            required=0
+        ),
+# - (void)netServiceDidStop:(NSNetService *)sender;
+        _objc.selector(
+            None, 
+            selector='netServiceDidStop:',
+            signature='v@:@',
+            required=0
+        ),
+        ]
+    )
+
+NSNetServiceBrowserDelegateMethods = _objc.informal_protocol(
+    'NSNetServiceBrowserDelegateMethods',
+    [
+# - (void)netServiceBrowserWillSearch:(NSNetServiceBrowser *)aNetServiceBrowser;
+        _objc.selector(
+            None, 
+            selector='netServiceBrowserWillSearch:',
+            signature='v@:@',
+            required=0
+        ),
+# - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindDomain:(NSString *)domainString moreComing:(BOOL)moreComing;
+        _objc.selector(
+            None, 
+            selector='netServiceBrowser:didFindDomain:moreComing:',
+            signature='v@:@@@',
+            required=0
+        ),
+# - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindService:(NSNetService *)aNetService moreComing:(BOOL)moreComing;
+        _objc.selector(
+            None, 
+            selector='netServiceBrowser:didFindService:moreComing:',
+            signature='v@:@@@',
+            required=0
+        ),
+# - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didNotSearch:(NSDictionary *)errorDict;
+        _objc.selector(
+            None, 
+            selector='netServiceBrowser:didNotSearch:',
+            signature='v@:@@',
+            required=0
+        ),
+# - (void)netServiceBrowserDidStopSearch:(NSNetServiceBrowser *)aNetServiceBrowser;
+        _objc.selector(
+            None, 
+            selector='netServiceBrowserDidStopSearch:',
+            signature='v@:@',
+            required=0
+        ),
+# - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didRemoveDomain:(NSString *)domainString moreComing:(BOOL)moreComing;
+        _objc.selector(
+            None, 
+            selector='netServiceBrowser:didRemoveDomain:moreComing:',
+            signature='v@:@@@',
+            required=0
+        ),
+# - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didRemoveService:(NSNetService *)aNetService moreComing:(BOOL)moreComing;
+        _objc.selector(
+            None, 
+            selector='netServiceBrowser:didRemoveService:moreComing:',
+            signature='v@:@@@',
+            required=0
+        ),
+        ]
+    )
+
+NSPortDelegateMethods = _objc.informal_protocol(
+    'NSPortDelegateMethods',
+    [
+# - (void)handlePortMessage:(NSPortMessage *)message;
+        _objc.selector(
+            None, 
+            selector='handlePortMessage:',
+            signature='v@:@',
+            required=0
+        ),
+        ]
+    )
+
+# NSMachPortDelegateMethods requires bridging of the Mach messaging structure(s).