com.hcl.domino.jna.internal.structs.UpdateDAConfigStruct Maven / Gradle / Ivy
The newest version!
/*
* ==========================================================================
* 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.io.Serializable;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Arrays;
import java.util.List;
import com.hcl.domino.commons.structs.WrongArraySizeException;
import com.hcl.domino.data.IAdaptable;
import com.hcl.domino.misc.NotesConstants;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
/**
* JNA class for the UpdateDAConfigStruct type
*
* @author Raghu M R
*/
public class UpdateDAConfigStruct extends BaseStructure implements Serializable, IAdaptable {
private static final long serialVersionUID = 1L;
public DirectoryAssistanceStruct daStruct;
public byte[] szDocUNID = new byte[NotesConstants.MAX_HOSTNAME];
public UpdateDAConfigStruct(byte docUNID[], DirectoryAssistanceStruct daStruct) {
super();
if ((docUNID.length != this.szDocUNID.length)) {
throw new WrongArraySizeException("DocUNID");
}
this.daStruct = daStruct;
this.szDocUNID = docUNID;
}
public UpdateDAConfigStruct() {
super();
}
public static UpdateDAConfigStruct newInstance() {
return AccessController
.doPrivileged((PrivilegedAction) () -> new UpdateDAConfigStruct());
}
public static UpdateDAConfigStruct.ByValue newInstanceByVal() {
return AccessController
.doPrivileged((PrivilegedAction) () -> new UpdateDAConfigStruct.ByValue());
}
@Override
protected List getFieldOrder() {
return Arrays.asList(
"daStruct",
"szDocUNID");
}
@Override
@SuppressWarnings("unchecked")
public T getAdapter(Class clazz) {
if (clazz == UpdateDAConfigStruct.class) {
return (T) this;
} else if (clazz == Pointer.class) {
return (T) getPointer();
}
return null;
}
public static class ByReference extends UpdateDAConfigStruct implements Structure.ByReference {
private static final long serialVersionUID = -2958581285484373942L;
};
public static class ByValue extends UpdateDAConfigStruct implements Structure.ByValue {
private static final long serialVersionUID = -6538673668884547829L;
};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy