io.qt.bluetooth.QBluetoothDeviceDiscoveryAgent Maven / Gradle / Ivy
package io.qt.bluetooth;
import io.qt.*;
/**
* Discovers the Bluetooth devices nearby
* Java wrapper for Qt class QBluetoothDeviceDiscoveryAgent
*/
public class QBluetoothDeviceDiscoveryAgent extends io.qt.core.QObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QBluetoothDeviceDiscoveryAgent.class);
/**
* Java wrapper for Qt enum QBluetoothDeviceDiscoveryAgent::DiscoveryMethod
*
* @see DiscoveryMethods
*/
public enum DiscoveryMethod implements QtFlagEnumerator {
/**
* Representing QBluetoothDeviceDiscoveryAgent:: NoMethod
*/
NoMethod(0),
/**
* Representing QBluetoothDeviceDiscoveryAgent:: ClassicMethod
*/
ClassicMethod(1),
/**
* Representing QBluetoothDeviceDiscoveryAgent:: LowEnergyMethod
*/
LowEnergyMethod(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private DiscoveryMethod(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public @NonNull DiscoveryMethods asFlags() {
return new DiscoveryMethods(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull DiscoveryMethods combined(@NonNull DiscoveryMethod e) {
return asFlags().setFlag(e, true);
}
/**
* Excludes other enum entry from a flag of this entry.
* @param e enum entry
* @return new flag
*/
public @NonNull DiscoveryMethods cleared(@NonNull DiscoveryMethod e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link DiscoveryMethods} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull DiscoveryMethods flags(@Nullable DiscoveryMethod @NonNull... values) {
return new DiscoveryMethods(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull DiscoveryMethod resolve(int value) {
switch (value) {
case 0: return NoMethod;
case 1: return ClassicMethod;
case 2: return LowEnergyMethod;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* {@link QFlags} type for enum {@link DiscoveryMethod}
*/
public static final class DiscoveryMethods extends QFlags implements Comparable {
private static final long serialVersionUID = 0x36f0387770090533L;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new DiscoveryMethods where the flags in args
are set.
* @param args enum entries
*/
public DiscoveryMethods(@Nullable DiscoveryMethod @NonNull... args){
super(args);
}
/**
* Creates a new DiscoveryMethods with given value
.
* @param value
*/
public DiscoveryMethods(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new DiscoveryMethods
*/
@Override
public final @NonNull DiscoveryMethods combined(@StrictNonNull DiscoveryMethod e){
return new DiscoveryMethods(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final @NonNull DiscoveryMethods setFlag(@Nullable DiscoveryMethod e){
return setFlag(e, true);
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
public final @NonNull DiscoveryMethods setFlag(@Nullable DiscoveryMethod e, boolean on){
if (on) {
setValue(value() | e.value());
}else {
setValue(value() & ~e.value());
}
return this;
}
/**
* Returns an array of flag objects represented by this DiscoveryMethods.
* @return array of enum entries
*/
@Override
public final @NonNull DiscoveryMethod @NonNull[] flags(){
return super.flags(DiscoveryMethod.values());
}
/**
* {@inheritDoc}
*/
@Override
public final @NonNull DiscoveryMethods clone(){
return new DiscoveryMethods(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(@StrictNonNull DiscoveryMethods other){
return Integer.compare(value(), other.value());
}
}
/**
* Java wrapper for Qt enum QBluetoothDeviceDiscoveryAgent::Error
*/
public enum Error implements QtEnumerator {
/**
* Representing QBluetoothDeviceDiscoveryAgent:: NoError
*/
NoError(0),
/**
* Representing QBluetoothDeviceDiscoveryAgent:: InputOutputError
*/
InputOutputError(1),
/**
* Representing QBluetoothDeviceDiscoveryAgent:: PoweredOffError
*/
PoweredOffError(2),
/**
* Representing QBluetoothDeviceDiscoveryAgent:: InvalidBluetoothAdapterError
*/
InvalidBluetoothAdapterError(3),
/**
* Representing QBluetoothDeviceDiscoveryAgent:: UnsupportedPlatformError
*/
UnsupportedPlatformError(4),
/**
* Representing QBluetoothDeviceDiscoveryAgent:: UnsupportedDiscoveryMethod
*/
UnsupportedDiscoveryMethod(5),
/**
* Representing QBluetoothDeviceDiscoveryAgent:: UnknownError
*/
UnknownError(100);
static {
QtJambi_LibraryUtilities.initialize();
}
private Error(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 Error resolve(int value) {
switch (value) {
case 0: return NoError;
case 1: return InputOutputError;
case 2: return PoweredOffError;
case 3: return InvalidBluetoothAdapterError;
case 4: return UnsupportedPlatformError;
case 5: return UnsupportedDiscoveryMethod;
case 100: return UnknownError;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QBluetoothDeviceDiscoveryAgent::InquiryType
*/
public enum InquiryType implements QtEnumerator {
/**
* Representing QBluetoothDeviceDiscoveryAgent:: GeneralUnlimitedInquiry
*/
GeneralUnlimitedInquiry(0),
/**
* Representing QBluetoothDeviceDiscoveryAgent:: LimitedInquiry
*/
LimitedInquiry(1);
static {
QtJambi_LibraryUtilities.initialize();
}
private InquiryType(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 InquiryType resolve(int value) {
switch (value) {
case 0: return GeneralUnlimitedInquiry;
case 1: return LimitedInquiry;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QBluetoothDeviceDiscoveryAgent:: canceled()
*/
public final @NonNull Signal0 canceled = new Signal0();
/**
* See QBluetoothDeviceDiscoveryAgent:: deviceDiscovered(QBluetoothDeviceInfo)
*/
public final @NonNull Signal1 deviceDiscovered = new Signal1<>();
/**
* See QBluetoothDeviceDiscoveryAgent:: deviceUpdated(QBluetoothDeviceInfo, QBluetoothDeviceInfo::Fields)
*/
public final @NonNull Signal2 deviceUpdated = new Signal2<>();
/**
* See QBluetoothDeviceDiscoveryAgent:: error(QBluetoothDeviceDiscoveryAgent::Error)
*/
public final @NonNull Signal1 error = new Signal1<>();
/**
* See QBluetoothDeviceDiscoveryAgent:: finished()
*/
public final @NonNull Signal0 finished = new Signal0();
/**
* See QBluetoothDeviceDiscoveryAgent:: QBluetoothDeviceDiscoveryAgent(QBluetoothAddress, QObject*)
*/
public QBluetoothDeviceDiscoveryAgent(io.qt.bluetooth.@NonNull QBluetoothAddress deviceAdapter, io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, deviceAdapter, parent);
}
private native static void initialize_native(QBluetoothDeviceDiscoveryAgent instance, io.qt.bluetooth.QBluetoothAddress deviceAdapter, io.qt.core.QObject parent);
/**
* See QBluetoothDeviceDiscoveryAgent:: QBluetoothDeviceDiscoveryAgent(QObject*)
*/
public QBluetoothDeviceDiscoveryAgent(io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QBluetoothDeviceDiscoveryAgent instance, io.qt.core.QObject parent);
/**
* See QBluetoothDeviceDiscoveryAgent:: discoveredDevices()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QList discoveredDevices(){
return discoveredDevices_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QList discoveredDevices_native_constfct(long __this__nativeId);
/**
* See QBluetoothDeviceDiscoveryAgent:: error()const
*/
@QtUninvokable
public final io.qt.bluetooth.QBluetoothDeviceDiscoveryAgent.@NonNull Error error(){
return io.qt.bluetooth.QBluetoothDeviceDiscoveryAgent.Error.resolve(error_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int error_native_constfct(long __this__nativeId);
/**
* See QBluetoothDeviceDiscoveryAgent:: errorString()const
*/
@QtUninvokable
public final java.lang.@NonNull String errorString(){
return errorString_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String errorString_native_constfct(long __this__nativeId);
/**
* See QBluetoothDeviceDiscoveryAgent:: inquiryType()const
*/
@QtPropertyReader(name="inquiryType")
@QtUninvokable
public final io.qt.bluetooth.QBluetoothDeviceDiscoveryAgent.@NonNull InquiryType inquiryType(){
return io.qt.bluetooth.QBluetoothDeviceDiscoveryAgent.InquiryType.resolve(inquiryType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int inquiryType_native_constfct(long __this__nativeId);
/**
* See QBluetoothDeviceDiscoveryAgent:: isActive()const
*/
@QtUninvokable
public final boolean isActive(){
return isActive_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isActive_native_constfct(long __this__nativeId);
/**
* See QBluetoothDeviceDiscoveryAgent:: lowEnergyDiscoveryTimeout()const
*/
@QtUninvokable
public final int lowEnergyDiscoveryTimeout(){
return lowEnergyDiscoveryTimeout_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int lowEnergyDiscoveryTimeout_native_constfct(long __this__nativeId);
/**
* See QBluetoothDeviceDiscoveryAgent:: setInquiryType(QBluetoothDeviceDiscoveryAgent::InquiryType)
*/
@QtPropertyWriter(name="inquiryType")
@QtUninvokable
public final void setInquiryType(io.qt.bluetooth.QBluetoothDeviceDiscoveryAgent.@NonNull InquiryType type){
setInquiryType_native_QBluetoothDeviceDiscoveryAgent_InquiryType(QtJambi_LibraryUtilities.internal.nativeId(this), type.value());
}
@QtUninvokable
private native void setInquiryType_native_QBluetoothDeviceDiscoveryAgent_InquiryType(long __this__nativeId, int type);
/**
* See QBluetoothDeviceDiscoveryAgent:: setLowEnergyDiscoveryTimeout(int)
*/
@QtUninvokable
public final void setLowEnergyDiscoveryTimeout(int msTimeout){
setLowEnergyDiscoveryTimeout_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), msTimeout);
}
@QtUninvokable
private native void setLowEnergyDiscoveryTimeout_native_int(long __this__nativeId, int msTimeout);
/**
* See QBluetoothDeviceDiscoveryAgent:: start()
*/
public final void start(){
start_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void start_native(long __this__nativeId);
/**
* See QBluetoothDeviceDiscoveryAgent:: start(QBluetoothDeviceDiscoveryAgent::DiscoveryMethods)
*/
public final void start(io.qt.bluetooth.QBluetoothDeviceDiscoveryAgent.@NonNull DiscoveryMethods method){
start_native_QBluetoothDeviceDiscoveryAgent_DiscoveryMethods(QtJambi_LibraryUtilities.internal.nativeId(this), method.value());
}
private native void start_native_QBluetoothDeviceDiscoveryAgent_DiscoveryMethods(long __this__nativeId, int method);
/**
* See QBluetoothDeviceDiscoveryAgent:: stop()
*/
public final void stop(){
stop_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void stop_native(long __this__nativeId);
/**
* See QBluetoothDeviceDiscoveryAgent:: supportedDiscoveryMethods()
*/
public static io.qt.bluetooth.QBluetoothDeviceDiscoveryAgent.@NonNull DiscoveryMethods supportedDiscoveryMethods(){
return new io.qt.bluetooth.QBluetoothDeviceDiscoveryAgent.DiscoveryMethods(supportedDiscoveryMethods_native());
}
private native static int supportedDiscoveryMethods_native();
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QBluetoothDeviceDiscoveryAgent(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QBluetoothDeviceDiscoveryAgent(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QBluetoothDeviceDiscoveryAgent instance, QDeclarativeConstructor constructor);
/**
* Overloaded constructor for {@link #QBluetoothDeviceDiscoveryAgent(io.qt.bluetooth.QBluetoothAddress, io.qt.core.QObject)}
* with parent = null
.
*/
public QBluetoothDeviceDiscoveryAgent(io.qt.bluetooth.@NonNull QBluetoothAddress deviceAdapter) {
this(deviceAdapter, (io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QBluetoothDeviceDiscoveryAgent(io.qt.core.QObject)}
* with parent = null
.
*/
public QBluetoothDeviceDiscoveryAgent() {
this((io.qt.core.QObject)null);
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #inquiryType()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.bluetooth.QBluetoothDeviceDiscoveryAgent.@NonNull InquiryType getInquiryType() {
return inquiryType();
}
/**
* Overloaded function for {@link #start(io.qt.bluetooth.QBluetoothDeviceDiscoveryAgent.DiscoveryMethods)}.
*/
public final void start(io.qt.bluetooth.QBluetoothDeviceDiscoveryAgent.@NonNull DiscoveryMethod @NonNull... method) {
start(new io.qt.bluetooth.QBluetoothDeviceDiscoveryAgent.DiscoveryMethods(method));
}
}