io.qt.bluetooth.QLowEnergyAdvertisingData Maven / Gradle / Ivy
package io.qt.bluetooth;
import io.qt.*;
/**
* Represents the data to be broadcast during Bluetooth Low Energy advertising
* Java wrapper for Qt class QLowEnergyAdvertisingData
*/
public class QLowEnergyAdvertisingData extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QLowEnergyAdvertisingData::Discoverability
*/
public enum Discoverability implements QtEnumerator {
/**
* Representing QLowEnergyAdvertisingData:: DiscoverabilityNone
*/
DiscoverabilityNone(0),
/**
* Representing QLowEnergyAdvertisingData:: DiscoverabilityLimited
*/
DiscoverabilityLimited(1),
/**
* Representing QLowEnergyAdvertisingData:: DiscoverabilityGeneral
*/
DiscoverabilityGeneral(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private Discoverability(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 @NonNull Discoverability resolve(int value) {
switch (value) {
case 0: return DiscoverabilityNone;
case 1: return DiscoverabilityLimited;
case 2: return DiscoverabilityGeneral;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QLowEnergyAdvertisingData:: QLowEnergyAdvertisingData()
*/
public QLowEnergyAdvertisingData(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QLowEnergyAdvertisingData instance);
/**
* See QLowEnergyAdvertisingData:: QLowEnergyAdvertisingData(QLowEnergyAdvertisingData)
*/
public QLowEnergyAdvertisingData(io.qt.bluetooth.@NonNull QLowEnergyAdvertisingData other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QLowEnergyAdvertisingData instance, io.qt.bluetooth.QLowEnergyAdvertisingData other);
/**
* See QLowEnergyAdvertisingData:: discoverability()const
*/
@QtUninvokable
public final io.qt.bluetooth.QLowEnergyAdvertisingData.@NonNull Discoverability discoverability(){
return io.qt.bluetooth.QLowEnergyAdvertisingData.Discoverability.resolve(discoverability_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int discoverability_native_constfct(long __this__nativeId);
/**
* See QLowEnergyAdvertisingData:: includePowerLevel()const
*/
@QtUninvokable
public final boolean includePowerLevel(){
return includePowerLevel_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean includePowerLevel_native_constfct(long __this__nativeId);
/**
* See QLowEnergyAdvertisingData:: localName()const
*/
@QtUninvokable
public final java.lang.@NonNull String localName(){
return localName_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String localName_native_constfct(long __this__nativeId);
/**
* See QLowEnergyAdvertisingData:: manufacturerData()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QByteArray manufacturerData(){
return manufacturerData_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QByteArray manufacturerData_native_constfct(long __this__nativeId);
/**
* See QLowEnergyAdvertisingData:: manufacturerId()const
*/
@QtUninvokable
public final short manufacturerId(){
return manufacturerId_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native short manufacturerId_native_constfct(long __this__nativeId);
/**
* See QLowEnergyAdvertisingData:: operator=(QLowEnergyAdvertisingData)
*/
@QtUninvokable
public final void assign(io.qt.bluetooth.@NonNull QLowEnergyAdvertisingData other){
assign_native_cref_QLowEnergyAdvertisingData(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void assign_native_cref_QLowEnergyAdvertisingData(long __this__nativeId, long other);
/**
* See operator==(QLowEnergyAdvertisingData, QLowEnergyAdvertisingData)
*/
@QtUninvokable
public final boolean equals(io.qt.bluetooth.@NonNull QLowEnergyAdvertisingData data2){
return equals_native_cref_QLowEnergyAdvertisingData(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(data2));
}
@QtUninvokable
private native boolean equals_native_cref_QLowEnergyAdvertisingData(long __this__nativeId, long data2);
/**
* See QLowEnergyAdvertisingData:: rawData()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QByteArray rawData(){
return rawData_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QByteArray rawData_native_constfct(long __this__nativeId);
/**
* See QLowEnergyAdvertisingData:: services()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QList services(){
return services_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QList services_native_constfct(long __this__nativeId);
/**
* See QLowEnergyAdvertisingData:: setDiscoverability(QLowEnergyAdvertisingData::Discoverability)
*/
@QtUninvokable
public final void setDiscoverability(io.qt.bluetooth.QLowEnergyAdvertisingData.@NonNull Discoverability mode){
setDiscoverability_native_QLowEnergyAdvertisingData_Discoverability(QtJambi_LibraryUtilities.internal.nativeId(this), mode.value());
}
@QtUninvokable
private native void setDiscoverability_native_QLowEnergyAdvertisingData_Discoverability(long __this__nativeId, int mode);
/**
* See QLowEnergyAdvertisingData:: setIncludePowerLevel(bool)
*/
@QtUninvokable
public final void setIncludePowerLevel(boolean doInclude){
setIncludePowerLevel_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), doInclude);
}
@QtUninvokable
private native void setIncludePowerLevel_native_bool(long __this__nativeId, boolean doInclude);
/**
* See QLowEnergyAdvertisingData:: setLocalName(QString)
*/
@QtUninvokable
public final void setLocalName(java.lang.@NonNull String name){
setLocalName_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), name);
}
@QtUninvokable
private native void setLocalName_native_cref_QString(long __this__nativeId, java.lang.String name);
/**
* See QLowEnergyAdvertisingData:: setManufacturerData(quint16, QByteArray)
*/
@QtUninvokable
public final void setManufacturerData(short id, io.qt.core.@NonNull QByteArray data){
setManufacturerData_native_quint16_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), id, QtJambi_LibraryUtilities.internal.checkedNativeId(data));
}
@QtUninvokable
private native void setManufacturerData_native_quint16_cref_QByteArray(long __this__nativeId, short id, long data);
/**
* See QLowEnergyAdvertisingData:: setRawData(QByteArray)
*/
@QtUninvokable
public final void setRawData(io.qt.core.@NonNull QByteArray data){
setRawData_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(data));
}
@QtUninvokable
private native void setRawData_native_cref_QByteArray(long __this__nativeId, long data);
/**
* See QLowEnergyAdvertisingData:: setServices(QList<QBluetoothUuid>)
*/
@QtUninvokable
public final void setServices(java.util.@NonNull Collection extends io.qt.bluetooth.@NonNull QBluetoothUuid> services){
setServices_native_cref_QList(QtJambi_LibraryUtilities.internal.nativeId(this), services);
}
@QtUninvokable
private native void setServices_native_cref_QList(long __this__nativeId, java.util.Collection extends io.qt.bluetooth.QBluetoothUuid> services);
/**
* See QLowEnergyAdvertisingData:: swap(QLowEnergyAdvertisingData&)
*/
@QtUninvokable
public final void swap(io.qt.bluetooth.@StrictNonNull QLowEnergyAdvertisingData other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
swap_native_ref_QLowEnergyAdvertisingData(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void swap_native_ref_QLowEnergyAdvertisingData(long __this__nativeId, long other);
/**
* See QLowEnergyAdvertisingData:: invalidManufacturerId()
*/
public native static short invalidManufacturerId();
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QLowEnergyAdvertisingData(QPrivateConstructor p) { super(p); }
/**
* See operator==(QLowEnergyAdvertisingData, QLowEnergyAdvertisingData)
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.bluetooth.QLowEnergyAdvertisingData) {
return equals((io.qt.bluetooth.QLowEnergyAdvertisingData) other);
}
return false;
}
/**
* Returns the objects's hash code computed by qHash(QLowEnergyAdvertisingData)
.
*/
@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.
*/
@QtUninvokable
@Override
public QLowEnergyAdvertisingData clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QLowEnergyAdvertisingData clone_native(long __this_nativeId);
/**
* Overloaded function for {@link #setManufacturerData(short, io.qt.core.QByteArray)}.
*/
@QtUninvokable
public final void setManufacturerData(short id, byte @NonNull[] data) {
setManufacturerData(id, new io.qt.core.QByteArray(data));
}
/**
* Overloaded function for {@link #setRawData(io.qt.core.QByteArray)}.
*/
@QtUninvokable
public final void setRawData(byte @NonNull[] data) {
setRawData(new io.qt.core.QByteArray(data));
}
}