NSConnection.inc 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. { Parsed from Foundation.framework NSConnection.h }
  2. {$ifdef TYPES}
  3. type
  4. NSConnectionPtr = ^NSConnection;
  5. NSDistantObjectRequestPtr = ^NSDistantObjectRequest;
  6. NSConnectionDelegateProtocolPtr = ^NSConnectionDelegateProtocol;
  7. {$endif}
  8. {$ifdef CLASSES}
  9. type
  10. NSConnection = objcclass external (NSObject)
  11. private
  12. receivePort: id;
  13. sendPort: id;
  14. delegate: id;
  15. busy: cint32;
  16. localProxyCount: cint32;
  17. waitCount: cint32;
  18. delayedRL: id;
  19. statistics: id;
  20. isDead: char;
  21. isValid: char;
  22. wantsInvalid: char;
  23. _anonStruct_NSConnection0: record
  24. case byte of
  25. 0: (anonBitField_NSConnection0: cuint);
  26. 1: (data: bitpacked record
  27. authGen: 0..1;
  28. authCheck: 0..1;
  29. _reserved1: 0..1;
  30. _reserved2: 0..1;
  31. doRequest: 0..1;
  32. isQueueing: 0..1;
  33. isMulti: 0..1;
  34. invalidateRP: 0..1;
  35. end;
  36. );
  37. end;
  38. ___1: id;
  39. ___2: id;
  40. runLoops: id;
  41. requestModes: id;
  42. rootObject: id;
  43. registerInfo: pointer;
  44. replMode: id;
  45. classInfoImported: id;
  46. releasedProxies: id;
  47. reserved: id;
  48. public
  49. function statistics_: NSDictionary; message 'statistics';
  50. class function allConnections: NSArray; message 'allConnections';
  51. class function defaultConnection: NSConnection; message 'defaultConnection'; deprecated 'in 10_0, 10_6, NA, NA';
  52. class function connectionWithRegisteredName_host (name: NSString; hostName: NSString): instancetype; message 'connectionWithRegisteredName:host:';
  53. class function connectionWithRegisteredName_host_usingNameServer (name: NSString; hostName: NSString; server: NSPortNameServer): instancetype; message 'connectionWithRegisteredName:host:usingNameServer:';
  54. class function rootProxyForConnectionWithRegisteredName_host (name: NSString; hostName: NSString): NSDistantObject; message 'rootProxyForConnectionWithRegisteredName:host:';
  55. class function rootProxyForConnectionWithRegisteredName_host_usingNameServer (name: NSString; hostName: NSString; server: NSPortNameServer): NSDistantObject; message 'rootProxyForConnectionWithRegisteredName:host:usingNameServer:';
  56. class function serviceConnectionWithName_rootObject_usingNameServer (name: NSString; root: id; server: NSPortNameServer): instancetype; message 'serviceConnectionWithName:rootObject:usingNameServer:'; { available in 10_5, 2_0 }
  57. class function serviceConnectionWithName_rootObject (name: NSString; root: id): instancetype; message 'serviceConnectionWithName:rootObject:'; { available in 10_5, 2_0 }
  58. procedure setRequestTimeout(newValue: NSTimeInterval); message 'setRequestTimeout:';
  59. function requestTimeout: NSTimeInterval; message 'requestTimeout';
  60. procedure setReplyTimeout(newValue: NSTimeInterval); message 'setReplyTimeout:';
  61. function replyTimeout: NSTimeInterval; message 'replyTimeout';
  62. procedure setRootObject(newValue: id); message 'setRootObject:';
  63. function rootObject_: id; message 'rootObject';
  64. procedure setDelegate(newValue: NSConnectionDelegateProtocol); message 'setDelegate:';
  65. function delegate_: NSConnectionDelegateProtocol; message 'delegate';
  66. procedure setIndependentConversationQueueing(newValue: ObjCBOOL); message 'setIndependentConversationQueueing:';
  67. function independentConversationQueueing: ObjCBOOL; message 'independentConversationQueueing';
  68. function isValid_: ObjCBOOL; message 'isValid';
  69. function rootProxy: NSDistantObject; message 'rootProxy';
  70. procedure invalidate; message 'invalidate';
  71. procedure addRequestMode (rmode: NSString); message 'addRequestMode:';
  72. procedure removeRequestMode (rmode: NSString); message 'removeRequestMode:';
  73. function requestModes_: NSArray; message 'requestModes';
  74. function registerName (name: NSString): ObjCBOOL; message 'registerName:';
  75. function registerName_withNameServer (name: NSString; server: NSPortNameServer): ObjCBOOL; message 'registerName:withNameServer:';
  76. class function connectionWithReceivePort_sendPort (receivePort_: NSPort; sendPort_: NSPort): instancetype; message 'connectionWithReceivePort:sendPort:';
  77. class function currentConversation: id; message 'currentConversation';
  78. function initWithReceivePort_sendPort (receivePort_: NSPort; sendPort_: NSPort): instancetype; message 'initWithReceivePort:sendPort:';
  79. function sendPort_: NSPort; message 'sendPort';
  80. function receivePort_: NSPort; message 'receivePort';
  81. procedure enableMultipleThreads; message 'enableMultipleThreads';
  82. function multipleThreadsEnabled: ObjCBOOL; message 'multipleThreadsEnabled';
  83. procedure addRunLoop (runloop: NSRunLoop); message 'addRunLoop:';
  84. procedure removeRunLoop (runloop: NSRunLoop); message 'removeRunLoop:';
  85. procedure runInNewThread; message 'runInNewThread';
  86. function remoteObjects: NSArray; message 'remoteObjects';
  87. function localObjects: NSArray; message 'localObjects';
  88. procedure dispatchWithComponents (components: NSArray); message 'dispatchWithComponents:'; { available in 10_7, 5_0 }
  89. end;
  90. {$endif}
  91. {$ifdef EXTERNAL_SYMBOLS}
  92. var
  93. NSConnectionReplyMode: NSString; cvar; external;
  94. NSConnectionDidDieNotification: NSString; cvar; external;
  95. {$endif}
  96. {$ifdef PROTOCOLS}
  97. type
  98. NSConnectionDelegateProtocol = objcprotocol external name 'NSConnectionDelegate' (NSObjectProtocol)
  99. optional
  100. function makeNewConnection_sender (conn: NSConnection; ancestor: NSConnection): ObjCBOOL; message 'makeNewConnection:sender:';
  101. function connection_shouldMakeNewConnection (ancestor: NSConnection; conn: NSConnection): ObjCBOOL; message 'connection:shouldMakeNewConnection:';
  102. function authenticationDataForComponents (components: NSArray): NSData; message 'authenticationDataForComponents:';
  103. function authenticateComponents_withData (components: NSArray; signature: NSData): ObjCBOOL; message 'authenticateComponents:withData:';
  104. function createConversationForConnection (conn: NSConnection): id; message 'createConversationForConnection:';
  105. function connection_handleRequest (connection: NSConnection; doreq: NSDistantObjectRequest): ObjCBOOL; message 'connection:handleRequest:';
  106. end;
  107. {$endif}
  108. {$ifdef EXTERNAL_SYMBOLS}
  109. var
  110. NSFailedAuthenticationException: NSString; cvar; external;
  111. NSConnectionDidInitializeNotification: NSString; cvar; external;
  112. {$endif}
  113. {$ifdef CLASSES}
  114. type
  115. NSDistantObjectRequest = objcclass external (NSObject)
  116. public
  117. function invocation: NSInvocation; message 'invocation';
  118. function connection: NSConnection; message 'connection';
  119. function conversation: id; message 'conversation';
  120. procedure replyWithException (exception: NSException); message 'replyWithException:';
  121. end;
  122. {$endif}