34
34
import com .sun .jna .platform .mac .CoreFoundation .CFMutableDictionaryRef ;
35
35
import com .sun .jna .platform .mac .CoreFoundation .CFStringRef ;
36
36
import com .sun .jna .platform .mac .CoreFoundation .CFTypeRef ;
37
- import com .sun .jna .platform .mac .SystemB .MachPort ;
38
- import com .sun .jna .platform .mac .SystemB .TaskPort ;
39
37
import com .sun .jna .ptr .IntByReference ;
40
38
import com .sun .jna .ptr .LongByReference ;
41
39
import com .sun .jna .ptr .PointerByReference ;
@@ -159,16 +157,17 @@ public IOConnect(Pointer p) {
159
157
* Returns the mach port used to initiate communication with IOKit.
160
158
*
161
159
* @param bootstrapPort
162
- * Pass {@link SystemB#MACH_PORT_NULL} for the default.
163
- * @param masterPort
160
+ * Pass 0 for the default.
161
+ * @param port
164
162
* A pointer to the master port is returned. Multiple calls to
165
163
* IOMasterPort will not result in leaking ports (each call to
166
164
* IOMasterPort adds another send right to the port) but it is
167
165
* considered good programming practice to deallocate the port when
168
- * you are finished with it using {@link #IOObjectRelease}
166
+ * you are finished with it using
167
+ * {@link SystemB#mach_port_deallocate}.
169
168
* @return 0 if successful, otherwise a {@code kern_return_t} error code.
170
169
*/
171
- int IOMasterPort (MachPort bootstrapPort , PointerByReference masterPort );
170
+ int IOMasterPort (int bootstrapPort , IntByReference port );
172
171
173
172
/**
174
173
* Create a matching dictionary that specifies an {@code IOService} class match.
@@ -219,7 +218,7 @@ public IOConnect(Pointer p) {
219
218
* otherwise it should be released with {@link CoreFoundation#CFRelease}
220
219
* by the caller.
221
220
*/
222
- CFMutableDictionaryRef IOBSDNameMatching (MachPort masterPort , int options , String bsdName );
221
+ CFMutableDictionaryRef IOBSDNameMatching (int masterPort , int options , String bsdName );
223
222
224
223
/**
225
224
* Look up a registered IOService object that matches a matching dictionary.
@@ -236,7 +235,7 @@ public IOConnect(Pointer p) {
236
235
* <p>
237
236
* The service must be released by the caller.
238
237
*/
239
- IOService IOServiceGetMatchingService (MachPort masterPort , CFDictionaryRef matchingDictionary );
238
+ IOService IOServiceGetMatchingService (int masterPort , CFDictionaryRef matchingDictionary );
240
239
241
240
/**
242
241
* Look up registered IOService objects that match a matching dictionary.
@@ -254,7 +253,7 @@ public IOConnect(Pointer p) {
254
253
* by the caller when the iteration is finished.
255
254
* @return 0 if successful, otherwise a {@code kern_return_t} error code.
256
255
*/
257
- int IOServiceGetMatchingServices (MachPort masterPort , CFDictionaryRef matchingDictionary ,
256
+ int IOServiceGetMatchingServices (int masterPort , CFDictionaryRef matchingDictionary ,
258
257
PointerByReference iterator );
259
258
260
259
/**
@@ -404,7 +403,7 @@ CFTypeRef IORegistryEntrySearchCFProperty(IORegistryEntry entry, String plane, C
404
403
* @return A handle to the IORegistryEntry root instance, to be released with
405
404
* {@link #IOObjectRelease} by the caller, or 0 on failure.
406
405
*/
407
- IORegistryEntry IORegistryGetRootEntry (MachPort masterPort );
406
+ IORegistryEntry IORegistryGetRootEntry (int masterPort );
408
407
409
408
/**
410
409
* Performs an OSDynamicCast operation on an IOKit object.
@@ -444,7 +443,7 @@ CFTypeRef IORegistryEntrySearchCFProperty(IORegistryEntry entry, String plane, C
444
443
* {@link IOServiceClose}.
445
444
* @return A return code generated by {@code IOService::newUserClient}.
446
445
*/
447
- int IOServiceOpen (IOService service , TaskPort owningTask , int type , PointerByReference connect );
446
+ int IOServiceOpen (IOService service , int owningTask , int type , PointerByReference connect );
448
447
449
448
/**
450
449
* Returns the busyState of an IOService.
0 commit comments