io.qt.webengine.core.QWebEngineFileSystemAccessRequest Maven / Gradle / Ivy
Show all versions of qtjambi-webenginecore Show documentation
package io.qt.webengine.core;
import io.qt.*;
/**
* Enables accepting or rejecting requests for local file system access from JavaScript applications
* Java wrapper for Qt class QWebEngineFileSystemAccessRequest
* @since This class was introduced in Qt 6.4.
*/
public class QWebEngineFileSystemAccessRequest extends QtObject
implements java.lang.Cloneable
{
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(QWebEngineFileSystemAccessRequest.class);
/**
* Java wrapper for Qt enum QWebEngineFileSystemAccessRequest::AccessFlag
*
* @see AccessFlags
*/
public enum AccessFlag implements QtFlagEnumerator {
/**
* Representing QWebEngineFileSystemAccessRequest:: Read
*/
Read(1),
/**
* Representing QWebEngineFileSystemAccessRequest:: Write
*/
Write(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private AccessFlag(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
@Override
public @NonNull AccessFlags asFlags() {
return new AccessFlags(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull AccessFlags combined(@NonNull AccessFlag e) {
return asFlags().setFlag(e, true);
}
/**
* Excludes other enum entry from a flag of this entry.
* @param e enum entry
* @return new flag
*/
public @NonNull AccessFlags cleared(@NonNull AccessFlag e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link AccessFlags} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull AccessFlags flags(@Nullable AccessFlag @NonNull... values) {
return new AccessFlags(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull AccessFlag resolve(int value) {
switch (value) {
case 1: return Read;
case 2: return Write;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* {@link QFlags} type for enum {@link AccessFlag}
*/
public static final class AccessFlags extends QFlags implements Comparable {
private static final long serialVersionUID = 0x354c56a0ae87271cL;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new AccessFlags where the flags in args
are set.
* @param args enum entries
*/
public AccessFlags(@Nullable AccessFlag @NonNull... args){
super(args);
}
/**
* Creates a new AccessFlags with given value
.
* @param value
*/
public AccessFlags(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new AccessFlags
*/
@Override
public final @NonNull AccessFlags combined(@StrictNonNull AccessFlag e){
return new AccessFlags(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
@Override
public final @NonNull AccessFlags setFlag(@Nullable AccessFlag e){
return setFlag(e, true);
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
@Override
public final @NonNull AccessFlags setFlag(@Nullable AccessFlag e, boolean on){
if (on) {
setValue(value() | e.value());
}else {
setValue(value() & ~e.value());
}
return this;
}
/**
* Returns an array of flag objects represented by this AccessFlags.
* @return array of enum entries
*/
@Override
public final @NonNull AccessFlag @NonNull[] flags(){
return super.flags(AccessFlag.values());
}
/**
* {@inheritDoc}
*/
@Override
public final @NonNull AccessFlags clone(){
return new AccessFlags(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(@StrictNonNull AccessFlags other){
return Integer.compare(value(), other.value());
}
}
/**
* Java wrapper for Qt enum QWebEngineFileSystemAccessRequest::HandleType
*/
public enum HandleType implements QtEnumerator {
/**
* Representing QWebEngineFileSystemAccessRequest:: File
*/
File(0),
/**
* Representing QWebEngineFileSystemAccessRequest:: Directory
*/
Directory(1);
static {
QtJambi_LibraryUtilities.initialize();
}
private HandleType(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull HandleType resolve(int value) {
switch (value) {
case 0: return File;
case 1: return Directory;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QWebEngineFileSystemAccessRequest:: QWebEngineFileSystemAccessRequest(QWebEngineFileSystemAccessRequest)
* @param other
*/
public QWebEngineFileSystemAccessRequest(io.qt.webengine.core.@NonNull QWebEngineFileSystemAccessRequest other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QWebEngineFileSystemAccessRequest instance, io.qt.webengine.core.QWebEngineFileSystemAccessRequest other);
/**
* See QWebEngineFileSystemAccessRequest:: accept()
*/
public final void accept(){
accept_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void accept_native(long __this__nativeId);
/**
* See QWebEngineFileSystemAccessRequest:: accessFlags()const
* @return
*/
@QtPropertyReader(name="accessFlags")
@QtPropertyConstant
@QtUninvokable
public final io.qt.webengine.core.QWebEngineFileSystemAccessRequest.@NonNull AccessFlags accessFlags(){
return new io.qt.webengine.core.QWebEngineFileSystemAccessRequest.AccessFlags(accessFlags_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int accessFlags_native_constfct(long __this__nativeId);
/**
* See QWebEngineFileSystemAccessRequest:: filePath()const
* @return
*/
@QtPropertyReader(name="filePath")
@QtPropertyConstant
@QtUninvokable
public final io.qt.core.@NonNull QUrl filePath(){
return filePath_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QUrl filePath_native_constfct(long __this__nativeId);
/**
* See QWebEngineFileSystemAccessRequest:: handleType()const
* @return
*/
@QtPropertyReader(name="handleType")
@QtPropertyConstant
@QtUninvokable
public final io.qt.webengine.core.QWebEngineFileSystemAccessRequest.@NonNull HandleType handleType(){
return io.qt.webengine.core.QWebEngineFileSystemAccessRequest.HandleType.resolve(handleType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int handleType_native_constfct(long __this__nativeId);
/**
* See QWebEngineFileSystemAccessRequest:: operator=(QWebEngineFileSystemAccessRequest)
* @param other
*/
@QtUninvokable
public final void assign(io.qt.webengine.core.@NonNull QWebEngineFileSystemAccessRequest other){
assign_native_cref_QWebEngineFileSystemAccessRequest(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void assign_native_cref_QWebEngineFileSystemAccessRequest(long __this__nativeId, long other);
/**
* See operator==(QWebEngineFileSystemAccessRequest, QWebEngineFileSystemAccessRequest)
* @param rhs
* @return
*/
@QtUninvokable
public final boolean equals(io.qt.webengine.core.@NonNull QWebEngineFileSystemAccessRequest rhs){
return equals_native_cref_QWebEngineFileSystemAccessRequest(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs));
}
@QtUninvokable
private native boolean equals_native_cref_QWebEngineFileSystemAccessRequest(long __this__nativeId, long rhs);
/**
* See QWebEngineFileSystemAccessRequest:: origin()const
* @return
*/
@QtPropertyReader(name="origin")
@QtPropertyConstant
@QtUninvokable
public final io.qt.core.@NonNull QUrl origin(){
return origin_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QUrl origin_native_constfct(long __this__nativeId);
/**
* See QWebEngineFileSystemAccessRequest:: reject()
*/
public final void reject(){
reject_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void reject_native(long __this__nativeId);
/**
* See QWebEngineFileSystemAccessRequest:: swap(QWebEngineFileSystemAccessRequest&)
* @param other
*/
@QtUninvokable
public final void swap(io.qt.webengine.core.@StrictNonNull QWebEngineFileSystemAccessRequest other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
swap_native_ref_QWebEngineFileSystemAccessRequest(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void swap_native_ref_QWebEngineFileSystemAccessRequest(long __this__nativeId, long other);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QWebEngineFileSystemAccessRequest(QPrivateConstructor p) { super(p); }
/**
* See operator==(QWebEngineFileSystemAccessRequest, QWebEngineFileSystemAccessRequest)
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other==null || other instanceof io.qt.webengine.core.QWebEngineFileSystemAccessRequest) {
return equals((io.qt.webengine.core.QWebEngineFileSystemAccessRequest) other);
}
return false;
}
/**
* Returns the objects's hash code computed by qHash(QWebEngineFileSystemAccessRequest)
.
*/
@QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native static int hashCode_native(long __this_nativeId);
/**
* Creates and returns a copy of this object.
See QWebEngineFileSystemAccessRequest:: QWebEngineFileSystemAccessRequest(QWebEngineFileSystemAccessRequest)
*/
@QtUninvokable
@Override
public QWebEngineFileSystemAccessRequest clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QWebEngineFileSystemAccessRequest clone_native(long __this_nativeId);
/**
* @hidden
* Kotlin property getter. In Java use {@link #accessFlags()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.webengine.core.QWebEngineFileSystemAccessRequest.@NonNull AccessFlags getAccessFlags() {
return accessFlags();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #filePath()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.core.@NonNull QUrl getFilePath() {
return filePath();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #handleType()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.webengine.core.QWebEngineFileSystemAccessRequest.@NonNull HandleType getHandleType() {
return handleType();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #origin()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.core.@NonNull QUrl getOrigin() {
return origin();
}
}