io.qt.websockets.QWebSocketHandshakeOptions Maven / Gradle / Ivy
Show all versions of qtjambi-websockets Show documentation
package io.qt.websockets;
import io.qt.*;
/**
* Collects options for the WebSocket handshake
* Java wrapper for Qt class QWebSocketHandshakeOptions
* @since This class was introduced in Qt 6.4.
*/
public class QWebSocketHandshakeOptions extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Constructs an empty QWebSocketHandshakeOptions object
* See QWebSocketHandshakeOptions:: QWebSocketHandshakeOptions()
*/
public QWebSocketHandshakeOptions(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QWebSocketHandshakeOptions instance);
/**
* Constructs a QWebSocketHandshakeOptions that is a copy of other
* See QWebSocketHandshakeOptions:: QWebSocketHandshakeOptions(QWebSocketHandshakeOptions)
* @param other
*/
public QWebSocketHandshakeOptions(io.qt.websockets.@NonNull QWebSocketHandshakeOptions other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QWebSocketHandshakeOptions instance, io.qt.websockets.QWebSocketHandshakeOptions other);
@QtUninvokable
private final boolean operator_not_equal(io.qt.websockets.@NonNull QWebSocketHandshakeOptions rhs){
return operator_not_equal_native_cref_QWebSocketHandshakeOptions(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs));
}
@QtUninvokable
private native boolean operator_not_equal_native_cref_QWebSocketHandshakeOptions(long __this__nativeId, long rhs);
/**
* Assigns other to this object
* See QWebSocketHandshakeOptions:: operator=(QWebSocketHandshakeOptions)
* @param other
*/
@QtUninvokable
public final void assign(io.qt.websockets.@NonNull QWebSocketHandshakeOptions other){
assign_native_cref_QWebSocketHandshakeOptions(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void assign_native_cref_QWebSocketHandshakeOptions(long __this__nativeId, long other);
/**
* Sets the list of WebSocket subprotocols protocols to send along with the websocket handshake
* See QWebSocketHandshakeOptions:: setSubprotocols(QStringList)
* @param protocols
*/
@QtUninvokable
public final void setSubprotocols(java.util.@NonNull Collection protocols){
setSubprotocols_native_cref_QStringList(QtJambi_LibraryUtilities.internal.nativeId(this), protocols);
}
@QtUninvokable
private native void setSubprotocols_native_cref_QStringList(long __this__nativeId, java.util.Collection protocols);
/**
* Returns the list of WebSocket subprotocols to send along with the websocket handshake
* See QWebSocketHandshakeOptions:: subprotocols()const
* @return
*/
@QtUninvokable
public final io.qt.core.@NonNull QStringList subprotocols(){
return subprotocols_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QStringList subprotocols_native_constfct(long __this__nativeId);
/**
* See QWebSocketHandshakeOptions:: swap(QWebSocketHandshakeOptions&)
* @param other
*/
@QtUninvokable
public final void swap(io.qt.websockets.@StrictNonNull QWebSocketHandshakeOptions other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
swap_native_ref_QWebSocketHandshakeOptions(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void swap_native_ref_QWebSocketHandshakeOptions(long __this__nativeId, long other);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QWebSocketHandshakeOptions(QPrivateConstructor p) { super(p); }
/**
* See operator!=(QWebSocketHandshakeOptions, QWebSocketHandshakeOptions)
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other==null || other instanceof io.qt.websockets.QWebSocketHandshakeOptions) {
return !operator_not_equal((io.qt.websockets.QWebSocketHandshakeOptions) other);
}
return false;
}
/**
* Returns the objects's hash code computed by qHash(QWebSocketHandshakeOptions)
.
*/
@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 QWebSocketHandshakeOptions:: QWebSocketHandshakeOptions(QWebSocketHandshakeOptions)
*/
@QtUninvokable
@Override
public QWebSocketHandshakeOptions clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QWebSocketHandshakeOptions clone_native(long __this_nativeId);
/**
* @deprecated Use {@link #assign(io.qt.websockets.QWebSocketHandshakeOptions)} instead.
*/
@Deprecated
@QtUninvokable
public final void set(io.qt.websockets.@NonNull QWebSocketHandshakeOptions other) {
assign(other);
}
}