com.mindoo.domino.jna.internal.structs.NotesBlockIdStruct Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of domino-jna Show documentation
Show all versions of domino-jna Show documentation
Java project to access the HCL Domino C API using Java Native Access (JNA)
package com.mindoo.domino.jna.internal.structs;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Arrays;
import java.util.List;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
/**
* This file was autogenerated by JNAerator,
* a tool written by Olivier Chafik that uses a few opensource projects..
* For help, please visit NativeLibs4Java , Rococoa, or JNA.
*/
public class NotesBlockIdStruct extends BaseStructure {
/**
* pool handle
* C type : DHANDLE
*/
public int pool;
/**
* block handle
* C type : BLOCK
*/
public short block;
/**
* @deprecated only public to be used by JNA; use static newInstance method instead to run in AccessController.doPrivileged block
*/
public NotesBlockIdStruct() {
super();
// setAlignType(Structure.ALIGN_NONE);
}
public static NotesBlockIdStruct newInstance() {
return AccessController.doPrivileged(new PrivilegedAction() {
@Override
public NotesBlockIdStruct run() {
return new NotesBlockIdStruct();
}
});
}
@Override
protected List getFieldOrder() {
return Arrays.asList("pool", "block");
}
/**
* @param pool pool handle
* C type : DHANDLE
* @param block block handle
* C type : BLOCK
* @deprecated only public to be used by JNA; use static newInstance method instead to run in AccessController.doPrivileged block
*/
public NotesBlockIdStruct(int pool, short block) {
super();
// setAlignType(Structure.ALIGN_NONE);
this.pool = pool;
this.block = block;
}
public static NotesBlockIdStruct newInstance(final int pool, final short block) {
return AccessController.doPrivileged(new PrivilegedAction() {
@Override
public NotesBlockIdStruct run() {
return new NotesBlockIdStruct(pool, block);
}
});
}
/**
* @deprecated only public to be used by JNA; use static newInstance method instead to run in AccessController.doPrivileged block
*
* @param peer pointer
*/
public NotesBlockIdStruct(Pointer peer) {
super(peer);
// setAlignType(Structure.ALIGN_NONE);
}
public static NotesBlockIdStruct newInstance(final Pointer p) {
return AccessController.doPrivileged(new PrivilegedAction() {
@Override
public NotesBlockIdStruct run() {
return new NotesBlockIdStruct(p);
}
});
}
public static class ByReference extends NotesBlockIdStruct implements Structure.ByReference {
public static NotesBlockIdStruct.ByReference newInstance() {
return AccessController.doPrivileged(new PrivilegedAction() {
@Override
public NotesBlockIdStruct.ByReference run() {
return new NotesBlockIdStruct.ByReference();
}
});
}
};
public static class ByValue extends NotesBlockIdStruct implements Structure.ByValue {
public static NotesBlockIdStruct.ByValue newInstance() {
return AccessController.doPrivileged(new PrivilegedAction() {
@Override
public NotesBlockIdStruct.ByValue run() {
return new NotesBlockIdStruct.ByValue();
}
});
}
};
}