io.qt.webengine.core.QWebEngineUrlRequestInfo Maven / Gradle / Ivy
Show all versions of qtjambi-webenginecore Show documentation
package io.qt.webengine.core;
import io.qt.*;
/**
* Information about URL requests
* Java wrapper for Qt class QWebEngineUrlRequestInfo
*/
public final class QWebEngineUrlRequestInfo extends QtObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QWebEngineUrlRequestInfo::NavigationType
*/
public enum NavigationType implements QtEnumerator {
/**
* Representing QWebEngineUrlRequestInfo:: NavigationTypeLink
*/
NavigationTypeLink(0),
/**
* Representing QWebEngineUrlRequestInfo:: NavigationTypeTyped
*/
NavigationTypeTyped(1),
/**
* Representing QWebEngineUrlRequestInfo:: NavigationTypeFormSubmitted
*/
NavigationTypeFormSubmitted(2),
/**
* Representing QWebEngineUrlRequestInfo:: NavigationTypeBackForward
*/
NavigationTypeBackForward(3),
/**
* Representing QWebEngineUrlRequestInfo:: NavigationTypeReload
*/
NavigationTypeReload(4),
/**
* Representing QWebEngineUrlRequestInfo:: NavigationTypeOther
*/
NavigationTypeOther(5),
/**
* Representing QWebEngineUrlRequestInfo:: NavigationTypeRedirect
*/
NavigationTypeRedirect(6);
static {
QtJambi_LibraryUtilities.initialize();
}
private NavigationType(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 NavigationType resolve(int value) {
switch (value) {
case 0: return NavigationTypeLink;
case 1: return NavigationTypeTyped;
case 2: return NavigationTypeFormSubmitted;
case 3: return NavigationTypeBackForward;
case 4: return NavigationTypeReload;
case 5: return NavigationTypeOther;
case 6: return NavigationTypeRedirect;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QWebEngineUrlRequestInfo::ResourceType
*/
@QtRejectedEntries({"ResourceTypeLast"})
public enum ResourceType implements QtEnumerator {
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeMainFrame
*/
ResourceTypeMainFrame(0),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeSubFrame
*/
ResourceTypeSubFrame(1),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeStylesheet
*/
ResourceTypeStylesheet(2),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeScript
*/
ResourceTypeScript(3),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeImage
*/
ResourceTypeImage(4),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeFontResource
*/
ResourceTypeFontResource(5),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeSubResource
*/
ResourceTypeSubResource(6),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeObject
*/
ResourceTypeObject(7),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeMedia
*/
ResourceTypeMedia(8),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeWorker
*/
ResourceTypeWorker(9),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeSharedWorker
*/
ResourceTypeSharedWorker(10),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypePrefetch
*/
ResourceTypePrefetch(11),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeFavicon
*/
ResourceTypeFavicon(12),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeXhr
*/
ResourceTypeXhr(13),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypePing
*/
ResourceTypePing(14),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeServiceWorker
*/
ResourceTypeServiceWorker(15),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeCspReport
*/
ResourceTypeCspReport(16),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypePluginResource
*/
ResourceTypePluginResource(17),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeNavigationPreloadMainFrame
*/
ResourceTypeNavigationPreloadMainFrame(19),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeNavigationPreloadSubFrame
*/
ResourceTypeNavigationPreloadSubFrame(20),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeLast
*/
ResourceTypeLast(20),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeWebSocket
*/
ResourceTypeWebSocket(254),
/**
* Representing QWebEngineUrlRequestInfo:: ResourceTypeUnknown
*/
ResourceTypeUnknown(255);
static {
QtJambi_LibraryUtilities.initialize();
}
private ResourceType(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 ResourceType resolve(int value) {
switch (value) {
case 0: return ResourceTypeMainFrame;
case 1: return ResourceTypeSubFrame;
case 2: return ResourceTypeStylesheet;
case 3: return ResourceTypeScript;
case 4: return ResourceTypeImage;
case 5: return ResourceTypeFontResource;
case 6: return ResourceTypeSubResource;
case 7: return ResourceTypeObject;
case 8: return ResourceTypeMedia;
case 9: return ResourceTypeWorker;
case 10: return ResourceTypeSharedWorker;
case 11: return ResourceTypePrefetch;
case 12: return ResourceTypeFavicon;
case 13: return ResourceTypeXhr;
case 14: return ResourceTypePing;
case 15: return ResourceTypeServiceWorker;
case 16: return ResourceTypeCspReport;
case 17: return ResourceTypePluginResource;
case 19: return ResourceTypeNavigationPreloadMainFrame;
case 20: return ResourceTypeNavigationPreloadSubFrame;
case 254: return ResourceTypeWebSocket;
case 255: return ResourceTypeUnknown;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QWebEngineUrlRequestInfo:: block(bool)
*/
@QtUninvokable
public final void block(boolean shouldBlock){
block_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), shouldBlock);
}
@QtUninvokable
private native void block_native_bool(long __this__nativeId, boolean shouldBlock);
/**
* See QWebEngineUrlRequestInfo:: changed()const
*/
@QtUninvokable
public final boolean changed(){
return changed_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean changed_native_constfct(long __this__nativeId);
/**
* See QWebEngineUrlRequestInfo:: firstPartyUrl()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QUrl firstPartyUrl(){
return firstPartyUrl_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QUrl firstPartyUrl_native_constfct(long __this__nativeId);
/**
* See QWebEngineUrlRequestInfo:: httpHeaders()const
* This function was introduced in Qt 6.5.
*/
@QtUninvokable
public final io.qt.core.@NonNull QHash httpHeaders(){
return httpHeaders_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QHash httpHeaders_native_constfct(long __this__nativeId);
/**
* See QWebEngineUrlRequestInfo:: initiator()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QUrl initiator(){
return initiator_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QUrl initiator_native_constfct(long __this__nativeId);
/**
* See QWebEngineUrlRequestInfo:: navigationType()const
*/
@QtUninvokable
public final io.qt.webengine.core.QWebEngineUrlRequestInfo.@NonNull NavigationType navigationType(){
return io.qt.webengine.core.QWebEngineUrlRequestInfo.NavigationType.resolve(navigationType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int navigationType_native_constfct(long __this__nativeId);
/**
* See QWebEngineUrlRequestInfo:: redirect(QUrl)
*/
@QtUninvokable
public final void redirect(io.qt.core.@NonNull QUrl url){
redirect_native_cref_QUrl(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(url));
}
@QtUninvokable
private native void redirect_native_cref_QUrl(long __this__nativeId, long url);
/**
* See QWebEngineUrlRequestInfo:: requestMethod()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QByteArray requestMethod(){
return requestMethod_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QByteArray requestMethod_native_constfct(long __this__nativeId);
/**
* See QWebEngineUrlRequestInfo:: requestUrl()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QUrl requestUrl(){
return requestUrl_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QUrl requestUrl_native_constfct(long __this__nativeId);
/**
* See QWebEngineUrlRequestInfo:: resourceType()const
*/
@QtUninvokable
public final io.qt.webengine.core.QWebEngineUrlRequestInfo.@NonNull ResourceType resourceType(){
return io.qt.webengine.core.QWebEngineUrlRequestInfo.ResourceType.resolve(resourceType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int resourceType_native_constfct(long __this__nativeId);
/**
* See QWebEngineUrlRequestInfo:: setHttpHeader(QByteArray, QByteArray)
*/
@QtUninvokable
public final void setHttpHeader(io.qt.core.@NonNull QByteArray name, io.qt.core.@NonNull QByteArray value){
setHttpHeader_native_cref_QByteArray_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(name), QtJambi_LibraryUtilities.internal.checkedNativeId(value));
}
@QtUninvokable
private native void setHttpHeader_native_cref_QByteArray_cref_QByteArray(long __this__nativeId, long name, long value);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
private QWebEngineUrlRequestInfo(QPrivateConstructor p) { super(p); }
/**
* Overloaded function for {@link #redirect(io.qt.core.QUrl)}.
*/
@QtUninvokable
public final void redirect(java.lang.@NonNull String url) {
redirect(new io.qt.core.QUrl(url));
}
/**
* Overloaded function for {@link #setHttpHeader(io.qt.core.QByteArray, io.qt.core.QByteArray)}.
*/
@QtUninvokable
public final void setHttpHeader(byte @NonNull[] name, io.qt.core.@NonNull QByteArray value) {
setHttpHeader(new io.qt.core.QByteArray(name), value);
}
/**
* Overloaded function for {@link #setHttpHeader(io.qt.core.QByteArray, io.qt.core.QByteArray)}.
*/
@QtUninvokable
public final void setHttpHeader(io.qt.core.@NonNull QByteArray name, byte @NonNull[] value) {
setHttpHeader(name, new io.qt.core.QByteArray(value));
}
/**
* Overloaded function for {@link #setHttpHeader(io.qt.core.QByteArray, io.qt.core.QByteArray)}.
*/
@QtUninvokable
public final void setHttpHeader(byte @NonNull[] name, byte @NonNull[] value) {
setHttpHeader(new io.qt.core.QByteArray(name), new io.qt.core.QByteArray(value));
}
}