All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.bluetooth.QLowEnergyCharacteristic Maven / Gradle / Ivy

package io.qt.bluetooth;

import io.qt.*;


/**
 * 

Stores information about a Bluetooth Low Energy service characteristic

*

Java wrapper for Qt class QLowEnergyCharacteristic

*/ public class QLowEnergyCharacteristic extends QtObject implements java.lang.Cloneable { static { QtJambi_LibraryUtilities.initialize(); } /** *

Java wrapper for Qt enum QLowEnergyCharacteristic::PropertyType

* * @see PropertyTypes */ public enum PropertyType implements QtFlagEnumerator { /** *

Representing QLowEnergyCharacteristic::Unknown

*/ Unknown(0), /** *

Representing QLowEnergyCharacteristic::Broadcasting

*/ Broadcasting(1), /** *

Representing QLowEnergyCharacteristic::Read

*/ Read(2), /** *

Representing QLowEnergyCharacteristic::WriteNoResponse

*/ WriteNoResponse(4), /** *

Representing QLowEnergyCharacteristic::Write

*/ Write(8), /** *

Representing QLowEnergyCharacteristic::Notify

*/ Notify(16), /** *

Representing QLowEnergyCharacteristic::Indicate

*/ Indicate(32), /** *

Representing QLowEnergyCharacteristic::WriteSigned

*/ WriteSigned(64), /** *

Representing QLowEnergyCharacteristic::ExtendedProperty

*/ ExtendedProperty(128); static { QtJambi_LibraryUtilities.initialize(); } private PropertyType(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ public @NonNull PropertyTypes asFlags() { return new PropertyTypes(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public @NonNull PropertyTypes combined(@NonNull PropertyType 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 PropertyTypes cleared(@NonNull PropertyType e) { return asFlags().setFlag(e, false); } /** * Creates a new {@link PropertyTypes} from the entries. * @param values entries * @return new flag */ public static @NonNull PropertyTypes flags(@Nullable PropertyType @NonNull... values) { return new PropertyTypes(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull PropertyType resolve(int value) { switch (value) { case 0: return Unknown; case 1: return Broadcasting; case 2: return Read; case 4: return WriteNoResponse; case 8: return Write; case 16: return Notify; case 32: return Indicate; case 64: return WriteSigned; case 128: return ExtendedProperty; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** * {@link QFlags} type for enum {@link PropertyType} */ public static final class PropertyTypes extends QFlags implements Comparable { private static final long serialVersionUID = 0xa4069fda91dc3cc7L; static { QtJambi_LibraryUtilities.initialize(); } /** * Creates a new PropertyTypes where the flags in args are set. * @param args enum entries */ public PropertyTypes(@Nullable PropertyType @NonNull... args){ super(args); } /** * Creates a new PropertyTypes with given value. * @param value */ public PropertyTypes(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new PropertyTypes */ @Override public final @NonNull PropertyTypes combined(@StrictNonNull PropertyType e){ return new PropertyTypes(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ public final @NonNull PropertyTypes setFlag(@Nullable PropertyType 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 PropertyTypes setFlag(@Nullable PropertyType 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 PropertyTypes. * @return array of enum entries */ @Override public final @NonNull PropertyType @NonNull[] flags(){ return super.flags(PropertyType.values()); } /** * {@inheritDoc} */ @Override public final @NonNull PropertyTypes clone(){ return new PropertyTypes(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(@StrictNonNull PropertyTypes other){ return Integer.compare(value(), other.value()); } } /** *

See QLowEnergyCharacteristic::QLowEnergyCharacteristic()

*/ public QLowEnergyCharacteristic(){ super((QPrivateConstructor)null); initialize_native(this); } private native static void initialize_native(QLowEnergyCharacteristic instance); /** *

See QLowEnergyCharacteristic::QLowEnergyCharacteristic(QLowEnergyCharacteristic)

*/ public QLowEnergyCharacteristic(io.qt.bluetooth.@NonNull QLowEnergyCharacteristic other){ super((QPrivateConstructor)null); initialize_native(this, other); } private native static void initialize_native(QLowEnergyCharacteristic instance, io.qt.bluetooth.QLowEnergyCharacteristic other); /** *

See QLowEnergyCharacteristic::attributeHandle()const

*/ @QtUninvokable protected final short attributeHandle(){ return attributeHandle_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native short attributeHandle_native_constfct(long __this__nativeId); /** *

See QLowEnergyCharacteristic::descriptor(QBluetoothUuid)const

*/ @QtUninvokable public final io.qt.bluetooth.@NonNull QLowEnergyDescriptor descriptor(io.qt.bluetooth.@NonNull QBluetoothUuid uuid){ return descriptor_native_cref_QBluetoothUuid_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(uuid)); } @QtUninvokable private native io.qt.bluetooth.QLowEnergyDescriptor descriptor_native_cref_QBluetoothUuid_constfct(long __this__nativeId, long uuid); /** *

See QLowEnergyCharacteristic::descriptors()const

*/ @QtUninvokable public final io.qt.core.@NonNull QList descriptors(){ return descriptors_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QList descriptors_native_constfct(long __this__nativeId); /** *

See QLowEnergyCharacteristic::handle()const

*/ @QtUninvokable public final short handle(){ return handle_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native short handle_native_constfct(long __this__nativeId); /** *

See QLowEnergyCharacteristic::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 QLowEnergyCharacteristic::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 QLowEnergyCharacteristic::operator=(QLowEnergyCharacteristic)

*/ @QtUninvokable public final void assign(io.qt.bluetooth.@NonNull QLowEnergyCharacteristic other){ assign_native_cref_QLowEnergyCharacteristic(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @QtUninvokable private native void assign_native_cref_QLowEnergyCharacteristic(long __this__nativeId, long other); /** *

See QLowEnergyCharacteristic::operator==(QLowEnergyCharacteristic)const

*/ @QtUninvokable public final boolean equals(io.qt.bluetooth.@NonNull QLowEnergyCharacteristic other){ return equals_native_cref_QLowEnergyCharacteristic_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @QtUninvokable private native boolean equals_native_cref_QLowEnergyCharacteristic_constfct(long __this__nativeId, long other); /** *

See QLowEnergyCharacteristic::properties()const

*/ @QtUninvokable public final io.qt.bluetooth.QLowEnergyCharacteristic.@NonNull PropertyTypes properties(){ return new io.qt.bluetooth.QLowEnergyCharacteristic.PropertyTypes(properties_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int properties_native_constfct(long __this__nativeId); /** *

See QLowEnergyCharacteristic::uuid()const

*/ @QtUninvokable public final io.qt.bluetooth.@NonNull QBluetoothUuid uuid(){ return uuid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.bluetooth.QBluetoothUuid uuid_native_constfct(long __this__nativeId); /** *

See QLowEnergyCharacteristic::value()const

*/ @QtUninvokable public final io.qt.core.@NonNull QByteArray value(){ return value_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QByteArray value_native_constfct(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QLowEnergyCharacteristic(QPrivateConstructor p) { super(p); } /** *

See QLowEnergyCharacteristic::operator==(QLowEnergyCharacteristic)const

*/ @Override @QtUninvokable public boolean equals(Object other) { if (other instanceof io.qt.bluetooth.QLowEnergyCharacteristic) { return equals((io.qt.bluetooth.QLowEnergyCharacteristic) other); } return false; } /** * Returns the objects's hash code computed by qHash(QLowEnergyCharacteristic). */ @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.

See QLowEnergyCharacteristic::QLowEnergyCharacteristic(QLowEnergyCharacteristic)

*/ @QtUninvokable @Override public QLowEnergyCharacteristic clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private static native QLowEnergyCharacteristic clone_native(long __this_nativeId); /** *

Overloaded function for {@link #descriptor(io.qt.bluetooth.QBluetoothUuid)}.

*/ @QtUninvokable public final io.qt.bluetooth.@NonNull QLowEnergyDescriptor descriptor(io.qt.bluetooth.QBluetoothUuid.@NonNull ProtocolUuid uuid) { return descriptor(new io.qt.bluetooth.QBluetoothUuid(uuid)); } /** *

Overloaded function for {@link #descriptor(io.qt.bluetooth.QBluetoothUuid)}.

*/ @QtUninvokable public final io.qt.bluetooth.@NonNull QLowEnergyDescriptor descriptor(io.qt.bluetooth.QBluetoothUuid.@NonNull ServiceClassUuid uuid) { return descriptor(new io.qt.bluetooth.QBluetoothUuid(uuid)); } /** *

Overloaded function for {@link #descriptor(io.qt.bluetooth.QBluetoothUuid)}.

*/ @QtUninvokable public final io.qt.bluetooth.@NonNull QLowEnergyDescriptor descriptor(io.qt.bluetooth.QBluetoothUuid.@NonNull CharacteristicType uuid) { return descriptor(new io.qt.bluetooth.QBluetoothUuid(uuid)); } /** *

Overloaded function for {@link #descriptor(io.qt.bluetooth.QBluetoothUuid)}.

*/ @QtUninvokable public final io.qt.bluetooth.@NonNull QLowEnergyDescriptor descriptor(io.qt.bluetooth.QBluetoothUuid.@NonNull DescriptorType uuid) { return descriptor(new io.qt.bluetooth.QBluetoothUuid(uuid)); } /** *

Overloaded function for {@link #descriptor(io.qt.bluetooth.QBluetoothUuid)}.

*/ @QtUninvokable public final io.qt.bluetooth.@NonNull QLowEnergyDescriptor descriptor(io.qt.core.@NonNull QUuid uuid) { return descriptor(new io.qt.bluetooth.QBluetoothUuid(uuid)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy