io.qt.bluetooth.QBluetoothServiceDiscoveryAgent Maven / Gradle / Ivy
package io.qt.bluetooth;
import io.qt.*;
/**
* Enables you to query for Bluetooth services
* Java wrapper for Qt class QBluetoothServiceDiscoveryAgent
*/
public class QBluetoothServiceDiscoveryAgent 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(QBluetoothServiceDiscoveryAgent.class);
/**
* Java wrapper for Qt enum QBluetoothServiceDiscoveryAgent::DiscoveryMode
*/
public enum DiscoveryMode implements QtEnumerator {
/**
* Representing QBluetoothServiceDiscoveryAgent:: MinimalDiscovery
*/
MinimalDiscovery(0),
/**
* Representing QBluetoothServiceDiscoveryAgent:: FullDiscovery
*/
FullDiscovery(1);
static {
QtJambi_LibraryUtilities.initialize();
}
private DiscoveryMode(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 DiscoveryMode resolve(int value) {
switch (value) {
case 0: return MinimalDiscovery;
case 1: return FullDiscovery;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QBluetoothServiceDiscoveryAgent::Error
*/
public enum Error implements QtEnumerator {
/**
* Representing QBluetoothServiceDiscoveryAgent:: NoError
*/
NoError(0),
/**
* Representing QBluetoothServiceDiscoveryAgent:: InputOutputError
*/
InputOutputError(1),
/**
* Representing QBluetoothServiceDiscoveryAgent:: PoweredOffError
*/
PoweredOffError(2),
/**
* Representing QBluetoothServiceDiscoveryAgent:: InvalidBluetoothAdapterError
*/
InvalidBluetoothAdapterError(3),
/**
* Representing QBluetoothServiceDiscoveryAgent:: 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 100: return UnknownError;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QBluetoothServiceDiscoveryAgent:: canceled()
*/
public final @NonNull Signal0 canceled = new Signal0();
/**
* See QBluetoothServiceDiscoveryAgent:: error(QBluetoothServiceDiscoveryAgent::Error)
*/
public final @NonNull Signal1 error = new Signal1<>();
/**
* See QBluetoothServiceDiscoveryAgent:: finished()
*/
public final @NonNull Signal0 finished = new Signal0();
/**
* See QBluetoothServiceDiscoveryAgent:: serviceDiscovered(QBluetoothServiceInfo)
*/
public final @NonNull Signal1 serviceDiscovered = new Signal1<>();
/**
* See QBluetoothServiceDiscoveryAgent:: QBluetoothServiceDiscoveryAgent(QBluetoothAddress, QObject*)
*/
public QBluetoothServiceDiscoveryAgent(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(QBluetoothServiceDiscoveryAgent instance, io.qt.bluetooth.QBluetoothAddress deviceAdapter, io.qt.core.QObject parent);
/**
* See QBluetoothServiceDiscoveryAgent:: QBluetoothServiceDiscoveryAgent(QObject*)
*/
public QBluetoothServiceDiscoveryAgent(io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QBluetoothServiceDiscoveryAgent instance, io.qt.core.QObject parent);
/**
* See QBluetoothServiceDiscoveryAgent:: clear()
*/
public final void clear(){
clear_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void clear_native(long __this__nativeId);
/**
* See QBluetoothServiceDiscoveryAgent:: discoveredServices()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QList discoveredServices(){
return discoveredServices_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QList discoveredServices_native_constfct(long __this__nativeId);
/**
* See QBluetoothServiceDiscoveryAgent:: error()const
*/
@QtUninvokable
public final io.qt.bluetooth.QBluetoothServiceDiscoveryAgent.@NonNull Error error(){
return io.qt.bluetooth.QBluetoothServiceDiscoveryAgent.Error.resolve(error_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int error_native_constfct(long __this__nativeId);
/**
* See QBluetoothServiceDiscoveryAgent:: 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 QBluetoothServiceDiscoveryAgent:: 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 QBluetoothServiceDiscoveryAgent:: remoteAddress()const
*/
@QtUninvokable
public final io.qt.bluetooth.@NonNull QBluetoothAddress remoteAddress(){
return remoteAddress_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.bluetooth.QBluetoothAddress remoteAddress_native_constfct(long __this__nativeId);
/**
* See QBluetoothServiceDiscoveryAgent:: setRemoteAddress(QBluetoothAddress)
*/
@QtUninvokable
public final boolean setRemoteAddress(io.qt.bluetooth.@NonNull QBluetoothAddress address){
return setRemoteAddress_native_cref_QBluetoothAddress(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(address));
}
@QtUninvokable
private native boolean setRemoteAddress_native_cref_QBluetoothAddress(long __this__nativeId, long address);
/**
* See QBluetoothServiceDiscoveryAgent:: setUuidFilter(QBluetoothUuid)
*/
@QtUninvokable
public final void setUuidFilter(io.qt.bluetooth.@NonNull QBluetoothUuid uuid){
setUuidFilter_native_cref_QBluetoothUuid(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(uuid));
}
@QtUninvokable
private native void setUuidFilter_native_cref_QBluetoothUuid(long __this__nativeId, long uuid);
/**
* See QBluetoothServiceDiscoveryAgent:: setUuidFilter(QList<QBluetoothUuid>)
*/
@QtUninvokable
public final void setUuidFilter(java.util.@NonNull Collection extends io.qt.bluetooth.@NonNull QBluetoothUuid> uuids){
setUuidFilter_native_cref_QList(QtJambi_LibraryUtilities.internal.nativeId(this), uuids);
}
@QtUninvokable
private native void setUuidFilter_native_cref_QList(long __this__nativeId, java.util.Collection extends io.qt.bluetooth.QBluetoothUuid> uuids);
/**
* See QBluetoothServiceDiscoveryAgent:: start(QBluetoothServiceDiscoveryAgent::DiscoveryMode)
*/
public final void start(io.qt.bluetooth.QBluetoothServiceDiscoveryAgent.@NonNull DiscoveryMode mode){
start_native_QBluetoothServiceDiscoveryAgent_DiscoveryMode(QtJambi_LibraryUtilities.internal.nativeId(this), mode.value());
}
private native void start_native_QBluetoothServiceDiscoveryAgent_DiscoveryMode(long __this__nativeId, int mode);
/**
* See QBluetoothServiceDiscoveryAgent:: stop()
*/
public final void stop(){
stop_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void stop_native(long __this__nativeId);
/**
* See QBluetoothServiceDiscoveryAgent:: uuidFilter()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QList uuidFilter(){
return uuidFilter_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QList uuidFilter_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QBluetoothServiceDiscoveryAgent(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QBluetoothServiceDiscoveryAgent(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QBluetoothServiceDiscoveryAgent instance, QDeclarativeConstructor constructor);
/**
* Overloaded constructor for {@link #QBluetoothServiceDiscoveryAgent(io.qt.bluetooth.QBluetoothAddress, io.qt.core.QObject)}
* with parent = null
.
*/
public QBluetoothServiceDiscoveryAgent(io.qt.bluetooth.@NonNull QBluetoothAddress deviceAdapter) {
this(deviceAdapter, (io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QBluetoothServiceDiscoveryAgent(io.qt.core.QObject)}
* with parent = null
.
*/
public QBluetoothServiceDiscoveryAgent() {
this((io.qt.core.QObject)null);
}
/**
* Overloaded function for {@link #setUuidFilter(io.qt.bluetooth.QBluetoothUuid)}.
*/
@QtUninvokable
public final void setUuidFilter(io.qt.bluetooth.QBluetoothUuid.@NonNull ProtocolUuid uuid) {
setUuidFilter(new io.qt.bluetooth.QBluetoothUuid(uuid));
}
/**
* Overloaded function for {@link #setUuidFilter(io.qt.bluetooth.QBluetoothUuid)}.
*/
@QtUninvokable
public final void setUuidFilter(io.qt.bluetooth.QBluetoothUuid.@NonNull ServiceClassUuid uuid) {
setUuidFilter(new io.qt.bluetooth.QBluetoothUuid(uuid));
}
/**
* Overloaded function for {@link #setUuidFilter(io.qt.bluetooth.QBluetoothUuid)}.
*/
@QtUninvokable
public final void setUuidFilter(io.qt.bluetooth.QBluetoothUuid.@NonNull CharacteristicType uuid) {
setUuidFilter(new io.qt.bluetooth.QBluetoothUuid(uuid));
}
/**
* Overloaded function for {@link #setUuidFilter(io.qt.bluetooth.QBluetoothUuid)}.
*/
@QtUninvokable
public final void setUuidFilter(io.qt.bluetooth.QBluetoothUuid.@NonNull DescriptorType uuid) {
setUuidFilter(new io.qt.bluetooth.QBluetoothUuid(uuid));
}
/**
* Overloaded function for {@link #setUuidFilter(io.qt.bluetooth.QBluetoothUuid)}.
*/
@QtUninvokable
public final void setUuidFilter(io.qt.core.@NonNull QUuid uuid) {
setUuidFilter(new io.qt.bluetooth.QBluetoothUuid(uuid));
}
/**
* Overloaded function for {@link #start(io.qt.bluetooth.QBluetoothServiceDiscoveryAgent.DiscoveryMode)}
* with mode = io.qt.bluetooth.QBluetoothServiceDiscoveryAgent.DiscoveryMode.MinimalDiscovery
.
*/
public final void start() {
start(io.qt.bluetooth.QBluetoothServiceDiscoveryAgent.DiscoveryMode.MinimalDiscovery);
}
}