io.qt.bluetooth.QBluetooth Maven / Gradle / Ivy
package io.qt.bluetooth;
import io.qt.*;
/**
* Classes and functions related to Bluetooth
* Java wrapper for Qt header file QBluetooth
*/
public final class QBluetooth
{
static {
QtJambi_LibraryUtilities.initialize();
}
private QBluetooth() throws java.lang.InstantiationError { throw new java.lang.InstantiationError("Cannot instantiate namespace QBluetooth."); }
/**
* Java wrapper for Qt enum QBluetooth::AttAccessConstraint
*
* @see AttAccessConstraints
*/
public enum AttAccessConstraint implements QtFlagEnumerator {
/**
* Representing QBluetooth:: AttAccessConstraint:: AttAuthorizationRequired
*/
AttAuthorizationRequired(1),
/**
* Representing QBluetooth:: AttAccessConstraint:: AttAuthenticationRequired
*/
AttAuthenticationRequired(2),
/**
* Representing QBluetooth:: AttAccessConstraint:: AttEncryptionRequired
*/
AttEncryptionRequired(4);
static {
QtJambi_LibraryUtilities.initialize();
}
private AttAccessConstraint(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public @NonNull AttAccessConstraints asFlags() {
return new AttAccessConstraints(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull AttAccessConstraints combined(@NonNull AttAccessConstraint 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 AttAccessConstraints cleared(@NonNull AttAccessConstraint e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link AttAccessConstraints} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull AttAccessConstraints flags(@Nullable AttAccessConstraint @NonNull... values) {
return new AttAccessConstraints(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull AttAccessConstraint resolve(int value) {
switch (value) {
case 1: return AttAuthorizationRequired;
case 2: return AttAuthenticationRequired;
case 4: return AttEncryptionRequired;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* {@link QFlags} type for enum {@link AttAccessConstraint}
*/
public static final class AttAccessConstraints extends QFlags implements Comparable {
private static final long serialVersionUID = 0x9e30cb062f2a6af7L;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new AttAccessConstraints where the flags in args
are set.
* @param args enum entries
*/
public AttAccessConstraints(@Nullable AttAccessConstraint @NonNull... args){
super(args);
}
/**
* Creates a new AttAccessConstraints with given value
.
* @param value
*/
public AttAccessConstraints(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new AttAccessConstraints
*/
@Override
public final @NonNull AttAccessConstraints combined(@StrictNonNull AttAccessConstraint e){
return new AttAccessConstraints(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final @NonNull AttAccessConstraints setFlag(@Nullable AttAccessConstraint 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 AttAccessConstraints setFlag(@Nullable AttAccessConstraint 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 AttAccessConstraints.
* @return array of enum entries
*/
@Override
public final @NonNull AttAccessConstraint @NonNull[] flags(){
return super.flags(AttAccessConstraint.values());
}
/**
* {@inheritDoc}
*/
@Override
public final @NonNull AttAccessConstraints clone(){
return new AttAccessConstraints(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(@StrictNonNull AttAccessConstraints other){
return Integer.compare(value(), other.value());
}
}
/**
* Java wrapper for Qt enum QBluetooth::Security
*
* @see SecurityFlags
*/
public enum Security implements QtFlagEnumerator {
/**
* Representing QBluetooth:: Security:: NoSecurity
*/
NoSecurity(0),
/**
* Representing QBluetooth:: Security:: Authorization
*/
Authorization(1),
/**
* Representing QBluetooth:: Security:: Authentication
*/
Authentication(2),
/**
* Representing QBluetooth:: Security:: Encryption
*/
Encryption(4),
/**
* Representing QBluetooth:: Security:: Secure
*/
Secure(8);
static {
QtJambi_LibraryUtilities.initialize();
}
private Security(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public @NonNull SecurityFlags asFlags() {
return new SecurityFlags(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull SecurityFlags combined(@NonNull Security 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 SecurityFlags cleared(@NonNull Security e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link SecurityFlags} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull SecurityFlags flags(@Nullable Security @NonNull... values) {
return new SecurityFlags(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull Security resolve(int value) {
switch (value) {
case 0: return NoSecurity;
case 1: return Authorization;
case 2: return Authentication;
case 4: return Encryption;
case 8: return Secure;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* {@link QFlags} type for enum {@link Security}
*/
public static final class SecurityFlags extends QFlags implements Comparable {
private static final long serialVersionUID = 0x4979a91dab4c252dL;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new SecurityFlags where the flags in args
are set.
* @param args enum entries
*/
public SecurityFlags(@Nullable Security @NonNull... args){
super(args);
}
/**
* Creates a new SecurityFlags with given value
.
* @param value
*/
public SecurityFlags(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new SecurityFlags
*/
@Override
public final @NonNull SecurityFlags combined(@StrictNonNull Security e){
return new SecurityFlags(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final @NonNull SecurityFlags setFlag(@Nullable Security 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 SecurityFlags setFlag(@Nullable Security 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 SecurityFlags.
* @return array of enum entries
*/
@Override
public final @NonNull Security @NonNull[] flags(){
return super.flags(Security.values());
}
/**
* {@inheritDoc}
*/
@Override
public final @NonNull SecurityFlags clone(){
return new SecurityFlags(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(@StrictNonNull SecurityFlags other){
return Integer.compare(value(), other.value());
}
}
}