home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / DEV.Z / NXProxy.h < prev    next >
Encoding:
Text File  |  1996-09-08  |  1.8 KB  |  71 lines

  1. /*  NXProxy.h
  2.     Copyright 1992, NeXT, Inc.
  3. */
  4.  
  5. #import <stdlib.h>
  6. #import <stdarg.h>
  7. #import <objc/HashTable.h>
  8. #import <objc/Protocol.h>
  9. #import <remote/NXConnection.h>
  10. #import <remote/transport.h>
  11. #import <machkit/reference.h>
  12.  
  13.  
  14.  
  15.  
  16. /*****************  Distributed Objects     **************************/
  17.  
  18. typedef enum  {
  19.     NX_REMOTE_EXCEPTION_BASE = 11000,
  20.     NX_couldntSendException = 11001,
  21.     NX_couldntReceiveException = 11002,
  22.     NX_couldntDecodeArgumentsException = 11003,
  23.     NX_unknownMethodException = 11004,
  24.     NX_objectInaccessibleException = 11005,
  25.     NX_objectNotAvailableException = 11007,
  26.     NX_remoteInternalException = 11008,
  27.     NX_multithreadedRecursionDeadlockException = 11009,
  28.     NX_destinationInvalid = 11010,
  29.     NX_originatorInvalid = 11011,
  30.     NX_sendTimedOut = 11012,
  31.     NX_receiveTimedOut = 11013,
  32.     NX_REMOTE_LAST_EXCEPTION = 11999
  33. } NXRemoteException;
  34.  
  35.  
  36. /* we keep a NXProxy for each Object, whether remote or local,
  37.  * that has been communicated over the wire.
  38.  */
  39.  
  40. @interface NXProxy <NXTransport,NXReference> {
  41. @private
  42.     Class           isa;
  43. #if __alpha__
  44.     unsigned long   name;           /* object name */
  45. #else /* __alpha__ */
  46.     unsigned        name;           /* object name */
  47. #endif /* __alpha__ */
  48.     unsigned        wire;           /* is this a stub for a local object? */
  49.     NXConnection    *conn;          /* what conn are we registered on? */
  50.     Protocol        *proto;         /* what protocol do we serve? */
  51.     unsigned        refcount;       /* how many references have been made? */
  52.     void            *knownSelectors;    /* cache */
  53. }
  54.  
  55.  
  56. - setProtocolForProxy:(Protocol *)proto;
  57.  
  58. - (BOOL) isProxy;   // always returns YES
  59.  
  60. - connectionForProxy;
  61. - (unsigned) nameForProxy;
  62.  
  63. - freeProxy;
  64. @end
  65.  
  66. @interface Object (IsProxy)
  67. - (BOOL) isProxy;   // always returns NO
  68. @end
  69.  
  70.  
  71.