com.hcl.domino.jna.internal.structs.NotesBlockIdStruct Maven / Gradle / Ivy
/*
* ==========================================================================
* Copyright (C) 2019-2022 HCL America, Inc. ( http://www.hcl.com/ )
* All rights reserved.
* ==========================================================================
* Licensed under the Apache License, Version 2.0 (the "License"). You may
* not use this file except in compliance with the License. You may obtain a
* copy of the License at .
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
* ==========================================================================
*/
package com.hcl.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
*/
@Deprecated
public NotesBlockIdStruct() {
super();
// setAlignType(Structure.ALIGN_NONE);
}
public static NotesBlockIdStruct newInstance() {
return AccessController.doPrivileged((PrivilegedAction) () -> new NotesBlockIdStruct());
}
@Override
protected List getFieldOrder() {
return Arrays.asList("pool", "block"); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
* @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
*/
@Deprecated
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((PrivilegedAction) () -> 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
*/
@Deprecated
public NotesBlockIdStruct(Pointer peer) {
super(peer);
// setAlignType(Structure.ALIGN_NONE);
}
public static NotesBlockIdStruct newInstance(final Pointer p) {
return AccessController.doPrivileged((PrivilegedAction) () -> new NotesBlockIdStruct(p));
}
public static class ByReference extends NotesBlockIdStruct implements Structure.ByReference {
public static NotesBlockIdStruct.ByReference newInstance() {
return AccessController.doPrivileged((PrivilegedAction) () -> new NotesBlockIdStruct.ByReference());
}
};
public static class ByValue extends NotesBlockIdStruct implements Structure.ByValue {
public static NotesBlockIdStruct.ByValue newInstance() {
return AccessController.doPrivileged((PrivilegedAction) () -> new NotesBlockIdStruct.ByValue());
}
}
@Override
public String toString() {
return "NotesBlockIdStruct [pool=" + pool + ", block=" + block + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy