NetworkManagerQt
secretagent.cpp
30 , agentManager(NetworkManagerPrivate::DBUS_SERVICE, QLatin1String(NM_DBUS_PATH_AGENT_MANAGER), QDBusConnection::sessionBus(), parent)
31 , watcher(NetworkManagerPrivate::DBUS_SERVICE, QDBusConnection::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, parent)
33 , agentManager(NetworkManagerPrivate::DBUS_SERVICE, QLatin1String(NM_DBUS_PATH_AGENT_MANAGER), QDBusConnection::systemBus(), parent)
34 , watcher(NetworkManagerPrivate::DBUS_SERVICE, QDBusConnection::systemBus(), QDBusServiceWatcher::WatchForOwnerChange, parent)
53 QObject::connect(&watcher, &QDBusServiceWatcher::serviceRegistered, parent, [this] { this->daemonRegistered(); });
55 agentManager.connection().registerObject(QLatin1String(NM_DBUS_PATH_SECRET_AGENT), &agent, QDBusConnection::ExportAllSlots);
65void NetworkManager::SecretAgentPrivate::dbusInterfacesAdded(const QDBusObjectPath &path, const QVariantMap &interfaces)
85void NetworkManager::SecretAgentPrivate::registerAgent(NetworkManager::SecretAgent::Capabilities capabilities)
93 , d_ptr(new NetworkManager::SecretAgentPrivate(id, NetworkManager::SecretAgent::Capability::NoCapability, this))
97NetworkManager::SecretAgent::SecretAgent(const QString &id, NetworkManager::SecretAgent::Capabilities capabilities, QObject *parent)
110void NetworkManager::SecretAgent::sendError(NetworkManager::SecretAgent::Error error, const QString &explanation, const QDBusMessage &callMessage) const
117 errorString = QStringLiteral(NM_DBUS_INTERFACE_SECRET_AGENT) % QStringLiteral(".NotAuthorized");
120 errorString = QStringLiteral(NM_DBUS_INTERFACE_SECRET_AGENT) % QStringLiteral(".InvalidConnection");
126 errorString = QStringLiteral(NM_DBUS_INTERFACE_SECRET_AGENT) % QStringLiteral(".AgentCanceled");
Implementation of a private D-Bus interface used by secret agents that store and provide secrets to N...
Definition secretagent.h:30
SecretAgent(const QString &id, QObject *parent=nullptr)
Registers a SecretAgent with the id on NetworkManager Optionally add a capabilities argument.
Definition secretagent.cpp:90
void sendError(Error error, const QString &explanation, const QDBusMessage &callMessage=QDBusMessage()) const
Send to NetworkManager the error the subclass has found, the explanation is useful for debugging purp...
Definition secretagent.cpp:110
Capabilities capabilities()
This class allows querying the underlying system to discover the available network interfaces and rea...
Definition accesspoint.h:21
ExportAllSlots
InvalidMessage
QDBusMessage createErrorReply(QDBusError::ErrorType type, const QString &msg) const const
MessageType type() const const
void serviceRegistered(const QString &serviceName)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QString fromLatin1(QByteArrayView str)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:59:05 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:59:05 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.