
net.codecrete.usb.macos.gen.iokit.IOUSBDeviceStruct187 Maven / Gradle / Ivy
// Generated by jextract
package net.codecrete.usb.macos.gen.iokit;
import java.lang.invoke.*;
import java.lang.foreign.*;
import java.nio.ByteOrder;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;
import static java.lang.foreign.ValueLayout.*;
import static java.lang.foreign.MemoryLayout.PathElement.*;
/**
* {@snippet lang=c :
* struct IOUSBDeviceStruct187 {
* void *_reserved;
* HRESULT (*QueryInterface)(void *, REFIID, LPVOID *);
* ULONG (*AddRef)(void *);
* ULONG (*Release)(void *);
* IOReturn (*CreateDeviceAsyncEventSource)(void *, CFRunLoopSourceRef *);
* CFRunLoopSourceRef (*GetDeviceAsyncEventSource)(void *);
* IOReturn (*CreateDeviceAsyncPort)(void *, mach_port_t *);
* mach_port_t (*GetDeviceAsyncPort)(void *);
* IOReturn (*USBDeviceOpen)(void *);
* IOReturn (*USBDeviceClose)(void *);
* IOReturn (*GetDeviceClass)(void *, UInt8 *);
* IOReturn (*GetDeviceSubClass)(void *, UInt8 *);
* IOReturn (*GetDeviceProtocol)(void *, UInt8 *);
* IOReturn (*GetDeviceVendor)(void *, UInt16 *);
* IOReturn (*GetDeviceProduct)(void *, UInt16 *);
* IOReturn (*GetDeviceReleaseNumber)(void *, UInt16 *);
* IOReturn (*GetDeviceAddress)(void *, USBDeviceAddress *);
* IOReturn (*GetDeviceBusPowerAvailable)(void *, UInt32 *);
* IOReturn (*GetDeviceSpeed)(void *, UInt8 *);
* IOReturn (*GetNumberOfConfigurations)(void *, UInt8 *);
* IOReturn (*GetLocationID)(void *, UInt32 *);
* IOReturn (*GetConfigurationDescriptorPtr)(void *, UInt8, IOUSBConfigurationDescriptorPtr *);
* IOReturn (*GetConfiguration)(void *, UInt8 *);
* IOReturn (*SetConfiguration)(void *, UInt8);
* IOReturn (*GetBusFrameNumber)(void *, UInt64 *, AbsoluteTime *);
* IOReturn (*ResetDevice)(void *);
* IOReturn (*DeviceRequest)(void *, IOUSBDevRequest *);
* IOReturn (*DeviceRequestAsync)(void *, IOUSBDevRequest *, IOAsyncCallback1, void *);
* IOReturn (*CreateInterfaceIterator)(void *, IOUSBFindInterfaceRequest *, io_iterator_t *);
* IOReturn (*USBDeviceOpenSeize)(void *);
* IOReturn (*DeviceRequestTO)(void *, IOUSBDevRequestTO *);
* IOReturn (*DeviceRequestAsyncTO)(void *, IOUSBDevRequestTO *, IOAsyncCallback1, void *);
* IOReturn (*USBDeviceSuspend)(void *, Boolean);
* IOReturn (*USBDeviceAbortPipeZero)(void *);
* IOReturn (*USBGetManufacturerStringIndex)(void *, UInt8 *);
* IOReturn (*USBGetProductStringIndex)(void *, UInt8 *);
* IOReturn (*USBGetSerialNumberStringIndex)(void *, UInt8 *);
* IOReturn (*USBDeviceReEnumerate)(void *, UInt32);
* }
* }
*/
public class IOUSBDeviceStruct187 {
IOUSBDeviceStruct187() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
IOKit.C_POINTER.withName("_reserved"),
IOKit.C_POINTER.withName("QueryInterface"),
IOKit.C_POINTER.withName("AddRef"),
IOKit.C_POINTER.withName("Release"),
IOKit.C_POINTER.withName("CreateDeviceAsyncEventSource"),
IOKit.C_POINTER.withName("GetDeviceAsyncEventSource"),
IOKit.C_POINTER.withName("CreateDeviceAsyncPort"),
IOKit.C_POINTER.withName("GetDeviceAsyncPort"),
IOKit.C_POINTER.withName("USBDeviceOpen"),
IOKit.C_POINTER.withName("USBDeviceClose"),
IOKit.C_POINTER.withName("GetDeviceClass"),
IOKit.C_POINTER.withName("GetDeviceSubClass"),
IOKit.C_POINTER.withName("GetDeviceProtocol"),
IOKit.C_POINTER.withName("GetDeviceVendor"),
IOKit.C_POINTER.withName("GetDeviceProduct"),
IOKit.C_POINTER.withName("GetDeviceReleaseNumber"),
IOKit.C_POINTER.withName("GetDeviceAddress"),
IOKit.C_POINTER.withName("GetDeviceBusPowerAvailable"),
IOKit.C_POINTER.withName("GetDeviceSpeed"),
IOKit.C_POINTER.withName("GetNumberOfConfigurations"),
IOKit.C_POINTER.withName("GetLocationID"),
IOKit.C_POINTER.withName("GetConfigurationDescriptorPtr"),
IOKit.C_POINTER.withName("GetConfiguration"),
IOKit.C_POINTER.withName("SetConfiguration"),
IOKit.C_POINTER.withName("GetBusFrameNumber"),
IOKit.C_POINTER.withName("ResetDevice"),
IOKit.C_POINTER.withName("DeviceRequest"),
IOKit.C_POINTER.withName("DeviceRequestAsync"),
IOKit.C_POINTER.withName("CreateInterfaceIterator"),
IOKit.C_POINTER.withName("USBDeviceOpenSeize"),
IOKit.C_POINTER.withName("DeviceRequestTO"),
IOKit.C_POINTER.withName("DeviceRequestAsyncTO"),
IOKit.C_POINTER.withName("USBDeviceSuspend"),
IOKit.C_POINTER.withName("USBDeviceAbortPipeZero"),
IOKit.C_POINTER.withName("USBGetManufacturerStringIndex"),
IOKit.C_POINTER.withName("USBGetProductStringIndex"),
IOKit.C_POINTER.withName("USBGetSerialNumberStringIndex"),
IOKit.C_POINTER.withName("USBDeviceReEnumerate")
).withName("IOUSBDeviceStruct187");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final AddressLayout _reserved$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("_reserved"));
/**
* Layout for field:
* {@snippet lang=c :
* void *_reserved
* }
*/
public static final AddressLayout _reserved$layout() {
return _reserved$LAYOUT;
}
private static final long _reserved$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* void *_reserved
* }
*/
public static final long _reserved$offset() {
return _reserved$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void *_reserved
* }
*/
public static MemorySegment _reserved(MemorySegment struct) {
return struct.get(_reserved$LAYOUT, _reserved$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void *_reserved
* }
*/
public static void _reserved(MemorySegment struct, MemorySegment fieldValue) {
struct.set(_reserved$LAYOUT, _reserved$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* HRESULT (*QueryInterface)(void *, REFIID, LPVOID *)
* }
*/
public static class QueryInterface {
QueryInterface() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
CFUUIDBytes.layout(),
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(QueryInterface.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(QueryInterface.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout QueryInterface$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("QueryInterface"));
/**
* Layout for field:
* {@snippet lang=c :
* HRESULT (*QueryInterface)(void *, REFIID, LPVOID *)
* }
*/
public static final AddressLayout QueryInterface$layout() {
return QueryInterface$LAYOUT;
}
private static final long QueryInterface$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* HRESULT (*QueryInterface)(void *, REFIID, LPVOID *)
* }
*/
public static final long QueryInterface$offset() {
return QueryInterface$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* HRESULT (*QueryInterface)(void *, REFIID, LPVOID *)
* }
*/
public static MemorySegment QueryInterface(MemorySegment struct) {
return struct.get(QueryInterface$LAYOUT, QueryInterface$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* HRESULT (*QueryInterface)(void *, REFIID, LPVOID *)
* }
*/
public static void QueryInterface(MemorySegment struct, MemorySegment fieldValue) {
struct.set(QueryInterface$LAYOUT, QueryInterface$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* ULONG (*AddRef)(void *)
* }
*/
public static class AddRef {
AddRef() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(AddRef.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(AddRef.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout AddRef$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("AddRef"));
/**
* Layout for field:
* {@snippet lang=c :
* ULONG (*AddRef)(void *)
* }
*/
public static final AddressLayout AddRef$layout() {
return AddRef$LAYOUT;
}
private static final long AddRef$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* ULONG (*AddRef)(void *)
* }
*/
public static final long AddRef$offset() {
return AddRef$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* ULONG (*AddRef)(void *)
* }
*/
public static MemorySegment AddRef(MemorySegment struct) {
return struct.get(AddRef$LAYOUT, AddRef$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* ULONG (*AddRef)(void *)
* }
*/
public static void AddRef(MemorySegment struct, MemorySegment fieldValue) {
struct.set(AddRef$LAYOUT, AddRef$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* ULONG (*Release)(void *)
* }
*/
public static class Release {
Release() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(Release.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(Release.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout Release$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("Release"));
/**
* Layout for field:
* {@snippet lang=c :
* ULONG (*Release)(void *)
* }
*/
public static final AddressLayout Release$layout() {
return Release$LAYOUT;
}
private static final long Release$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* ULONG (*Release)(void *)
* }
*/
public static final long Release$offset() {
return Release$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* ULONG (*Release)(void *)
* }
*/
public static MemorySegment Release(MemorySegment struct) {
return struct.get(Release$LAYOUT, Release$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* ULONG (*Release)(void *)
* }
*/
public static void Release(MemorySegment struct, MemorySegment fieldValue) {
struct.set(Release$LAYOUT, Release$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*CreateDeviceAsyncEventSource)(void *, CFRunLoopSourceRef *)
* }
*/
public static class CreateDeviceAsyncEventSource {
CreateDeviceAsyncEventSource() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(CreateDeviceAsyncEventSource.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(CreateDeviceAsyncEventSource.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout CreateDeviceAsyncEventSource$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("CreateDeviceAsyncEventSource"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*CreateDeviceAsyncEventSource)(void *, CFRunLoopSourceRef *)
* }
*/
public static final AddressLayout CreateDeviceAsyncEventSource$layout() {
return CreateDeviceAsyncEventSource$LAYOUT;
}
private static final long CreateDeviceAsyncEventSource$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*CreateDeviceAsyncEventSource)(void *, CFRunLoopSourceRef *)
* }
*/
public static final long CreateDeviceAsyncEventSource$offset() {
return CreateDeviceAsyncEventSource$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*CreateDeviceAsyncEventSource)(void *, CFRunLoopSourceRef *)
* }
*/
public static MemorySegment CreateDeviceAsyncEventSource(MemorySegment struct) {
return struct.get(CreateDeviceAsyncEventSource$LAYOUT, CreateDeviceAsyncEventSource$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*CreateDeviceAsyncEventSource)(void *, CFRunLoopSourceRef *)
* }
*/
public static void CreateDeviceAsyncEventSource(MemorySegment struct, MemorySegment fieldValue) {
struct.set(CreateDeviceAsyncEventSource$LAYOUT, CreateDeviceAsyncEventSource$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* CFRunLoopSourceRef (*GetDeviceAsyncEventSource)(void *)
* }
*/
public static class GetDeviceAsyncEventSource {
GetDeviceAsyncEventSource() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
MemorySegment apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetDeviceAsyncEventSource.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetDeviceAsyncEventSource.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static MemorySegment invoke(MemorySegment funcPtr,MemorySegment _x0) {
try {
return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetDeviceAsyncEventSource$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetDeviceAsyncEventSource"));
/**
* Layout for field:
* {@snippet lang=c :
* CFRunLoopSourceRef (*GetDeviceAsyncEventSource)(void *)
* }
*/
public static final AddressLayout GetDeviceAsyncEventSource$layout() {
return GetDeviceAsyncEventSource$LAYOUT;
}
private static final long GetDeviceAsyncEventSource$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* CFRunLoopSourceRef (*GetDeviceAsyncEventSource)(void *)
* }
*/
public static final long GetDeviceAsyncEventSource$offset() {
return GetDeviceAsyncEventSource$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* CFRunLoopSourceRef (*GetDeviceAsyncEventSource)(void *)
* }
*/
public static MemorySegment GetDeviceAsyncEventSource(MemorySegment struct) {
return struct.get(GetDeviceAsyncEventSource$LAYOUT, GetDeviceAsyncEventSource$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* CFRunLoopSourceRef (*GetDeviceAsyncEventSource)(void *)
* }
*/
public static void GetDeviceAsyncEventSource(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetDeviceAsyncEventSource$LAYOUT, GetDeviceAsyncEventSource$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*CreateDeviceAsyncPort)(void *, mach_port_t *)
* }
*/
public static class CreateDeviceAsyncPort {
CreateDeviceAsyncPort() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(CreateDeviceAsyncPort.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(CreateDeviceAsyncPort.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout CreateDeviceAsyncPort$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("CreateDeviceAsyncPort"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*CreateDeviceAsyncPort)(void *, mach_port_t *)
* }
*/
public static final AddressLayout CreateDeviceAsyncPort$layout() {
return CreateDeviceAsyncPort$LAYOUT;
}
private static final long CreateDeviceAsyncPort$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*CreateDeviceAsyncPort)(void *, mach_port_t *)
* }
*/
public static final long CreateDeviceAsyncPort$offset() {
return CreateDeviceAsyncPort$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*CreateDeviceAsyncPort)(void *, mach_port_t *)
* }
*/
public static MemorySegment CreateDeviceAsyncPort(MemorySegment struct) {
return struct.get(CreateDeviceAsyncPort$LAYOUT, CreateDeviceAsyncPort$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*CreateDeviceAsyncPort)(void *, mach_port_t *)
* }
*/
public static void CreateDeviceAsyncPort(MemorySegment struct, MemorySegment fieldValue) {
struct.set(CreateDeviceAsyncPort$LAYOUT, CreateDeviceAsyncPort$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* mach_port_t (*GetDeviceAsyncPort)(void *)
* }
*/
public static class GetDeviceAsyncPort {
GetDeviceAsyncPort() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetDeviceAsyncPort.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetDeviceAsyncPort.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetDeviceAsyncPort$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetDeviceAsyncPort"));
/**
* Layout for field:
* {@snippet lang=c :
* mach_port_t (*GetDeviceAsyncPort)(void *)
* }
*/
public static final AddressLayout GetDeviceAsyncPort$layout() {
return GetDeviceAsyncPort$LAYOUT;
}
private static final long GetDeviceAsyncPort$OFFSET = 56;
/**
* Offset for field:
* {@snippet lang=c :
* mach_port_t (*GetDeviceAsyncPort)(void *)
* }
*/
public static final long GetDeviceAsyncPort$offset() {
return GetDeviceAsyncPort$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* mach_port_t (*GetDeviceAsyncPort)(void *)
* }
*/
public static MemorySegment GetDeviceAsyncPort(MemorySegment struct) {
return struct.get(GetDeviceAsyncPort$LAYOUT, GetDeviceAsyncPort$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* mach_port_t (*GetDeviceAsyncPort)(void *)
* }
*/
public static void GetDeviceAsyncPort(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetDeviceAsyncPort$LAYOUT, GetDeviceAsyncPort$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*USBDeviceOpen)(void *)
* }
*/
public static class USBDeviceOpen {
USBDeviceOpen() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(USBDeviceOpen.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(USBDeviceOpen.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout USBDeviceOpen$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("USBDeviceOpen"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceOpen)(void *)
* }
*/
public static final AddressLayout USBDeviceOpen$layout() {
return USBDeviceOpen$LAYOUT;
}
private static final long USBDeviceOpen$OFFSET = 64;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceOpen)(void *)
* }
*/
public static final long USBDeviceOpen$offset() {
return USBDeviceOpen$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceOpen)(void *)
* }
*/
public static MemorySegment USBDeviceOpen(MemorySegment struct) {
return struct.get(USBDeviceOpen$LAYOUT, USBDeviceOpen$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceOpen)(void *)
* }
*/
public static void USBDeviceOpen(MemorySegment struct, MemorySegment fieldValue) {
struct.set(USBDeviceOpen$LAYOUT, USBDeviceOpen$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*USBDeviceClose)(void *)
* }
*/
public static class USBDeviceClose {
USBDeviceClose() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(USBDeviceClose.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(USBDeviceClose.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout USBDeviceClose$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("USBDeviceClose"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceClose)(void *)
* }
*/
public static final AddressLayout USBDeviceClose$layout() {
return USBDeviceClose$LAYOUT;
}
private static final long USBDeviceClose$OFFSET = 72;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceClose)(void *)
* }
*/
public static final long USBDeviceClose$offset() {
return USBDeviceClose$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceClose)(void *)
* }
*/
public static MemorySegment USBDeviceClose(MemorySegment struct) {
return struct.get(USBDeviceClose$LAYOUT, USBDeviceClose$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceClose)(void *)
* }
*/
public static void USBDeviceClose(MemorySegment struct, MemorySegment fieldValue) {
struct.set(USBDeviceClose$LAYOUT, USBDeviceClose$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetDeviceClass)(void *, UInt8 *)
* }
*/
public static class GetDeviceClass {
GetDeviceClass() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetDeviceClass.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetDeviceClass.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetDeviceClass$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetDeviceClass"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceClass)(void *, UInt8 *)
* }
*/
public static final AddressLayout GetDeviceClass$layout() {
return GetDeviceClass$LAYOUT;
}
private static final long GetDeviceClass$OFFSET = 80;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceClass)(void *, UInt8 *)
* }
*/
public static final long GetDeviceClass$offset() {
return GetDeviceClass$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceClass)(void *, UInt8 *)
* }
*/
public static MemorySegment GetDeviceClass(MemorySegment struct) {
return struct.get(GetDeviceClass$LAYOUT, GetDeviceClass$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceClass)(void *, UInt8 *)
* }
*/
public static void GetDeviceClass(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetDeviceClass$LAYOUT, GetDeviceClass$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetDeviceSubClass)(void *, UInt8 *)
* }
*/
public static class GetDeviceSubClass {
GetDeviceSubClass() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetDeviceSubClass.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetDeviceSubClass.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetDeviceSubClass$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetDeviceSubClass"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceSubClass)(void *, UInt8 *)
* }
*/
public static final AddressLayout GetDeviceSubClass$layout() {
return GetDeviceSubClass$LAYOUT;
}
private static final long GetDeviceSubClass$OFFSET = 88;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceSubClass)(void *, UInt8 *)
* }
*/
public static final long GetDeviceSubClass$offset() {
return GetDeviceSubClass$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceSubClass)(void *, UInt8 *)
* }
*/
public static MemorySegment GetDeviceSubClass(MemorySegment struct) {
return struct.get(GetDeviceSubClass$LAYOUT, GetDeviceSubClass$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceSubClass)(void *, UInt8 *)
* }
*/
public static void GetDeviceSubClass(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetDeviceSubClass$LAYOUT, GetDeviceSubClass$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetDeviceProtocol)(void *, UInt8 *)
* }
*/
public static class GetDeviceProtocol {
GetDeviceProtocol() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetDeviceProtocol.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetDeviceProtocol.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetDeviceProtocol$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetDeviceProtocol"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceProtocol)(void *, UInt8 *)
* }
*/
public static final AddressLayout GetDeviceProtocol$layout() {
return GetDeviceProtocol$LAYOUT;
}
private static final long GetDeviceProtocol$OFFSET = 96;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceProtocol)(void *, UInt8 *)
* }
*/
public static final long GetDeviceProtocol$offset() {
return GetDeviceProtocol$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceProtocol)(void *, UInt8 *)
* }
*/
public static MemorySegment GetDeviceProtocol(MemorySegment struct) {
return struct.get(GetDeviceProtocol$LAYOUT, GetDeviceProtocol$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceProtocol)(void *, UInt8 *)
* }
*/
public static void GetDeviceProtocol(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetDeviceProtocol$LAYOUT, GetDeviceProtocol$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetDeviceVendor)(void *, UInt16 *)
* }
*/
public static class GetDeviceVendor {
GetDeviceVendor() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetDeviceVendor.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetDeviceVendor.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetDeviceVendor$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetDeviceVendor"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceVendor)(void *, UInt16 *)
* }
*/
public static final AddressLayout GetDeviceVendor$layout() {
return GetDeviceVendor$LAYOUT;
}
private static final long GetDeviceVendor$OFFSET = 104;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceVendor)(void *, UInt16 *)
* }
*/
public static final long GetDeviceVendor$offset() {
return GetDeviceVendor$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceVendor)(void *, UInt16 *)
* }
*/
public static MemorySegment GetDeviceVendor(MemorySegment struct) {
return struct.get(GetDeviceVendor$LAYOUT, GetDeviceVendor$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceVendor)(void *, UInt16 *)
* }
*/
public static void GetDeviceVendor(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetDeviceVendor$LAYOUT, GetDeviceVendor$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetDeviceProduct)(void *, UInt16 *)
* }
*/
public static class GetDeviceProduct {
GetDeviceProduct() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetDeviceProduct.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetDeviceProduct.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetDeviceProduct$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetDeviceProduct"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceProduct)(void *, UInt16 *)
* }
*/
public static final AddressLayout GetDeviceProduct$layout() {
return GetDeviceProduct$LAYOUT;
}
private static final long GetDeviceProduct$OFFSET = 112;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceProduct)(void *, UInt16 *)
* }
*/
public static final long GetDeviceProduct$offset() {
return GetDeviceProduct$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceProduct)(void *, UInt16 *)
* }
*/
public static MemorySegment GetDeviceProduct(MemorySegment struct) {
return struct.get(GetDeviceProduct$LAYOUT, GetDeviceProduct$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceProduct)(void *, UInt16 *)
* }
*/
public static void GetDeviceProduct(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetDeviceProduct$LAYOUT, GetDeviceProduct$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetDeviceReleaseNumber)(void *, UInt16 *)
* }
*/
public static class GetDeviceReleaseNumber {
GetDeviceReleaseNumber() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetDeviceReleaseNumber.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetDeviceReleaseNumber.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetDeviceReleaseNumber$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetDeviceReleaseNumber"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceReleaseNumber)(void *, UInt16 *)
* }
*/
public static final AddressLayout GetDeviceReleaseNumber$layout() {
return GetDeviceReleaseNumber$LAYOUT;
}
private static final long GetDeviceReleaseNumber$OFFSET = 120;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceReleaseNumber)(void *, UInt16 *)
* }
*/
public static final long GetDeviceReleaseNumber$offset() {
return GetDeviceReleaseNumber$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceReleaseNumber)(void *, UInt16 *)
* }
*/
public static MemorySegment GetDeviceReleaseNumber(MemorySegment struct) {
return struct.get(GetDeviceReleaseNumber$LAYOUT, GetDeviceReleaseNumber$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceReleaseNumber)(void *, UInt16 *)
* }
*/
public static void GetDeviceReleaseNumber(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetDeviceReleaseNumber$LAYOUT, GetDeviceReleaseNumber$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetDeviceAddress)(void *, USBDeviceAddress *)
* }
*/
public static class GetDeviceAddress {
GetDeviceAddress() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetDeviceAddress.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetDeviceAddress.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetDeviceAddress$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetDeviceAddress"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceAddress)(void *, USBDeviceAddress *)
* }
*/
public static final AddressLayout GetDeviceAddress$layout() {
return GetDeviceAddress$LAYOUT;
}
private static final long GetDeviceAddress$OFFSET = 128;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceAddress)(void *, USBDeviceAddress *)
* }
*/
public static final long GetDeviceAddress$offset() {
return GetDeviceAddress$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceAddress)(void *, USBDeviceAddress *)
* }
*/
public static MemorySegment GetDeviceAddress(MemorySegment struct) {
return struct.get(GetDeviceAddress$LAYOUT, GetDeviceAddress$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceAddress)(void *, USBDeviceAddress *)
* }
*/
public static void GetDeviceAddress(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetDeviceAddress$LAYOUT, GetDeviceAddress$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetDeviceBusPowerAvailable)(void *, UInt32 *)
* }
*/
public static class GetDeviceBusPowerAvailable {
GetDeviceBusPowerAvailable() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetDeviceBusPowerAvailable.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetDeviceBusPowerAvailable.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetDeviceBusPowerAvailable$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetDeviceBusPowerAvailable"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceBusPowerAvailable)(void *, UInt32 *)
* }
*/
public static final AddressLayout GetDeviceBusPowerAvailable$layout() {
return GetDeviceBusPowerAvailable$LAYOUT;
}
private static final long GetDeviceBusPowerAvailable$OFFSET = 136;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceBusPowerAvailable)(void *, UInt32 *)
* }
*/
public static final long GetDeviceBusPowerAvailable$offset() {
return GetDeviceBusPowerAvailable$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceBusPowerAvailable)(void *, UInt32 *)
* }
*/
public static MemorySegment GetDeviceBusPowerAvailable(MemorySegment struct) {
return struct.get(GetDeviceBusPowerAvailable$LAYOUT, GetDeviceBusPowerAvailable$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceBusPowerAvailable)(void *, UInt32 *)
* }
*/
public static void GetDeviceBusPowerAvailable(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetDeviceBusPowerAvailable$LAYOUT, GetDeviceBusPowerAvailable$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetDeviceSpeed)(void *, UInt8 *)
* }
*/
public static class GetDeviceSpeed {
GetDeviceSpeed() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetDeviceSpeed.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetDeviceSpeed.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetDeviceSpeed$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetDeviceSpeed"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceSpeed)(void *, UInt8 *)
* }
*/
public static final AddressLayout GetDeviceSpeed$layout() {
return GetDeviceSpeed$LAYOUT;
}
private static final long GetDeviceSpeed$OFFSET = 144;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceSpeed)(void *, UInt8 *)
* }
*/
public static final long GetDeviceSpeed$offset() {
return GetDeviceSpeed$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceSpeed)(void *, UInt8 *)
* }
*/
public static MemorySegment GetDeviceSpeed(MemorySegment struct) {
return struct.get(GetDeviceSpeed$LAYOUT, GetDeviceSpeed$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetDeviceSpeed)(void *, UInt8 *)
* }
*/
public static void GetDeviceSpeed(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetDeviceSpeed$LAYOUT, GetDeviceSpeed$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetNumberOfConfigurations)(void *, UInt8 *)
* }
*/
public static class GetNumberOfConfigurations {
GetNumberOfConfigurations() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetNumberOfConfigurations.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetNumberOfConfigurations.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetNumberOfConfigurations$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetNumberOfConfigurations"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetNumberOfConfigurations)(void *, UInt8 *)
* }
*/
public static final AddressLayout GetNumberOfConfigurations$layout() {
return GetNumberOfConfigurations$LAYOUT;
}
private static final long GetNumberOfConfigurations$OFFSET = 152;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetNumberOfConfigurations)(void *, UInt8 *)
* }
*/
public static final long GetNumberOfConfigurations$offset() {
return GetNumberOfConfigurations$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetNumberOfConfigurations)(void *, UInt8 *)
* }
*/
public static MemorySegment GetNumberOfConfigurations(MemorySegment struct) {
return struct.get(GetNumberOfConfigurations$LAYOUT, GetNumberOfConfigurations$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetNumberOfConfigurations)(void *, UInt8 *)
* }
*/
public static void GetNumberOfConfigurations(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetNumberOfConfigurations$LAYOUT, GetNumberOfConfigurations$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetLocationID)(void *, UInt32 *)
* }
*/
public static class GetLocationID {
GetLocationID() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetLocationID.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetLocationID.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetLocationID$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetLocationID"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetLocationID)(void *, UInt32 *)
* }
*/
public static final AddressLayout GetLocationID$layout() {
return GetLocationID$LAYOUT;
}
private static final long GetLocationID$OFFSET = 160;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetLocationID)(void *, UInt32 *)
* }
*/
public static final long GetLocationID$offset() {
return GetLocationID$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetLocationID)(void *, UInt32 *)
* }
*/
public static MemorySegment GetLocationID(MemorySegment struct) {
return struct.get(GetLocationID$LAYOUT, GetLocationID$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetLocationID)(void *, UInt32 *)
* }
*/
public static void GetLocationID(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetLocationID$LAYOUT, GetLocationID$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetConfigurationDescriptorPtr)(void *, UInt8, IOUSBConfigurationDescriptorPtr *)
* }
*/
public static class GetConfigurationDescriptorPtr {
GetConfigurationDescriptorPtr() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, byte _x1, MemorySegment _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_CHAR,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetConfigurationDescriptorPtr.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetConfigurationDescriptorPtr.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, byte _x1, MemorySegment _x2) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetConfigurationDescriptorPtr$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetConfigurationDescriptorPtr"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetConfigurationDescriptorPtr)(void *, UInt8, IOUSBConfigurationDescriptorPtr *)
* }
*/
public static final AddressLayout GetConfigurationDescriptorPtr$layout() {
return GetConfigurationDescriptorPtr$LAYOUT;
}
private static final long GetConfigurationDescriptorPtr$OFFSET = 168;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetConfigurationDescriptorPtr)(void *, UInt8, IOUSBConfigurationDescriptorPtr *)
* }
*/
public static final long GetConfigurationDescriptorPtr$offset() {
return GetConfigurationDescriptorPtr$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetConfigurationDescriptorPtr)(void *, UInt8, IOUSBConfigurationDescriptorPtr *)
* }
*/
public static MemorySegment GetConfigurationDescriptorPtr(MemorySegment struct) {
return struct.get(GetConfigurationDescriptorPtr$LAYOUT, GetConfigurationDescriptorPtr$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetConfigurationDescriptorPtr)(void *, UInt8, IOUSBConfigurationDescriptorPtr *)
* }
*/
public static void GetConfigurationDescriptorPtr(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetConfigurationDescriptorPtr$LAYOUT, GetConfigurationDescriptorPtr$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetConfiguration)(void *, UInt8 *)
* }
*/
public static class GetConfiguration {
GetConfiguration() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetConfiguration.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetConfiguration.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetConfiguration$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetConfiguration"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetConfiguration)(void *, UInt8 *)
* }
*/
public static final AddressLayout GetConfiguration$layout() {
return GetConfiguration$LAYOUT;
}
private static final long GetConfiguration$OFFSET = 176;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetConfiguration)(void *, UInt8 *)
* }
*/
public static final long GetConfiguration$offset() {
return GetConfiguration$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetConfiguration)(void *, UInt8 *)
* }
*/
public static MemorySegment GetConfiguration(MemorySegment struct) {
return struct.get(GetConfiguration$LAYOUT, GetConfiguration$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetConfiguration)(void *, UInt8 *)
* }
*/
public static void GetConfiguration(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetConfiguration$LAYOUT, GetConfiguration$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*SetConfiguration)(void *, UInt8)
* }
*/
public static class SetConfiguration {
SetConfiguration() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, byte _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_CHAR
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(SetConfiguration.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(SetConfiguration.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, byte _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout SetConfiguration$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("SetConfiguration"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*SetConfiguration)(void *, UInt8)
* }
*/
public static final AddressLayout SetConfiguration$layout() {
return SetConfiguration$LAYOUT;
}
private static final long SetConfiguration$OFFSET = 184;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*SetConfiguration)(void *, UInt8)
* }
*/
public static final long SetConfiguration$offset() {
return SetConfiguration$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*SetConfiguration)(void *, UInt8)
* }
*/
public static MemorySegment SetConfiguration(MemorySegment struct) {
return struct.get(SetConfiguration$LAYOUT, SetConfiguration$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*SetConfiguration)(void *, UInt8)
* }
*/
public static void SetConfiguration(MemorySegment struct, MemorySegment fieldValue) {
struct.set(SetConfiguration$LAYOUT, SetConfiguration$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*GetBusFrameNumber)(void *, UInt64 *, AbsoluteTime *)
* }
*/
public static class GetBusFrameNumber {
GetBusFrameNumber() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(GetBusFrameNumber.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(GetBusFrameNumber.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout GetBusFrameNumber$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("GetBusFrameNumber"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*GetBusFrameNumber)(void *, UInt64 *, AbsoluteTime *)
* }
*/
public static final AddressLayout GetBusFrameNumber$layout() {
return GetBusFrameNumber$LAYOUT;
}
private static final long GetBusFrameNumber$OFFSET = 192;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*GetBusFrameNumber)(void *, UInt64 *, AbsoluteTime *)
* }
*/
public static final long GetBusFrameNumber$offset() {
return GetBusFrameNumber$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*GetBusFrameNumber)(void *, UInt64 *, AbsoluteTime *)
* }
*/
public static MemorySegment GetBusFrameNumber(MemorySegment struct) {
return struct.get(GetBusFrameNumber$LAYOUT, GetBusFrameNumber$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*GetBusFrameNumber)(void *, UInt64 *, AbsoluteTime *)
* }
*/
public static void GetBusFrameNumber(MemorySegment struct, MemorySegment fieldValue) {
struct.set(GetBusFrameNumber$LAYOUT, GetBusFrameNumber$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*ResetDevice)(void *)
* }
*/
public static class ResetDevice {
ResetDevice() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(ResetDevice.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(ResetDevice.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout ResetDevice$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("ResetDevice"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*ResetDevice)(void *)
* }
*/
public static final AddressLayout ResetDevice$layout() {
return ResetDevice$LAYOUT;
}
private static final long ResetDevice$OFFSET = 200;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*ResetDevice)(void *)
* }
*/
public static final long ResetDevice$offset() {
return ResetDevice$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*ResetDevice)(void *)
* }
*/
public static MemorySegment ResetDevice(MemorySegment struct) {
return struct.get(ResetDevice$LAYOUT, ResetDevice$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*ResetDevice)(void *)
* }
*/
public static void ResetDevice(MemorySegment struct, MemorySegment fieldValue) {
struct.set(ResetDevice$LAYOUT, ResetDevice$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*DeviceRequest)(void *, IOUSBDevRequest *)
* }
*/
public static class DeviceRequest {
DeviceRequest() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(DeviceRequest.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(DeviceRequest.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout DeviceRequest$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("DeviceRequest"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequest)(void *, IOUSBDevRequest *)
* }
*/
public static final AddressLayout DeviceRequest$layout() {
return DeviceRequest$LAYOUT;
}
private static final long DeviceRequest$OFFSET = 208;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequest)(void *, IOUSBDevRequest *)
* }
*/
public static final long DeviceRequest$offset() {
return DeviceRequest$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequest)(void *, IOUSBDevRequest *)
* }
*/
public static MemorySegment DeviceRequest(MemorySegment struct) {
return struct.get(DeviceRequest$LAYOUT, DeviceRequest$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequest)(void *, IOUSBDevRequest *)
* }
*/
public static void DeviceRequest(MemorySegment struct, MemorySegment fieldValue) {
struct.set(DeviceRequest$LAYOUT, DeviceRequest$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*DeviceRequestAsync)(void *, IOUSBDevRequest *, IOAsyncCallback1, void *)
* }
*/
public static class DeviceRequestAsync {
DeviceRequestAsync() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _x3);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(DeviceRequestAsync.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(DeviceRequestAsync.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _x3) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout DeviceRequestAsync$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("DeviceRequestAsync"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequestAsync)(void *, IOUSBDevRequest *, IOAsyncCallback1, void *)
* }
*/
public static final AddressLayout DeviceRequestAsync$layout() {
return DeviceRequestAsync$LAYOUT;
}
private static final long DeviceRequestAsync$OFFSET = 216;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequestAsync)(void *, IOUSBDevRequest *, IOAsyncCallback1, void *)
* }
*/
public static final long DeviceRequestAsync$offset() {
return DeviceRequestAsync$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequestAsync)(void *, IOUSBDevRequest *, IOAsyncCallback1, void *)
* }
*/
public static MemorySegment DeviceRequestAsync(MemorySegment struct) {
return struct.get(DeviceRequestAsync$LAYOUT, DeviceRequestAsync$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequestAsync)(void *, IOUSBDevRequest *, IOAsyncCallback1, void *)
* }
*/
public static void DeviceRequestAsync(MemorySegment struct, MemorySegment fieldValue) {
struct.set(DeviceRequestAsync$LAYOUT, DeviceRequestAsync$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*CreateInterfaceIterator)(void *, IOUSBFindInterfaceRequest *, io_iterator_t *)
* }
*/
public static class CreateInterfaceIterator {
CreateInterfaceIterator() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(CreateInterfaceIterator.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(CreateInterfaceIterator.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout CreateInterfaceIterator$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("CreateInterfaceIterator"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*CreateInterfaceIterator)(void *, IOUSBFindInterfaceRequest *, io_iterator_t *)
* }
*/
public static final AddressLayout CreateInterfaceIterator$layout() {
return CreateInterfaceIterator$LAYOUT;
}
private static final long CreateInterfaceIterator$OFFSET = 224;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*CreateInterfaceIterator)(void *, IOUSBFindInterfaceRequest *, io_iterator_t *)
* }
*/
public static final long CreateInterfaceIterator$offset() {
return CreateInterfaceIterator$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*CreateInterfaceIterator)(void *, IOUSBFindInterfaceRequest *, io_iterator_t *)
* }
*/
public static MemorySegment CreateInterfaceIterator(MemorySegment struct) {
return struct.get(CreateInterfaceIterator$LAYOUT, CreateInterfaceIterator$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*CreateInterfaceIterator)(void *, IOUSBFindInterfaceRequest *, io_iterator_t *)
* }
*/
public static void CreateInterfaceIterator(MemorySegment struct, MemorySegment fieldValue) {
struct.set(CreateInterfaceIterator$LAYOUT, CreateInterfaceIterator$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*USBDeviceOpenSeize)(void *)
* }
*/
public static class USBDeviceOpenSeize {
USBDeviceOpenSeize() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(USBDeviceOpenSeize.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(USBDeviceOpenSeize.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout USBDeviceOpenSeize$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("USBDeviceOpenSeize"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceOpenSeize)(void *)
* }
*/
public static final AddressLayout USBDeviceOpenSeize$layout() {
return USBDeviceOpenSeize$LAYOUT;
}
private static final long USBDeviceOpenSeize$OFFSET = 232;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceOpenSeize)(void *)
* }
*/
public static final long USBDeviceOpenSeize$offset() {
return USBDeviceOpenSeize$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceOpenSeize)(void *)
* }
*/
public static MemorySegment USBDeviceOpenSeize(MemorySegment struct) {
return struct.get(USBDeviceOpenSeize$LAYOUT, USBDeviceOpenSeize$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceOpenSeize)(void *)
* }
*/
public static void USBDeviceOpenSeize(MemorySegment struct, MemorySegment fieldValue) {
struct.set(USBDeviceOpenSeize$LAYOUT, USBDeviceOpenSeize$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*DeviceRequestTO)(void *, IOUSBDevRequestTO *)
* }
*/
public static class DeviceRequestTO {
DeviceRequestTO() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(DeviceRequestTO.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(DeviceRequestTO.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout DeviceRequestTO$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("DeviceRequestTO"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequestTO)(void *, IOUSBDevRequestTO *)
* }
*/
public static final AddressLayout DeviceRequestTO$layout() {
return DeviceRequestTO$LAYOUT;
}
private static final long DeviceRequestTO$OFFSET = 240;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequestTO)(void *, IOUSBDevRequestTO *)
* }
*/
public static final long DeviceRequestTO$offset() {
return DeviceRequestTO$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequestTO)(void *, IOUSBDevRequestTO *)
* }
*/
public static MemorySegment DeviceRequestTO(MemorySegment struct) {
return struct.get(DeviceRequestTO$LAYOUT, DeviceRequestTO$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequestTO)(void *, IOUSBDevRequestTO *)
* }
*/
public static void DeviceRequestTO(MemorySegment struct, MemorySegment fieldValue) {
struct.set(DeviceRequestTO$LAYOUT, DeviceRequestTO$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*DeviceRequestAsyncTO)(void *, IOUSBDevRequestTO *, IOAsyncCallback1, void *)
* }
*/
public static class DeviceRequestAsyncTO {
DeviceRequestAsyncTO() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _x3);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(DeviceRequestAsyncTO.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(DeviceRequestAsyncTO.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _x3) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout DeviceRequestAsyncTO$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("DeviceRequestAsyncTO"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequestAsyncTO)(void *, IOUSBDevRequestTO *, IOAsyncCallback1, void *)
* }
*/
public static final AddressLayout DeviceRequestAsyncTO$layout() {
return DeviceRequestAsyncTO$LAYOUT;
}
private static final long DeviceRequestAsyncTO$OFFSET = 248;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequestAsyncTO)(void *, IOUSBDevRequestTO *, IOAsyncCallback1, void *)
* }
*/
public static final long DeviceRequestAsyncTO$offset() {
return DeviceRequestAsyncTO$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequestAsyncTO)(void *, IOUSBDevRequestTO *, IOAsyncCallback1, void *)
* }
*/
public static MemorySegment DeviceRequestAsyncTO(MemorySegment struct) {
return struct.get(DeviceRequestAsyncTO$LAYOUT, DeviceRequestAsyncTO$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*DeviceRequestAsyncTO)(void *, IOUSBDevRequestTO *, IOAsyncCallback1, void *)
* }
*/
public static void DeviceRequestAsyncTO(MemorySegment struct, MemorySegment fieldValue) {
struct.set(DeviceRequestAsyncTO$LAYOUT, DeviceRequestAsyncTO$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*USBDeviceSuspend)(void *, Boolean)
* }
*/
public static class USBDeviceSuspend {
USBDeviceSuspend() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, byte _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_CHAR
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(USBDeviceSuspend.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(USBDeviceSuspend.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, byte _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout USBDeviceSuspend$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("USBDeviceSuspend"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceSuspend)(void *, Boolean)
* }
*/
public static final AddressLayout USBDeviceSuspend$layout() {
return USBDeviceSuspend$LAYOUT;
}
private static final long USBDeviceSuspend$OFFSET = 256;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceSuspend)(void *, Boolean)
* }
*/
public static final long USBDeviceSuspend$offset() {
return USBDeviceSuspend$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceSuspend)(void *, Boolean)
* }
*/
public static MemorySegment USBDeviceSuspend(MemorySegment struct) {
return struct.get(USBDeviceSuspend$LAYOUT, USBDeviceSuspend$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceSuspend)(void *, Boolean)
* }
*/
public static void USBDeviceSuspend(MemorySegment struct, MemorySegment fieldValue) {
struct.set(USBDeviceSuspend$LAYOUT, USBDeviceSuspend$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*USBDeviceAbortPipeZero)(void *)
* }
*/
public static class USBDeviceAbortPipeZero {
USBDeviceAbortPipeZero() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(USBDeviceAbortPipeZero.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(USBDeviceAbortPipeZero.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout USBDeviceAbortPipeZero$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("USBDeviceAbortPipeZero"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceAbortPipeZero)(void *)
* }
*/
public static final AddressLayout USBDeviceAbortPipeZero$layout() {
return USBDeviceAbortPipeZero$LAYOUT;
}
private static final long USBDeviceAbortPipeZero$OFFSET = 264;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceAbortPipeZero)(void *)
* }
*/
public static final long USBDeviceAbortPipeZero$offset() {
return USBDeviceAbortPipeZero$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceAbortPipeZero)(void *)
* }
*/
public static MemorySegment USBDeviceAbortPipeZero(MemorySegment struct) {
return struct.get(USBDeviceAbortPipeZero$LAYOUT, USBDeviceAbortPipeZero$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceAbortPipeZero)(void *)
* }
*/
public static void USBDeviceAbortPipeZero(MemorySegment struct, MemorySegment fieldValue) {
struct.set(USBDeviceAbortPipeZero$LAYOUT, USBDeviceAbortPipeZero$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*USBGetManufacturerStringIndex)(void *, UInt8 *)
* }
*/
public static class USBGetManufacturerStringIndex {
USBGetManufacturerStringIndex() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(USBGetManufacturerStringIndex.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(USBGetManufacturerStringIndex.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout USBGetManufacturerStringIndex$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("USBGetManufacturerStringIndex"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*USBGetManufacturerStringIndex)(void *, UInt8 *)
* }
*/
public static final AddressLayout USBGetManufacturerStringIndex$layout() {
return USBGetManufacturerStringIndex$LAYOUT;
}
private static final long USBGetManufacturerStringIndex$OFFSET = 272;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*USBGetManufacturerStringIndex)(void *, UInt8 *)
* }
*/
public static final long USBGetManufacturerStringIndex$offset() {
return USBGetManufacturerStringIndex$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*USBGetManufacturerStringIndex)(void *, UInt8 *)
* }
*/
public static MemorySegment USBGetManufacturerStringIndex(MemorySegment struct) {
return struct.get(USBGetManufacturerStringIndex$LAYOUT, USBGetManufacturerStringIndex$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*USBGetManufacturerStringIndex)(void *, UInt8 *)
* }
*/
public static void USBGetManufacturerStringIndex(MemorySegment struct, MemorySegment fieldValue) {
struct.set(USBGetManufacturerStringIndex$LAYOUT, USBGetManufacturerStringIndex$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*USBGetProductStringIndex)(void *, UInt8 *)
* }
*/
public static class USBGetProductStringIndex {
USBGetProductStringIndex() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(USBGetProductStringIndex.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(USBGetProductStringIndex.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout USBGetProductStringIndex$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("USBGetProductStringIndex"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*USBGetProductStringIndex)(void *, UInt8 *)
* }
*/
public static final AddressLayout USBGetProductStringIndex$layout() {
return USBGetProductStringIndex$LAYOUT;
}
private static final long USBGetProductStringIndex$OFFSET = 280;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*USBGetProductStringIndex)(void *, UInt8 *)
* }
*/
public static final long USBGetProductStringIndex$offset() {
return USBGetProductStringIndex$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*USBGetProductStringIndex)(void *, UInt8 *)
* }
*/
public static MemorySegment USBGetProductStringIndex(MemorySegment struct) {
return struct.get(USBGetProductStringIndex$LAYOUT, USBGetProductStringIndex$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*USBGetProductStringIndex)(void *, UInt8 *)
* }
*/
public static void USBGetProductStringIndex(MemorySegment struct, MemorySegment fieldValue) {
struct.set(USBGetProductStringIndex$LAYOUT, USBGetProductStringIndex$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*USBGetSerialNumberStringIndex)(void *, UInt8 *)
* }
*/
public static class USBGetSerialNumberStringIndex {
USBGetSerialNumberStringIndex() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, MemorySegment _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_POINTER
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(USBGetSerialNumberStringIndex.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(USBGetSerialNumberStringIndex.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout USBGetSerialNumberStringIndex$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("USBGetSerialNumberStringIndex"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*USBGetSerialNumberStringIndex)(void *, UInt8 *)
* }
*/
public static final AddressLayout USBGetSerialNumberStringIndex$layout() {
return USBGetSerialNumberStringIndex$LAYOUT;
}
private static final long USBGetSerialNumberStringIndex$OFFSET = 288;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*USBGetSerialNumberStringIndex)(void *, UInt8 *)
* }
*/
public static final long USBGetSerialNumberStringIndex$offset() {
return USBGetSerialNumberStringIndex$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*USBGetSerialNumberStringIndex)(void *, UInt8 *)
* }
*/
public static MemorySegment USBGetSerialNumberStringIndex(MemorySegment struct) {
return struct.get(USBGetSerialNumberStringIndex$LAYOUT, USBGetSerialNumberStringIndex$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*USBGetSerialNumberStringIndex)(void *, UInt8 *)
* }
*/
public static void USBGetSerialNumberStringIndex(MemorySegment struct, MemorySegment fieldValue) {
struct.set(USBGetSerialNumberStringIndex$LAYOUT, USBGetSerialNumberStringIndex$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* IOReturn (*USBDeviceReEnumerate)(void *, UInt32)
* }
*/
public static class USBDeviceReEnumerate {
USBDeviceReEnumerate() {
// Should not be called directly
}
/**
* The function pointer signature, expressed as a functional interface
*/
public interface Function {
int apply(MemorySegment _x0, int _x1);
}
private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
IOKit.C_INT,
IOKit.C_POINTER,
IOKit.C_INT
);
/**
* The descriptor of this function pointer
*/
public static FunctionDescriptor descriptor() {
return $DESC;
}
private static final MethodHandle UP$MH = IOKit.upcallHandle(USBDeviceReEnumerate.Function.class, "apply", $DESC);
/**
* Allocates a new upcall stub, whose implementation is defined by {@code fi}.
* The lifetime of the returned segment is managed by {@code arena}
*/
public static MemorySegment allocate(USBDeviceReEnumerate.Function fi, Arena arena) {
return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
}
private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);
/**
* Invoke the upcall stub {@code funcPtr}, with given parameters
*/
public static int invoke(MemorySegment funcPtr,MemorySegment _x0, int _x1) {
try {
return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
} catch (Throwable ex$) {
throw new AssertionError("should not reach here", ex$);
}
}
}
private static final AddressLayout USBDeviceReEnumerate$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("USBDeviceReEnumerate"));
/**
* Layout for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceReEnumerate)(void *, UInt32)
* }
*/
public static final AddressLayout USBDeviceReEnumerate$layout() {
return USBDeviceReEnumerate$LAYOUT;
}
private static final long USBDeviceReEnumerate$OFFSET = 296;
/**
* Offset for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceReEnumerate)(void *, UInt32)
* }
*/
public static final long USBDeviceReEnumerate$offset() {
return USBDeviceReEnumerate$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceReEnumerate)(void *, UInt32)
* }
*/
public static MemorySegment USBDeviceReEnumerate(MemorySegment struct) {
return struct.get(USBDeviceReEnumerate$LAYOUT, USBDeviceReEnumerate$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* IOReturn (*USBDeviceReEnumerate)(void *, UInt32)
* }
*/
public static void USBDeviceReEnumerate(MemorySegment struct, MemorySegment fieldValue) {
struct.set(USBDeviceReEnumerate$LAYOUT, USBDeviceReEnumerate$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction) (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy