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

io.qt.dbus.QDBusServiceWatcher Maven / Gradle / Ivy

There is a newer version: 6.7.2
Show newest version
package io.qt.dbus;

import io.qt.*;


/**
 * 

Allows the user to watch for a bus service change

*

Java wrapper for Qt class QDBusServiceWatcher

*/ public class QDBusServiceWatcher 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(QDBusServiceWatcher.class); /** *

Java wrapper for Qt enum QDBusServiceWatcher::WatchModeFlag

* * @see WatchMode */ public enum WatchModeFlag implements QtFlagEnumerator { /** *

Representing QDBusServiceWatcher::WatchForRegistration

*/ WatchForRegistration(1), /** *

Representing QDBusServiceWatcher::WatchForUnregistration

*/ WatchForUnregistration(2), /** *

Representing QDBusServiceWatcher::WatchForOwnerChange

*/ WatchForOwnerChange(3); static { QtJambi_LibraryUtilities.initialize(); } private WatchModeFlag(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ public @NonNull WatchMode asFlags() { return new WatchMode(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public @NonNull WatchMode combined(@NonNull WatchModeFlag 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 WatchMode cleared(@NonNull WatchModeFlag e) { return asFlags().setFlag(e, false); } /** * Creates a new {@link WatchMode} from the entries. * @param values entries * @return new flag */ public static @NonNull WatchMode flags(@Nullable WatchModeFlag @NonNull... values) { return new WatchMode(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull WatchModeFlag resolve(int value) { switch (value) { case 1: return WatchForRegistration; case 2: return WatchForUnregistration; case 3: return WatchForOwnerChange; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** * {@link QFlags} type for enum {@link WatchModeFlag} */ public static final class WatchMode extends QFlags implements Comparable { private static final long serialVersionUID = 0x6219434d7a312e1dL; static { QtJambi_LibraryUtilities.initialize(); } /** * Creates a new WatchMode where the flags in args are set. * @param args enum entries */ public WatchMode(@Nullable WatchModeFlag @NonNull... args){ super(args); } /** * Creates a new WatchMode with given value. * @param value */ public WatchMode(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new WatchMode */ @Override public final @NonNull WatchMode combined(@StrictNonNull WatchModeFlag e){ return new WatchMode(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ public final @NonNull WatchMode setFlag(@Nullable WatchModeFlag 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 WatchMode setFlag(@Nullable WatchModeFlag 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 WatchMode. * @return array of enum entries */ @Override public final @NonNull WatchModeFlag @NonNull[] flags(){ return super.flags(WatchModeFlag.values()); } /** * {@inheritDoc} */ @Override public final @NonNull WatchMode clone(){ return new WatchMode(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(@StrictNonNull WatchMode other){ return Integer.compare(value(), other.value()); } } /** *

See QDBusServiceWatcher::serviceOwnerChanged(QString,QString,QString)

*/ public final @NonNull Signal3 serviceOwnerChanged = new Signal3<>(); /** *

See QDBusServiceWatcher::serviceRegistered(QString)

*/ public final @NonNull Signal1 serviceRegistered = new Signal1<>(); /** *

See QDBusServiceWatcher::serviceUnregistered(QString)

*/ public final @NonNull Signal1 serviceUnregistered = new Signal1<>(); /** *

See QDBusServiceWatcher::QDBusServiceWatcher(QObject*)

*/ public QDBusServiceWatcher(io.qt.core.@Nullable QObject parent){ super((QPrivateConstructor)null); initialize_native(this, parent); } private native static void initialize_native(QDBusServiceWatcher instance, io.qt.core.QObject parent); /** *

See QDBusServiceWatcher::addWatchedService(QString)

*/ @QtUninvokable public final void addWatchedService(java.lang.@NonNull String newService){ addWatchedService_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), newService); } @QtUninvokable private native void addWatchedService_native_cref_QString(long __this__nativeId, java.lang.String newService); /** *

See QDBusServiceWatcher::bindableWatchMode()

*/ @QtPropertyBindable(name="watchMode") @QtUninvokable public final io.qt.core.@NonNull QBindable bindableWatchMode(){ return bindableWatchMode_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QBindable bindableWatchMode_native(long __this__nativeId); /** *

See QDBusServiceWatcher::bindableWatchedServices()

*/ @QtPropertyBindable(name="watchedServices") @QtUninvokable public final io.qt.core.@NonNull QBindable> bindableWatchedServices(){ return bindableWatchedServices_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QBindable> bindableWatchedServices_native(long __this__nativeId); /** *

See QDBusServiceWatcher::removeWatchedService(QString)

*/ @QtUninvokable public final boolean removeWatchedService(java.lang.@NonNull String service){ return removeWatchedService_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), service); } @QtUninvokable private native boolean removeWatchedService_native_cref_QString(long __this__nativeId, java.lang.String service); /** *

See QDBusServiceWatcher::setWatchMode(QDBusServiceWatcher::WatchMode)

*/ @QtPropertyWriter(name="watchMode") @QtUninvokable public final void setWatchMode(io.qt.dbus.QDBusServiceWatcher.@NonNull WatchMode mode){ setWatchMode_native_QDBusServiceWatcher_WatchMode(QtJambi_LibraryUtilities.internal.nativeId(this), mode.value()); } @QtUninvokable private native void setWatchMode_native_QDBusServiceWatcher_WatchMode(long __this__nativeId, int mode); /** *

See QDBusServiceWatcher::setWatchedServices(QStringList)

*/ @QtPropertyWriter(name="watchedServices") @QtUninvokable public final void setWatchedServices(java.util.@NonNull Collection services){ setWatchedServices_native_cref_QStringList(QtJambi_LibraryUtilities.internal.nativeId(this), services); } @QtUninvokable private native void setWatchedServices_native_cref_QStringList(long __this__nativeId, java.util.Collection services); /** *

See QDBusServiceWatcher::watchMode()const

*/ @QtPropertyReader(name="watchMode") @QtUninvokable public final io.qt.dbus.QDBusServiceWatcher.@NonNull WatchMode watchMode(){ return new io.qt.dbus.QDBusServiceWatcher.WatchMode(watchMode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int watchMode_native_constfct(long __this__nativeId); /** *

See QDBusServiceWatcher::watchedServices()const

*/ @QtPropertyReader(name="watchedServices") @QtUninvokable public final io.qt.core.@NonNull QStringList watchedServices(){ return watchedServices_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QStringList watchedServices_native_constfct(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QDBusServiceWatcher(QPrivateConstructor p) { super(p); } /** * Constructor for internal use only. * It is not allowed to call the declarative constructor from inside Java. * @hidden */ @NativeAccess protected QDBusServiceWatcher(QDeclarativeConstructor constructor) { super((QPrivateConstructor)null); initialize_native(this, constructor); } @QtUninvokable private static native void initialize_native(QDBusServiceWatcher instance, QDeclarativeConstructor constructor); /** *

Overloaded constructor for {@link #QDBusServiceWatcher(io.qt.core.QObject)} * with parent = null.

*/ public QDBusServiceWatcher() { this((io.qt.core.QObject)null); } /** *

Overloaded function for {@link #setWatchMode(io.qt.dbus.QDBusServiceWatcher.WatchMode)}.

*/ @QtUninvokable public final void setWatchMode(io.qt.dbus.QDBusServiceWatcher.@NonNull WatchModeFlag @NonNull... mode) { setWatchMode(new io.qt.dbus.QDBusServiceWatcher.WatchMode(mode)); } /** * @hidden *

Kotlin property getter. In Java use {@link #watchMode()} instead.

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final io.qt.dbus.QDBusServiceWatcher.@NonNull WatchMode getWatchMode() { return watchMode(); } /** * @hidden *

Kotlin property getter. In Java use {@link #watchedServices()} instead.

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final io.qt.core.@NonNull QStringList getWatchedServices() { return watchedServices(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy