All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.webengine.core.QWebEngineHttpRequest Maven / Gradle / Ivy

Go to download

Provides public API shared by both modules {@code qtjambi.webenginequick} and {@code qtjambi.webenginewidgets}.

There is a newer version: 6.7.2
Show newest version
package io.qt.webengine.core;

import io.qt.*;


/**
 * 

Holds a request to be sent with WebEngine

*

Java wrapper for Qt class QWebEngineHttpRequest

*/ public class QWebEngineHttpRequest extends QtObject implements java.lang.Cloneable { static { QtJambi_LibraryUtilities.initialize(); } /** *

Java wrapper for Qt enum QWebEngineHttpRequest::Method

*/ public enum Method implements QtEnumerator { /** *

Representing QWebEngineHttpRequest::Get

*/ Get(0), /** *

Representing QWebEngineHttpRequest::Post

*/ Post(1); static { QtJambi_LibraryUtilities.initialize(); } private Method(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 Method resolve(int value) { switch (value) { case 0: return Get; case 1: return Post; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

See QWebEngineHttpRequest::QWebEngineHttpRequest(QUrl,QWebEngineHttpRequest::Method)

* @param url * @param method */ public QWebEngineHttpRequest(io.qt.core.@NonNull QUrl url, io.qt.webengine.core.QWebEngineHttpRequest.@NonNull Method method){ super((QPrivateConstructor)null); initialize_native(this, url, method); } private native static void initialize_native(QWebEngineHttpRequest instance, io.qt.core.QUrl url, io.qt.webengine.core.QWebEngineHttpRequest.Method method); /** *

See QWebEngineHttpRequest::QWebEngineHttpRequest(QWebEngineHttpRequest)

* @param other */ public QWebEngineHttpRequest(io.qt.webengine.core.@NonNull QWebEngineHttpRequest other){ super((QPrivateConstructor)null); initialize_native(this, other); } private native static void initialize_native(QWebEngineHttpRequest instance, io.qt.webengine.core.QWebEngineHttpRequest other); /** *

See QWebEngineHttpRequest::hasHeader(QByteArray)const

* @param headerName * @return */ @QtUninvokable public final boolean hasHeader(io.qt.core.@NonNull QByteArray headerName){ return hasHeader_native_cref_QByteArray_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(headerName)); } @QtUninvokable private native boolean hasHeader_native_cref_QByteArray_constfct(long __this__nativeId, long headerName); /** *

See QWebEngineHttpRequest::header(QByteArray)const

* @param headerName * @return */ @QtUninvokable public final io.qt.core.@NonNull QByteArray header(io.qt.core.@NonNull QByteArray headerName){ return header_native_cref_QByteArray_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(headerName)); } @QtUninvokable private native io.qt.core.QByteArray header_native_cref_QByteArray_constfct(long __this__nativeId, long headerName); /** *

See QWebEngineHttpRequest::headers()const

* @return */ @QtUninvokable public final io.qt.core.@NonNull QList headers(){ return headers_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QList headers_native_constfct(long __this__nativeId); /** *

See QWebEngineHttpRequest::method()const

* @return */ @QtUninvokable public final io.qt.webengine.core.QWebEngineHttpRequest.@NonNull Method method(){ return io.qt.webengine.core.QWebEngineHttpRequest.Method.resolve(method_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int method_native_constfct(long __this__nativeId); /** *

See QWebEngineHttpRequest::operator=(QWebEngineHttpRequest)

* @param other */ @QtUninvokable public final void assign(io.qt.webengine.core.@NonNull QWebEngineHttpRequest other){ assign_native_cref_QWebEngineHttpRequest(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @QtUninvokable private native void assign_native_cref_QWebEngineHttpRequest(long __this__nativeId, long other); /** *

See QWebEngineHttpRequest::operator==(QWebEngineHttpRequest)const

* @param other * @return */ @QtUninvokable public final boolean equals(io.qt.webengine.core.@NonNull QWebEngineHttpRequest other){ return equals_native_cref_QWebEngineHttpRequest_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @QtUninvokable private native boolean equals_native_cref_QWebEngineHttpRequest_constfct(long __this__nativeId, long other); /** *

See QWebEngineHttpRequest::postData()const

* @return */ @QtUninvokable public final io.qt.core.@NonNull QByteArray postData(){ return postData_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QByteArray postData_native_constfct(long __this__nativeId); /** *

See QWebEngineHttpRequest::setHeader(QByteArray,QByteArray)

* @param headerName * @param value */ @QtUninvokable public final void setHeader(io.qt.core.@NonNull QByteArray headerName, io.qt.core.@NonNull QByteArray value){ setHeader_native_cref_QByteArray_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(headerName), QtJambi_LibraryUtilities.internal.checkedNativeId(value)); } @QtUninvokable private native void setHeader_native_cref_QByteArray_cref_QByteArray(long __this__nativeId, long headerName, long value); /** *

See QWebEngineHttpRequest::setMethod(QWebEngineHttpRequest::Method)

* @param method */ @QtUninvokable public final void setMethod(io.qt.webengine.core.QWebEngineHttpRequest.@NonNull Method method){ setMethod_native_QWebEngineHttpRequest_Method(QtJambi_LibraryUtilities.internal.nativeId(this), method.value()); } @QtUninvokable private native void setMethod_native_QWebEngineHttpRequest_Method(long __this__nativeId, int method); /** *

See QWebEngineHttpRequest::setPostData(QByteArray)

* @param postData */ @QtUninvokable public final void setPostData(io.qt.core.@NonNull QByteArray postData){ setPostData_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(postData)); } @QtUninvokable private native void setPostData_native_cref_QByteArray(long __this__nativeId, long postData); /** *

See QWebEngineHttpRequest::setUrl(QUrl)

* @param url */ @QtUninvokable public final void setUrl(io.qt.core.@NonNull QUrl url){ setUrl_native_cref_QUrl(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(url)); } @QtUninvokable private native void setUrl_native_cref_QUrl(long __this__nativeId, long url); /** *

See QWebEngineHttpRequest::swap(QWebEngineHttpRequest&)

* @param other */ @QtUninvokable public final void swap(io.qt.webengine.core.@StrictNonNull QWebEngineHttpRequest other){ java.util.Objects.requireNonNull(other, "Argument 'other': null not expected."); swap_native_ref_QWebEngineHttpRequest(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @QtUninvokable private native void swap_native_ref_QWebEngineHttpRequest(long __this__nativeId, long other); /** *

See QWebEngineHttpRequest::unsetHeader(QByteArray)

* @param headerName */ @QtUninvokable public final void unsetHeader(io.qt.core.@NonNull QByteArray headerName){ unsetHeader_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(headerName)); } @QtUninvokable private native void unsetHeader_native_cref_QByteArray(long __this__nativeId, long headerName); /** *

See QWebEngineHttpRequest::url()const

* @return */ @QtUninvokable public final io.qt.core.@NonNull QUrl url(){ return url_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QUrl url_native_constfct(long __this__nativeId); /** *

See QWebEngineHttpRequest::postRequest(QUrl,QMap<QString,QString>)

* @param url * @param postData * @return */ public static io.qt.webengine.core.@NonNull QWebEngineHttpRequest postRequest(io.qt.core.@NonNull QUrl url, java.util.@NonNull Map postData){ return postRequest_native_cref_QUrl_cref_QMap(QtJambi_LibraryUtilities.internal.checkedNativeId(url), postData); } private native static io.qt.webengine.core.QWebEngineHttpRequest postRequest_native_cref_QUrl_cref_QMap(long url, java.util.Map postData); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QWebEngineHttpRequest(QPrivateConstructor p) { super(p); } /** *

See QWebEngineHttpRequest::operator==(QWebEngineHttpRequest)const

*/ @Override @QtUninvokable public boolean equals(Object other) { if (other==null || other instanceof io.qt.webengine.core.QWebEngineHttpRequest) { return equals((io.qt.webengine.core.QWebEngineHttpRequest) other); } return false; } /** * Returns the objects's hash code computed by qHash(QWebEngineHttpRequest). */ @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 QWebEngineHttpRequest::QWebEngineHttpRequest(QWebEngineHttpRequest)

*/ @QtUninvokable @Override public QWebEngineHttpRequest clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private static native QWebEngineHttpRequest clone_native(long __this_nativeId); /** *

Overloaded constructor for {@link #QWebEngineHttpRequest(io.qt.core.QUrl, io.qt.webengine.core.QWebEngineHttpRequest.Method)} * with method = io.qt.webengine.core.QWebEngineHttpRequest.Method.Get.

*/ public QWebEngineHttpRequest(io.qt.core.@NonNull QUrl url) { this(url, io.qt.webengine.core.QWebEngineHttpRequest.Method.Get); } /** *

Overloaded constructor for {@link #QWebEngineHttpRequest(io.qt.core.QUrl, io.qt.webengine.core.QWebEngineHttpRequest.Method)}

*

with:

    *
  • url = new io.qt.core.QUrl()
  • *
  • method = io.qt.webengine.core.QWebEngineHttpRequest.Method.Get
  • *
*/ public QWebEngineHttpRequest() { this(new io.qt.core.QUrl(), io.qt.webengine.core.QWebEngineHttpRequest.Method.Get); } /** *

Overloaded constructor for {@link #QWebEngineHttpRequest(java.lang.String, io.qt.webengine.core.QWebEngineHttpRequest.Method)} * with method = io.qt.webengine.core.QWebEngineHttpRequest.Method.Get.

*/ public QWebEngineHttpRequest(java.lang.@NonNull String url) { this(url, io.qt.webengine.core.QWebEngineHttpRequest.Method.Get); } /** *

Overloaded constructor for {@link #QWebEngineHttpRequest(io.qt.core.QUrl, io.qt.webengine.core.QWebEngineHttpRequest.Method)}.

*/ public QWebEngineHttpRequest(java.lang.@NonNull String url, io.qt.webengine.core.QWebEngineHttpRequest.@NonNull Method method) { this(new io.qt.core.QUrl(url), method); } /** *

Overloaded function for {@link #hasHeader(io.qt.core.QByteArray)}.

*/ @QtUninvokable public final boolean hasHeader(byte @NonNull[] headerName) { return hasHeader(new io.qt.core.QByteArray(headerName)); } /** *

Overloaded function for {@link #header(io.qt.core.QByteArray)}.

*/ @QtUninvokable public final io.qt.core.@NonNull QByteArray header(byte @NonNull[] headerName) { return header(new io.qt.core.QByteArray(headerName)); } /** * @deprecated Use {@link #assign(io.qt.webengine.core.QWebEngineHttpRequest)} instead. */ @Deprecated @QtUninvokable public final void set(io.qt.webengine.core.@NonNull QWebEngineHttpRequest other) { assign(other); } /** *

Overloaded function for {@link #setHeader(io.qt.core.QByteArray, io.qt.core.QByteArray)}.

*/ @QtUninvokable public final void setHeader(byte @NonNull[] headerName, io.qt.core.@NonNull QByteArray value) { setHeader(new io.qt.core.QByteArray(headerName), value); } /** *

Overloaded function for {@link #setHeader(io.qt.core.QByteArray, io.qt.core.QByteArray)}.

*/ @QtUninvokable public final void setHeader(io.qt.core.@NonNull QByteArray headerName, byte @NonNull[] value) { setHeader(headerName, new io.qt.core.QByteArray(value)); } /** *

Overloaded function for {@link #setHeader(io.qt.core.QByteArray, io.qt.core.QByteArray)}.

*/ @QtUninvokable public final void setHeader(byte @NonNull[] headerName, byte @NonNull[] value) { setHeader(new io.qt.core.QByteArray(headerName), new io.qt.core.QByteArray(value)); } /** *

Overloaded function for {@link #setPostData(io.qt.core.QByteArray)}.

*/ @QtUninvokable public final void setPostData(byte @NonNull[] postData) { setPostData(new io.qt.core.QByteArray(postData)); } /** *

Overloaded function for {@link #setUrl(io.qt.core.QUrl)}.

*/ @QtUninvokable public final void setUrl(java.lang.@NonNull String url) { setUrl(new io.qt.core.QUrl(url)); } /** *

Overloaded function for {@link #unsetHeader(io.qt.core.QByteArray)}.

*/ @QtUninvokable public final void unsetHeader(byte @NonNull[] headerName) { unsetHeader(new io.qt.core.QByteArray(headerName)); } /** *

Overloaded function for {@link #postRequest(io.qt.core.QUrl, java.util.Map)}.

*/ public static io.qt.webengine.core.@NonNull QWebEngineHttpRequest postRequest(java.lang.@NonNull String url, java.util.@NonNull Map postData) { return postRequest(new io.qt.core.QUrl(url), postData); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy