KUnifiedPush
connector_dbus.cpp
33 connect(&m_serviceWatcher, &QDBusServiceWatcher::serviceRegistered, this, [this](const QString &serviceName) {
40 connect(&m_serviceWatcher, &QDBusServiceWatcher::serviceUnregistered, this, [this](const QString &serviceName) {
42 const auto distributorServiceName = std::visit([](auto iface) { return iface->service(); }, m_distributor);
52 m_serviceWatcher.setWatchMode(QDBusServiceWatcher::WatchForRegistration | QDBusServiceWatcher::WatchForUnregistration);
63 // QDBusInterface::isValid does not detect whether the interface actually exists on the remote side,
65 OrgFreedesktopDBusIntrospectableInterface introspectIface(distServiceName, UP_DISTRIBUTOR_PATH, QDBusConnection::sessionBus());
66 if (const QString reply = introspectIface.Introspect(); reply.contains(QLatin1StringView(OrgUnifiedpushDistributor2Interface::staticInterfaceName()))) {
67 auto iface2 = std::make_unique<OrgUnifiedpushDistributor2Interface>(distServiceName, UP_DISTRIBUTOR_PATH, QDBusConnection::sessionBus(), this);
74 auto iface1 = std::make_unique<OrgUnifiedpushDistributor1Interface>(distServiceName, UP_DISTRIBUTOR_PATH, QDBusConnection::sessionBus(), this);
@ NoDistributor
Connector cannot find a UnifiedPush distributor to register at.
Definition connector.h:60
bool atEnd() const const
void beginMap(QMetaType keyMetaType, QMetaType valueMetaType)
void beginMapEntry()
void endMap()
void endMapEntry()
bool registerObject(const QString &path, QObject *object, RegisterOptions options)
QDBusConnection sessionBus()
void unregisterObject(const QString &path, UnregisterMode mode)
void finished(QDBusPendingCallWatcher *self)
WatchForRegistration
void serviceRegistered(const QString &serviceName)
void serviceUnregistered(const QString &serviceName)
const QChar at(qsizetype position) const const
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Mar 21 2025 11:55:51 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Mar 21 2025 11:55:51 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.