io.qt.core.QSystemSemaphore Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.core;
import io.qt.*;
/**
* General counting system semaphore
* Java wrapper for Qt class QSystemSemaphore
*/
public class QSystemSemaphore extends QtObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QSystemSemaphore.class);
/**
* Java wrapper for Qt enum QSystemSemaphore::AccessMode
*/
public enum AccessMode implements QtEnumerator {
/**
* Representing QSystemSemaphore:: Open
*/
Open(0),
/**
* Representing QSystemSemaphore:: Create
*/
Create(1);
static {
QtJambi_LibraryUtilities.initialize();
}
private AccessMode(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull AccessMode resolve(int value) {
switch (value) {
case 0: return Open;
case 1: return Create;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QSystemSemaphore::SystemSemaphoreError
*/
public enum SystemSemaphoreError implements QtEnumerator {
/**
* Representing QSystemSemaphore:: NoError
*/
NoError(0),
/**
* Representing QSystemSemaphore:: PermissionDenied
*/
PermissionDenied(1),
/**
* Representing QSystemSemaphore:: KeyError
*/
KeyError(2),
/**
* Representing QSystemSemaphore:: AlreadyExists
*/
AlreadyExists(3),
/**
* Representing QSystemSemaphore:: NotFound
*/
NotFound(4),
/**
* Representing QSystemSemaphore:: OutOfResources
*/
OutOfResources(5),
/**
* Representing QSystemSemaphore:: UnknownError
*/
UnknownError(6);
static {
QtJambi_LibraryUtilities.initialize();
}
private SystemSemaphoreError(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull SystemSemaphoreError resolve(int value) {
switch (value) {
case 0: return NoError;
case 1: return PermissionDenied;
case 2: return KeyError;
case 3: return AlreadyExists;
case 4: return NotFound;
case 5: return OutOfResources;
case 6: return UnknownError;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QSystemSemaphore:: QSystemSemaphore(QNativeIpcKey, int, QSystemSemaphore::AccessMode)
*/
public QSystemSemaphore(io.qt.core.@StrictNonNull QNativeIpcKey key, int initialValue, io.qt.core.QSystemSemaphore.@NonNull AccessMode arg__3){
super((QPrivateConstructor)null);
java.util.Objects.requireNonNull(key, "Argument 'key': null not expected.");
initialize_native(this, key, initialValue, arg__3);
}
private native static void initialize_native(QSystemSemaphore instance, io.qt.core.QNativeIpcKey key, int initialValue, io.qt.core.QSystemSemaphore.AccessMode arg__3);
/**
* See QSystemSemaphore:: QSystemSemaphore(QString, int, QSystemSemaphore::AccessMode)
*/
public QSystemSemaphore(java.lang.@NonNull String key, int initialValue, io.qt.core.QSystemSemaphore.@NonNull AccessMode mode){
super((QPrivateConstructor)null);
initialize_native(this, key, initialValue, mode);
}
private native static void initialize_native(QSystemSemaphore instance, java.lang.String key, int initialValue, io.qt.core.QSystemSemaphore.AccessMode mode);
/**
* See QSystemSemaphore:: acquire()
*/
@QtUninvokable
public final boolean acquire(){
return acquire_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean acquire_native(long __this__nativeId);
/**
* See QSystemSemaphore:: error()const
*/
@QtUninvokable
public final io.qt.core.QSystemSemaphore.@NonNull SystemSemaphoreError error(){
return io.qt.core.QSystemSemaphore.SystemSemaphoreError.resolve(error_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int error_native_constfct(long __this__nativeId);
/**
* See QSystemSemaphore:: errorString()const
*/
@QtUninvokable
public final java.lang.@NonNull String errorString(){
return errorString_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String errorString_native_constfct(long __this__nativeId);
/**
* See QSystemSemaphore:: key()const
*/
@QtUninvokable
public final java.lang.@NonNull String key(){
return key_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String key_native_constfct(long __this__nativeId);
/**
* See QSystemSemaphore:: nativeIpcKey()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QNativeIpcKey nativeIpcKey(){
return nativeIpcKey_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QNativeIpcKey nativeIpcKey_native_constfct(long __this__nativeId);
/**
* See QSystemSemaphore:: release(int)
*/
@QtUninvokable
public final boolean release(int n){
return release_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), n);
}
@QtUninvokable
private native boolean release_native_int(long __this__nativeId, int n);
/**
* See QSystemSemaphore:: setKey(QString, int, QSystemSemaphore::AccessMode)
*/
@QtUninvokable
public final void setKey(java.lang.@NonNull String key, int initialValue, io.qt.core.QSystemSemaphore.@NonNull AccessMode mode){
setKey_native_cref_QString_int_QSystemSemaphore_AccessMode(QtJambi_LibraryUtilities.internal.nativeId(this), key, initialValue, mode.value());
}
@QtUninvokable
private native void setKey_native_cref_QString_int_QSystemSemaphore_AccessMode(long __this__nativeId, java.lang.String key, int initialValue, int mode);
/**
* See QSystemSemaphore:: setNativeKey(QNativeIpcKey, int, QSystemSemaphore::AccessMode)
*/
@QtUninvokable
public final void setNativeKey(io.qt.core.@StrictNonNull QNativeIpcKey key, int initialValue, io.qt.core.QSystemSemaphore.@NonNull AccessMode arg__3){
java.util.Objects.requireNonNull(key, "Argument 'key': null not expected.");
setNativeKey_native_cref_QNativeIpcKey_int_QSystemSemaphore_AccessMode(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(key), initialValue, arg__3.value());
}
@QtUninvokable
private native void setNativeKey_native_cref_QNativeIpcKey_int_QSystemSemaphore_AccessMode(long __this__nativeId, long key, int initialValue, int arg__3);
/**
* See QSystemSemaphore:: setNativeKey(QString, int, QSystemSemaphore::AccessMode, QNativeIpcKey::Type)
*/
@QtUninvokable
public final void setNativeKey(java.lang.@NonNull String key, int initialValue, io.qt.core.QSystemSemaphore.@NonNull AccessMode mode, io.qt.core.QNativeIpcKey.@NonNull Type type){
setNativeKey_native_cref_QString_int_QSystemSemaphore_AccessMode_QNativeIpcKey_Type(QtJambi_LibraryUtilities.internal.nativeId(this), key, initialValue, mode.value(), type.value());
}
@QtUninvokable
private native void setNativeKey_native_cref_QString_int_QSystemSemaphore_AccessMode_QNativeIpcKey_Type(long __this__nativeId, java.lang.String key, int initialValue, int mode, short type);
/**
* See QSystemSemaphore:: isKeyTypeSupported(QNativeIpcKey::Type)
*/
public static boolean isKeyTypeSupported(io.qt.core.QNativeIpcKey.@NonNull Type type){
return isKeyTypeSupported_native_QNativeIpcKey_Type(type.value());
}
private native static boolean isKeyTypeSupported_native_QNativeIpcKey_Type(short type);
/**
* See QSystemSemaphore:: legacyNativeKey(QString, QNativeIpcKey::Type)
*/
public static io.qt.core.@NonNull QNativeIpcKey legacyNativeKey(java.lang.@NonNull String key, io.qt.core.QNativeIpcKey.@NonNull Type type){
return legacyNativeKey_native_cref_QString_QNativeIpcKey_Type(key, type.value());
}
private native static io.qt.core.QNativeIpcKey legacyNativeKey_native_cref_QString_QNativeIpcKey_Type(java.lang.String key, short type);
/**
* See QSystemSemaphore:: platformSafeKey(QString, QNativeIpcKey::Type)
*/
public static io.qt.core.@NonNull QNativeIpcKey platformSafeKey(java.lang.@NonNull String key, io.qt.core.QNativeIpcKey.@NonNull Type type){
return platformSafeKey_native_cref_QString_QNativeIpcKey_Type(key, type.value());
}
private native static io.qt.core.QNativeIpcKey platformSafeKey_native_cref_QString_QNativeIpcKey_Type(java.lang.String key, short type);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QSystemSemaphore(QPrivateConstructor p) { super(p); }
/**
* Overloaded constructor for {@link #QSystemSemaphore(io.qt.core.QNativeIpcKey, int, io.qt.core.QSystemSemaphore.AccessMode)}
* with arg__3 = io.qt.core.QSystemSemaphore.AccessMode.Open
.
*/
public QSystemSemaphore(io.qt.core.@StrictNonNull QNativeIpcKey key, int initialValue) {
this(key, initialValue, io.qt.core.QSystemSemaphore.AccessMode.Open);
}
/**
* Overloaded constructor for {@link #QSystemSemaphore(io.qt.core.QNativeIpcKey, int, io.qt.core.QSystemSemaphore.AccessMode)}
* with:
* initialValue = 0
* arg__3 = io.qt.core.QSystemSemaphore.AccessMode.Open
*
*/
public QSystemSemaphore(io.qt.core.@StrictNonNull QNativeIpcKey key) {
this(key, (int)0, io.qt.core.QSystemSemaphore.AccessMode.Open);
}
/**
* Overloaded constructor for {@link #QSystemSemaphore(java.lang.String, int, io.qt.core.QSystemSemaphore.AccessMode)}
* with mode = io.qt.core.QSystemSemaphore.AccessMode.Open
.
*/
public QSystemSemaphore(java.lang.@NonNull String key, int initialValue) {
this(key, initialValue, io.qt.core.QSystemSemaphore.AccessMode.Open);
}
/**
* Overloaded constructor for {@link #QSystemSemaphore(java.lang.String, int, io.qt.core.QSystemSemaphore.AccessMode)}
* with:
* initialValue = 0
* mode = io.qt.core.QSystemSemaphore.AccessMode.Open
*
*/
public QSystemSemaphore(java.lang.@NonNull String key) {
this(key, (int)0, io.qt.core.QSystemSemaphore.AccessMode.Open);
}
/**
* Overloaded function for {@link #release(int)}
* with n = 1
.
*/
@QtUninvokable
public final boolean release() {
return release((int)1);
}
/**
* Overloaded function for {@link #setKey(java.lang.String, int, io.qt.core.QSystemSemaphore.AccessMode)}
* with mode = io.qt.core.QSystemSemaphore.AccessMode.Open
.
*/
@QtUninvokable
public final void setKey(java.lang.@NonNull String key, int initialValue) {
setKey(key, initialValue, io.qt.core.QSystemSemaphore.AccessMode.Open);
}
/**
* Overloaded function for {@link #setKey(java.lang.String, int, io.qt.core.QSystemSemaphore.AccessMode)}
* with:
* initialValue = 0
* mode = io.qt.core.QSystemSemaphore.AccessMode.Open
*
*/
@QtUninvokable
public final void setKey(java.lang.@NonNull String key) {
setKey(key, (int)0, io.qt.core.QSystemSemaphore.AccessMode.Open);
}
/**
* Overloaded function for {@link #setNativeKey(io.qt.core.QNativeIpcKey, int, io.qt.core.QSystemSemaphore.AccessMode)}
* with arg__3 = io.qt.core.QSystemSemaphore.AccessMode.Open
.
*/
@QtUninvokable
public final void setNativeKey(io.qt.core.@StrictNonNull QNativeIpcKey key, int initialValue) {
setNativeKey(key, initialValue, io.qt.core.QSystemSemaphore.AccessMode.Open);
}
/**
* Overloaded function for {@link #setNativeKey(io.qt.core.QNativeIpcKey, int, io.qt.core.QSystemSemaphore.AccessMode)}
* with:
* initialValue = 0
* arg__3 = io.qt.core.QSystemSemaphore.AccessMode.Open
*
*/
@QtUninvokable
public final void setNativeKey(io.qt.core.@StrictNonNull QNativeIpcKey key) {
setNativeKey(key, (int)0, io.qt.core.QSystemSemaphore.AccessMode.Open);
}
/**
* Overloaded function for {@link #setNativeKey(java.lang.String, int, io.qt.core.QSystemSemaphore.AccessMode, io.qt.core.QNativeIpcKey.Type)}
* with type = io.qt.core.QNativeIpcKey.legacyDefaultTypeForOs()
.
*/
@QtUninvokable
public final void setNativeKey(java.lang.@NonNull String key, int initialValue, io.qt.core.QSystemSemaphore.@NonNull AccessMode mode) {
setNativeKey(key, initialValue, mode, io.qt.core.QNativeIpcKey.legacyDefaultTypeForOs());
}
/**
* Overloaded function for {@link #setNativeKey(java.lang.String, int, io.qt.core.QSystemSemaphore.AccessMode, io.qt.core.QNativeIpcKey.Type)}
* with:
* mode = io.qt.core.QSystemSemaphore.AccessMode.Open
* type = io.qt.core.QNativeIpcKey.legacyDefaultTypeForOs()
*
*/
@QtUninvokable
public final void setNativeKey(java.lang.@NonNull String key, int initialValue) {
setNativeKey(key, initialValue, io.qt.core.QSystemSemaphore.AccessMode.Open, io.qt.core.QNativeIpcKey.legacyDefaultTypeForOs());
}
/**
* Overloaded function for {@link #setNativeKey(java.lang.String, int, io.qt.core.QSystemSemaphore.AccessMode, io.qt.core.QNativeIpcKey.Type)}
* with:
* initialValue = 0
* mode = io.qt.core.QSystemSemaphore.AccessMode.Open
* type = io.qt.core.QNativeIpcKey.legacyDefaultTypeForOs()
*
*/
@QtUninvokable
public final void setNativeKey(java.lang.@NonNull String key) {
setNativeKey(key, (int)0, io.qt.core.QSystemSemaphore.AccessMode.Open, io.qt.core.QNativeIpcKey.legacyDefaultTypeForOs());
}
/**
* Overloaded function for {@link #legacyNativeKey(java.lang.String, io.qt.core.QNativeIpcKey.Type)}
* with type = io.qt.core.QNativeIpcKey.legacyDefaultTypeForOs()
.
*/
public static io.qt.core.@NonNull QNativeIpcKey legacyNativeKey(java.lang.@NonNull String key) {
return legacyNativeKey(key, io.qt.core.QNativeIpcKey.legacyDefaultTypeForOs());
}
/**
* Overloaded function for {@link #platformSafeKey(java.lang.String, io.qt.core.QNativeIpcKey.Type)}
* with type = io.qt.core.QNativeIpcKey.DefaultTypeForOs
.
*/
public static io.qt.core.@NonNull QNativeIpcKey platformSafeKey(java.lang.@NonNull String key) {
return platformSafeKey(key, io.qt.core.QNativeIpcKey.DefaultTypeForOs);
}
}