com.hcl.domino.jna.internal.structs.NotesScheduleListStruct 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 is the schedule data. The {@link NotesScheduleListStruct} is followed by
* NumEntries of {@link NotesSchedEntryStruct} or {@link NotesSchedEntryExtStruct}.
*
* @author Karsten Lehmann
*/
public class NotesScheduleListStruct extends BaseStructure {
/** Total number of schedule entries follow */
public int NumEntries;
/** Application id for UserAttr interpretation */
public short wApplicationID;
/**
* Pre Notes/Domino 6: spare
* Notes/Domino 6: This now conveys the length of a single
* SCHED_ENTRY_xxx that follows. Use this value
* to skip entries that MAY be larger (ie: a later version may
* extend SCHED_ENTRY_EXT by appending values
* that Notes/Domino 6 does not know about so SCHED_ENTRY_xxx
* would actually be larger than the Notes/Domino 6
* SCHED_ENTRY_EXT
*/
public short Spare;
/**
* @deprecated only public to be used by JNA; use static newInstance method instead to run in AccessController.doPrivileged block
*/
@Deprecated
public NotesScheduleListStruct() {
super();
}
public static NotesScheduleListStruct newInstance() {
return AccessController.doPrivileged((PrivilegedAction) () -> new NotesScheduleListStruct());
}
@Override
protected List getFieldOrder() {
return Arrays.asList("NumEntries", "wApplicationID", "Spare"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
/**
* @param NumEntries Total number of schedule entries follow
* @param wApplicationID Application id for UserAttr interpretation
* @param Spare Pre Notes/Domino 6: spare
* Notes/Domino 6: This now conveys the length of a single
* SCHED_ENTRY_xxx that follows. Use this value
* to skip entries that MAY be larger (ie: a later version may
* extend SCHED_ENTRY_EXT by appending values
* that Notes/Domino 6 does not know about so SCHED_ENTRY_xxx
* would actually be larger than the Notes/Domino 6
* SCHED_ENTRY_EXT
*
* @deprecated only public to be used by JNA; use static newInstance method instead to run in AccessController.doPrivileged block
*/
@Deprecated
public NotesScheduleListStruct(int NumEntries, short wApplicationID, short Spare) {
super();
this.NumEntries = NumEntries;
this.wApplicationID = wApplicationID;
this.Spare = Spare;
}
public static NotesScheduleListStruct newInstance(final int numEntries, final short wApplicationID, final short spare) {
return AccessController.doPrivileged((PrivilegedAction) () -> new NotesScheduleListStruct(numEntries, wApplicationID, spare));
}
public NotesScheduleListStruct(Pointer peer) {
super(peer);
}
public static NotesScheduleListStruct newInstance(final Pointer peer) {
return AccessController.doPrivileged((PrivilegedAction) () -> new NotesScheduleListStruct(peer));
}
public static class ByReference extends NotesScheduleListStruct implements Structure.ByReference {
};
public static class ByValue extends NotesScheduleListStruct implements Structure.ByValue {
};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy