blob: 49360c17d16b2eb046dd77f4f133535f3ed89829 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
{ Parsed from Foundation.framework NSPort.h }
{$ifdef TYPES}
{$ifndef NSPORT_PAS_T}
{$define NSPORT_PAS_T}
{ Types }
type
NSSocketNativeHandle = cint;
NSSocketNativeHandlePtr = ^NSSocketNativeHandle;
{ Constants }
const
NSMachPortDeallocateNone = 0;
NSMachPortDeallocateSendRight = 1 shl 0;
NSMachPortDeallocateReceiveRight = 1 shl 1;
{$endif}
{$endif}
{$ifdef RECORDS}
{$ifndef NSPORT_PAS_R}
{$define NSPORT_PAS_R}
{$endif}
{$endif}
{$ifdef FUNCTIONS}
{$ifndef NSPORT_PAS_F}
{$define NSPORT_PAS_F}
{$endif}
{$endif}
{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSPORT_PAS_S}
{$define NSPORT_PAS_S}
{ External string constants }
var
NSPortDidBecomeInvalidNotification: NSString; cvar; external;
{$endif}
{$endif}
{$ifdef FORWARD}
NSPortDelegateProtocol = objcprotocol;
NSMachPortDelegateProtocol = objcprotocol;
NSPort = objcclass;
NSPortPointer = ^NSPort;
NSPortPtr = NSPortPointer;
NSMachPort = objcclass;
NSMachPortPointer = ^NSMachPort;
NSMachPortPtr = NSMachPortPointer;
NSMessagePort = objcclass;
NSMessagePortPointer = ^NSMessagePort;
NSMessagePortPtr = NSMessagePortPointer;
NSSocketPort = objcclass;
NSSocketPortPointer = ^NSSocketPort;
NSSocketPortPtr = NSSocketPortPointer;
{$endif}
{$ifdef CLASSES}
{$ifndef NSPORT_PAS_C}
{$define NSPORT_PAS_C}
{ NSPort }
NSPort = objcclass external (NSObject, NSCopyingProtocol, NSCodingProtocol)
public
class function allocWithZone(zone_: NSZonePtr): id; message 'allocWithZone:';
class function port: NSPort; message 'port';
procedure invalidate; message 'invalidate';
function isValid: Boolean; message 'isValid';
procedure setDelegate(anObject: NSPortDelegateProtocol); message 'setDelegate:';
function delegate: NSPortDelegateProtocol; message 'delegate';
procedure scheduleInRunLoop_forMode(runLoop: NSRunLoop; mode: NSString); message 'scheduleInRunLoop:forMode:';
procedure removeFromRunLoop_forMode(runLoop: NSRunLoop; mode: NSString); message 'removeFromRunLoop:forMode:';
function reservedSpaceLength: NSUInteger; message 'reservedSpaceLength';
function sendBeforeDate_components_from_reserved(limitDate: NSDate; components: NSMutableArray; receivePort: NSPort; headerSpaceReserved: NSUInteger): Boolean; message 'sendBeforeDate:components:from:reserved:';
function sendBeforeDate_msgid_components_from_reserved(limitDate: NSDate; msgID: NSUInteger; components: NSMutableArray; receivePort: NSPort; headerSpaceReserved: NSUInteger): Boolean; message 'sendBeforeDate:msgid:components:from:reserved:';
procedure addConnection_toRunLoop_forMode(conn: NSConnection; runLoop: NSRunLoop; mode: NSString); message 'addConnection:toRunLoop:forMode:';
procedure removeConnection_fromRunLoop_forMode(conn: NSConnection; runLoop: NSRunLoop; mode: NSString); message 'removeConnection:fromRunLoop:forMode:';
{ Adopted Protocols }
function copyWithZone(zone_: NSZonePtr): id;
procedure encodeWithCoder(aCoder: NSCoder);
function initWithCoder(aDecoder: NSCoder): id;
end;
{ NSMachPort }
NSMachPort = objcclass external (NSPort)
private
_delegate: id;
_flags: NSUInteger;
_machPort: cuint32;
_reserved: NSUInteger;
public
class function portWithMachPort(machPort_: cuint32): NSPort; message 'portWithMachPort:';
function initWithMachPort(machPort_: cuint32): id; message 'initWithMachPort:';
procedure setDelegate(anObject: NSMachPortDelegateProtocol); message 'setDelegate:';
function delegate: NSMachPortDelegateProtocol; message 'delegate';
class function portWithMachPort_options(machPort_: cuint32; f: NSUInteger): NSPort; message 'portWithMachPort:options:';
function initWithMachPort_options(machPort_: cuint32; f: NSUInteger): id; message 'initWithMachPort:options:';
function machPort: cuint32; message 'machPort';
procedure scheduleInRunLoop_forMode(runLoop: NSRunLoop; mode: NSString); message 'scheduleInRunLoop:forMode:';
procedure removeFromRunLoop_forMode(runLoop: NSRunLoop; mode: NSString); message 'removeFromRunLoop:forMode:';
end;
{ NSMessagePort }
NSMessagePort = objcclass external (NSPort)
private
_port: Pointer; {garbage collector: __strong }
_delegate: id;
public
end;
{ NSSocketPort }
NSSocketPort = objcclass external (NSPort)
private
_receiver: Pointer; {garbage collector: __strong }
_connectors: Pointer; {garbage collector: __strong }
_loops: Pointer; {garbage collector: __strong }
_data: Pointer; {garbage collector: __strong }
_signature: id;
_delegate: id;
_lock: id;
_maxSize: NSUInteger;
_useCount: NSUInteger;
_reserved: NSUInteger;
public
function init: id; message 'init';
function initWithTCPPort(port_: cushort): id; message 'initWithTCPPort:';
function initWithProtocolFamily_socketType_protocol_address(family: cint; type_: cint; protocol_: cint; address_: NSData): id; message 'initWithProtocolFamily:socketType:protocol:address:';
function initWithProtocolFamily_socketType_protocol_socket(family: cint; type_: cint; protocol_: cint; sock: NSSocketNativeHandle): id; message 'initWithProtocolFamily:socketType:protocol:socket:';
function initRemoteWithTCPPort_host(port_: cushort; hostName: NSString): id; message 'initRemoteWithTCPPort:host:';
function initRemoteWithProtocolFamily_socketType_protocol_address(family: cint; type_: cint; protocol_: cint; address_: NSData): id; message 'initRemoteWithProtocolFamily:socketType:protocol:address:';
function protocolFamily: cint; message 'protocolFamily';
function socketType: cint; message 'socketType';
function protocol: cint; message 'protocol';
function address: NSData; message 'address';
function socket: NSSocketNativeHandle; message 'socket';
end;
{$endif}
{$endif}
{$ifdef PROTOCOLS}
{$ifndef NSPORT_PAS_P}
{$define NSPORT_PAS_P}
{ NSPortDelegate Protocol }
NSPortDelegateProtocol = objcprotocol external name 'NSPortDelegate'
optional
procedure handlePortMessage(message: NSPortMessage); message 'handlePortMessage:';
end;
{ NSMachPortDelegate Protocol }
NSMachPortDelegateProtocol = objcprotocol external name 'NSMachPortDelegate'
optional
procedure handleMachMessage(msg: Pointer); message 'handleMachMessage:';
end;
{$endif}
{$endif}
|