io.qt.bluetooth.QBluetoothLocalDevice Maven / Gradle / Ivy
package io.qt.bluetooth;
import io.qt.*;
/**
* Enables access to the local Bluetooth device
* Java wrapper for Qt class QBluetoothLocalDevice
*/
public class QBluetoothLocalDevice 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(QBluetoothLocalDevice.class);
/**
* Java wrapper for Qt enum QBluetoothLocalDevice::Error
*/
public enum Error implements QtEnumerator {
/**
* Representing QBluetoothLocalDevice:: NoError
*/
NoError(0),
/**
* Representing QBluetoothLocalDevice:: PairingError
*/
PairingError(1),
/**
* Representing QBluetoothLocalDevice:: 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 PairingError;
case 100: return UnknownError;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QBluetoothLocalDevice::HostMode
*/
public enum HostMode implements QtEnumerator {
/**
* Representing QBluetoothLocalDevice:: HostPoweredOff
*/
HostPoweredOff(0),
/**
* Representing QBluetoothLocalDevice:: HostConnectable
*/
HostConnectable(1),
/**
* Representing QBluetoothLocalDevice:: HostDiscoverable
*/
HostDiscoverable(2),
/**
* Representing QBluetoothLocalDevice:: HostDiscoverableLimitedInquiry
*/
HostDiscoverableLimitedInquiry(3);
static {
QtJambi_LibraryUtilities.initialize();
}
private HostMode(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 HostMode resolve(int value) {
switch (value) {
case 0: return HostPoweredOff;
case 1: return HostConnectable;
case 2: return HostDiscoverable;
case 3: return HostDiscoverableLimitedInquiry;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QBluetoothLocalDevice::Pairing
*/
public enum Pairing implements QtEnumerator {
/**
* Representing QBluetoothLocalDevice:: Unpaired
*/
Unpaired(0),
/**
* Representing QBluetoothLocalDevice:: Paired
*/
Paired(1),
/**
* Representing QBluetoothLocalDevice:: AuthorizedPaired
*/
AuthorizedPaired(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private Pairing(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 Pairing resolve(int value) {
switch (value) {
case 0: return Unpaired;
case 1: return Paired;
case 2: return AuthorizedPaired;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QBluetoothLocalDevice:: deviceConnected(QBluetoothAddress)
*/
public final @NonNull Signal1 deviceConnected = new Signal1<>();
/**
* See QBluetoothLocalDevice:: deviceDisconnected(QBluetoothAddress)
*/
public final @NonNull Signal1 deviceDisconnected = new Signal1<>();
/**
* See QBluetoothLocalDevice:: error(QBluetoothLocalDevice::Error)
*/
public final @NonNull Signal1 error = new Signal1<>();
/**
* See QBluetoothLocalDevice:: hostModeStateChanged(QBluetoothLocalDevice::HostMode)
*/
public final @NonNull Signal1 hostModeStateChanged = new Signal1<>();
/**
* See QBluetoothLocalDevice:: pairingDisplayConfirmation(QBluetoothAddress, QString)
*/
public final @NonNull Signal2 pairingDisplayConfirmation = new Signal2<>();
/**
* See QBluetoothLocalDevice:: pairingDisplayPinCode(QBluetoothAddress, QString)
*/
public final @NonNull Signal2 pairingDisplayPinCode = new Signal2<>();
/**
* See QBluetoothLocalDevice:: pairingFinished(QBluetoothAddress, QBluetoothLocalDevice::Pairing)
*/
public final @NonNull Signal2 pairingFinished = new Signal2<>();
/**
* See QBluetoothLocalDevice:: QBluetoothLocalDevice(QBluetoothAddress, QObject*)
*/
public QBluetoothLocalDevice(io.qt.bluetooth.@NonNull QBluetoothAddress address, io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, address, parent);
}
private native static void initialize_native(QBluetoothLocalDevice instance, io.qt.bluetooth.QBluetoothAddress address, io.qt.core.QObject parent);
/**
* See QBluetoothLocalDevice:: QBluetoothLocalDevice(QObject*)
*/
public QBluetoothLocalDevice(io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QBluetoothLocalDevice instance, io.qt.core.QObject parent);
/**
* See QBluetoothLocalDevice:: address()const
*/
@QtUninvokable
public final io.qt.bluetooth.@NonNull QBluetoothAddress address(){
return address_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.bluetooth.QBluetoothAddress address_native_constfct(long __this__nativeId);
/**
* See QBluetoothLocalDevice:: connectedDevices()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QList connectedDevices(){
return connectedDevices_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QList connectedDevices_native_constfct(long __this__nativeId);
/**
* See QBluetoothLocalDevice:: hostMode()const
*/
@QtUninvokable
public final io.qt.bluetooth.QBluetoothLocalDevice.@NonNull HostMode hostMode(){
return io.qt.bluetooth.QBluetoothLocalDevice.HostMode.resolve(hostMode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int hostMode_native_constfct(long __this__nativeId);
/**
* See QBluetoothLocalDevice:: isValid()const
*/
@QtUninvokable
public final boolean isValid(){
return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isValid_native_constfct(long __this__nativeId);
/**
* See QBluetoothLocalDevice:: name()const
*/
@QtUninvokable
public final java.lang.@NonNull String name(){
return name_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String name_native_constfct(long __this__nativeId);
/**
* See QBluetoothLocalDevice:: pairingConfirmation(bool)
*/
public final void pairingConfirmation(boolean confirmation){
pairingConfirmation_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), confirmation);
}
private native void pairingConfirmation_native_bool(long __this__nativeId, boolean confirmation);
/**
* See QBluetoothLocalDevice:: pairingStatus(QBluetoothAddress)const
*/
@QtUninvokable
public final io.qt.bluetooth.QBluetoothLocalDevice.@NonNull Pairing pairingStatus(io.qt.bluetooth.@NonNull QBluetoothAddress address){
return io.qt.bluetooth.QBluetoothLocalDevice.Pairing.resolve(pairingStatus_native_cref_QBluetoothAddress_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(address)));
}
@QtUninvokable
private native int pairingStatus_native_cref_QBluetoothAddress_constfct(long __this__nativeId, long address);
/**
* See QBluetoothLocalDevice:: powerOn()
*/
@QtUninvokable
public final void powerOn(){
powerOn_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void powerOn_native(long __this__nativeId);
/**
* See QBluetoothLocalDevice:: requestPairing(QBluetoothAddress, QBluetoothLocalDevice::Pairing)
*/
@QtUninvokable
public final void requestPairing(io.qt.bluetooth.@NonNull QBluetoothAddress address, io.qt.bluetooth.QBluetoothLocalDevice.@NonNull Pairing pairing){
requestPairing_native_cref_QBluetoothAddress_QBluetoothLocalDevice_Pairing(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(address), pairing.value());
}
@QtUninvokable
private native void requestPairing_native_cref_QBluetoothAddress_QBluetoothLocalDevice_Pairing(long __this__nativeId, long address, int pairing);
/**
* See QBluetoothLocalDevice:: setHostMode(QBluetoothLocalDevice::HostMode)
*/
@QtUninvokable
public final void setHostMode(io.qt.bluetooth.QBluetoothLocalDevice.@NonNull HostMode mode){
setHostMode_native_QBluetoothLocalDevice_HostMode(QtJambi_LibraryUtilities.internal.nativeId(this), mode.value());
}
@QtUninvokable
private native void setHostMode_native_QBluetoothLocalDevice_HostMode(long __this__nativeId, int mode);
/**
* See QBluetoothLocalDevice:: allDevices()
*/
public native static io.qt.core.@NonNull QList allDevices();
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QBluetoothLocalDevice(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QBluetoothLocalDevice(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QBluetoothLocalDevice instance, QDeclarativeConstructor constructor);
/**
* Overloaded constructor for {@link #QBluetoothLocalDevice(io.qt.bluetooth.QBluetoothAddress, io.qt.core.QObject)}
* with parent = null
.
*/
public QBluetoothLocalDevice(io.qt.bluetooth.@NonNull QBluetoothAddress address) {
this(address, (io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QBluetoothLocalDevice(io.qt.core.QObject)}
* with parent = null
.
*/
public QBluetoothLocalDevice() {
this((io.qt.core.QObject)null);
}
}