io.qt.webengine.core.QWebEngineHttpRequest Maven / Gradle / Ivy
Show all versions of qtjambi-webenginecore-jre8 Show documentation
package io.qt.webengine.core;
/**
* Holds a request to be sent with WebEngine
* Java wrapper for Qt class QWebEngineHttpRequest
*/
public class QWebEngineHttpRequest extends io.qt.QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QWebEngineHttpRequest::Method
*/
public enum Method implements io.qt.QtEnumerator {
Get(0),
Post(1);
private Method(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 Method resolve(int value) {
switch (value) {
case 0: return Get;
case 1: return Post;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* 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.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);
}
/**
* See QWebEngineHttpRequest::QWebEngineHttpRequest(QUrl,QWebEngineHttpRequest::Method)
*/
public QWebEngineHttpRequest(io.qt.core.QUrl url, io.qt.webengine.core.QWebEngineHttpRequest.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)
*/
public QWebEngineHttpRequest(io.qt.webengine.core.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
*/
@io.qt.QtUninvokable
public final boolean hasHeader(io.qt.core.QByteArray headerName){
return hasHeader_native_cref_QByteArray_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(headerName));
}
@io.qt.QtUninvokable
private native boolean hasHeader_native_cref_QByteArray_constfct(long __this__nativeId, long headerName);
/**
* See QWebEngineHttpRequest::header(QByteArray)const
*/
@io.qt.QtUninvokable
public final io.qt.core.QByteArray header(io.qt.core.QByteArray headerName){
return header_native_cref_QByteArray_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(headerName));
}
@io.qt.QtUninvokable
private native io.qt.core.QByteArray header_native_cref_QByteArray_constfct(long __this__nativeId, long headerName);
/**
* See QWebEngineHttpRequest::headers()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QList headers(){
return headers_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QList headers_native_constfct(long __this__nativeId);
/**
* See QWebEngineHttpRequest::method()const
*/
@io.qt.QtUninvokable
public final io.qt.webengine.core.QWebEngineHttpRequest.Method method(){
return io.qt.webengine.core.QWebEngineHttpRequest.Method.resolve(method_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int method_native_constfct(long __this__nativeId);
/**
* See QWebEngineHttpRequest::operator=(QWebEngineHttpRequest)
*/
@io.qt.QtUninvokable
public final void set(io.qt.webengine.core.QWebEngineHttpRequest other){
set_native_cref_QWebEngineHttpRequest(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@io.qt.QtUninvokable
private native void set_native_cref_QWebEngineHttpRequest(long __this__nativeId, long other);
/**
* See QWebEngineHttpRequest::operator==(QWebEngineHttpRequest)const
*/
@io.qt.QtUninvokable
private final boolean operator_equal(io.qt.webengine.core.QWebEngineHttpRequest other){
return operator_equal_native_cref_QWebEngineHttpRequest_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@io.qt.QtUninvokable
private native boolean operator_equal_native_cref_QWebEngineHttpRequest_constfct(long __this__nativeId, long other);
/**
* See QWebEngineHttpRequest::postData()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QByteArray postData(){
return postData_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QByteArray postData_native_constfct(long __this__nativeId);
/**
* See QWebEngineHttpRequest::setHeader(QByteArray,QByteArray)
*/
@io.qt.QtUninvokable
public final void setHeader(io.qt.core.QByteArray headerName, io.qt.core.QByteArray value){
setHeader_native_cref_QByteArray_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(headerName), QtJambi_LibraryUtilities.internal.checkedNativeId(value));
}
@io.qt.QtUninvokable
private native void setHeader_native_cref_QByteArray_cref_QByteArray(long __this__nativeId, long headerName, long value);
/**
* See QWebEngineHttpRequest::setMethod(QWebEngineHttpRequest::Method)
*/
@io.qt.QtUninvokable
public final void setMethod(io.qt.webengine.core.QWebEngineHttpRequest.Method method){
setMethod_native_QWebEngineHttpRequest_Method(QtJambi_LibraryUtilities.internal.nativeId(this), method.value());
}
@io.qt.QtUninvokable
private native void setMethod_native_QWebEngineHttpRequest_Method(long __this__nativeId, int method);
/**
* See QWebEngineHttpRequest::setPostData(QByteArray)
*/
@io.qt.QtUninvokable
public final void setPostData(io.qt.core.QByteArray postData){
setPostData_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(postData));
}
@io.qt.QtUninvokable
private native void setPostData_native_cref_QByteArray(long __this__nativeId, long postData);
/**
* See QWebEngineHttpRequest::setUrl(QUrl)
*/
@io.qt.QtUninvokable
public final void setUrl(io.qt.core.QUrl url){
setUrl_native_cref_QUrl(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(url));
}
@io.qt.QtUninvokable
private native void setUrl_native_cref_QUrl(long __this__nativeId, long url);
/**
* See QWebEngineHttpRequest::swap(QWebEngineHttpRequest&)
*/
@io.qt.QtUninvokable
public final void swap(io.qt.webengine.core.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));
}
@io.qt.QtUninvokable
private native void swap_native_ref_QWebEngineHttpRequest(long __this__nativeId, long other);
/**
* See QWebEngineHttpRequest::unsetHeader(QByteArray)
*/
@io.qt.QtUninvokable
public final void unsetHeader(io.qt.core.QByteArray headerName){
unsetHeader_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(headerName));
}
@io.qt.QtUninvokable
private native void unsetHeader_native_cref_QByteArray(long __this__nativeId, long headerName);
/**
* See QWebEngineHttpRequest::url()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QUrl url(){
return url_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QUrl url_native_constfct(long __this__nativeId);
/**
* See QWebEngineHttpRequest::postRequest(QUrl,QMap<QString,QString>)
*/
public static io.qt.webengine.core.QWebEngineHttpRequest postRequest(io.qt.core.QUrl url, java.util.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
.
*/
@io.qt.NativeAccess
protected QWebEngineHttpRequest(QPrivateConstructor p) { super(p); }
@Override
@io.qt.QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.webengine.core.QWebEngineHttpRequest) {
return operator_equal((io.qt.webengine.core.QWebEngineHttpRequest) other);
}
return false;
}
@io.qt.QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native static int hashCode_native(long __this_nativeId);
@Override
public QWebEngineHttpRequest clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native QWebEngineHttpRequest clone_native(long __this_nativeId);
}