home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-Developer.iso / NextLibrary / Frameworks / Foundation.framework / Versions / B / Headers / NSPort.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-25  |  1.3 KB  |  48 lines

  1. /*      NSPort.h
  2.     An idealized many-to-one IPC interface
  3.     Copyright 1994-1996, NeXT Software, Inc.  All rights reserved.
  4. */
  5.  
  6. #if !defined(STRICT_OPENSTEP)
  7.  
  8. #import <Foundation/NSObject.h>
  9.  
  10. @class NSRunLoop, NSMutableArray, NSDate, NSConnection;
  11.  
  12. /***************    Port Class        ***************/
  13.  
  14. FOUNDATION_EXPORT NSString *NSPortDidBecomeInvalidNotification;
  15.  
  16. @interface NSPort : NSObject <NSCopying, NSCoding>
  17. + (NSPort *)port;
  18. + (NSPort *)portWithMachPort:(int)machPort;
  19. - (id)initWithMachPort:(int)machPort;
  20.  
  21. - (void)invalidate;
  22. - (BOOL)isValid;
  23.  
  24. - (int)machPort;
  25.  
  26. - (void)setDelegate:(id)anId;
  27. - (id)delegate;
  28.  
  29. // DO Transport API
  30. // subclassers should implement these methods
  31. - (unsigned)reservedSpaceLength;    // space to reserve in first data component for header
  32. - (BOOL) sendBeforeDate:(NSDate *)limitDate components:(NSMutableArray *)components from:(NSPort *) receivePort reserved:(unsigned)headerSpaceReserved;
  33.  
  34. - (void)addConnection:(NSConnection *)conn toRunLoop:(NSRunLoop *)runLoop forMode:(NSString *)mode;
  35. - (void)removeConnection:(NSConnection *)conn fromRunLoop:(NSRunLoop *)runLoop forMode:(NSString *)mode;
  36. @end
  37.  
  38. @class NSPortMessage;
  39.  
  40. @interface NSObject (NSPortMessageDelegateMethods)
  41.  
  42. - (void)handleMachMessage:(void *)msg;
  43. - (void)handlePortMessage:(NSPortMessage *)message;
  44.  
  45. @end
  46.  
  47. #endif /* !STRICT_OPENSTEP */
  48.