Class DiskArbitrationFunctions
java.lang.Object
oshi.ffm.ForeignFunctions
oshi.ffm.mac.DiskArbitrationFunctions
FFM bindings for DiskArbitration framework functions
-
Field Summary
Fields inherited from class ForeignFunctions
CAPTURE_CALL_STATE, CAPTURED_STATE_LAYOUT, ERRNO_HANDLE, LIBRARY_ARENA, LINKER, SYMBOL_LOOKUP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegmentObtains the Disk Arbitration description of the specified disk.static MemorySegmentDADiskCreateFromBSDName(MemorySegment allocator, MemorySegment session, MemorySegment bsdName) Creates a new disk object from a BSD device name.static MemorySegmentDADiskCreateFromIOMedia(MemorySegment allocator, MemorySegment session, MemorySegment media) Creates a new disk object from an IOMedia object.static MemorySegmentObtains the BSD device name for the specified disk.static MemorySegmentDASessionCreate(MemorySegment allocator) Creates a new session.Methods inherited from class ForeignFunctions
downcall, getByteArrayFromNativePointer, getErrno, getStringFromNativePointer, getStructFromNativePointer, lib, libraryLookup
-
Constructor Details
-
DiskArbitrationFunctions
public DiskArbitrationFunctions()
-
-
Method Details
-
DASessionCreate
Creates a new session.- Parameters:
allocator- The allocator to use, or NULL for the default allocator- Returns:
- A reference to a new DASession
-
DADiskCreateFromBSDName
public static MemorySegment DADiskCreateFromBSDName(MemorySegment allocator, MemorySegment session, MemorySegment bsdName) Creates a new disk object from a BSD device name.- Parameters:
allocator- The allocator to use, or NULL for the default allocatorsession- The DASession in which to contact Disk ArbitrationbsdName- The BSD device name- Returns:
- A reference to a new DADisk
-
DADiskCreateFromIOMedia
public static MemorySegment DADiskCreateFromIOMedia(MemorySegment allocator, MemorySegment session, MemorySegment media) Creates a new disk object from an IOMedia object.- Parameters:
allocator- The allocator to use, or NULL for the default allocatorsession- The DASession in which to contact Disk Arbitrationmedia- The IOMedia object- Returns:
- A reference to a new DADisk
-
DADiskCopyDescription
Obtains the Disk Arbitration description of the specified disk.- Parameters:
disk- The DADisk for which to obtain the description- Returns:
- The disk's Disk Arbitration description
-
DADiskGetBSDName
Obtains the BSD device name for the specified disk.- Parameters:
disk- The DADisk for which to obtain the BSD device name- Returns:
- The disk's BSD device name as a C string pointer
-