KAuth
DBusHelperProxy.cpp
53 message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.kf6auth"), QLatin1String("stopAction"));
62void DBusHelperProxy::executeAction(const QString &action, const QString &helperID, const DetailsMap &details, const QVariantMap &arguments, int timeout)
84 errorReply.setErrorDescription(tr("DBus Backend error: service start %1 failed: %2").arg(helperID, reply.error().message()));
99 errorReply.setErrorDescription(tr("DBus Backend error: connection to helper failed. %1\n(application: %2 helper: %3)")
106 message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.kf6auth"), QLatin1String("performAction"));
109 args << action << BackendsManager::authBackend()->callerID() << BackendsManager::authBackend()->backendDetails(details) << blob << QVariant::fromValue(fds);
118 connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, action, args, message, watcher, timeout]() mutable {
149 qCWarning(KAUTH) << "Error registering helper DBus service" << name << m_busConnection.lastError().message();
154 qCWarning(KAUTH) << "Error registering helper DBus object:" << m_busConnection.lastError().message();
214bool DBusHelperProxy::isCallerAuthorized(const QString &action, const QByteArray &callerID, const QVariantMap &details)
216 Q_UNUSED(callerID); // this only exists for the benefit of the mac backend. We obtain our callerID from dbus!
217 return BackendsManager::authBackend()->isCallerAuthorized(action, message().service().toUtf8(), details);
234 // Make sure we don't try restoring gui variants, in particular QImage/QPixmap/QIcon are super dangerous
235 // since they end up calling the image loaders and thus are a vector for crashing → executing code
281 success = method.invoke(responder, Qt::DirectConnection, Q_RETURN_ARG(KAuth::ActionReply, retVal), Q_ARG(QVariantMap, args));
283 success = method.invoke(responder, Qt::DirectConnection, Q_RETURN_ARG(ActionReply, retVal), Q_ARG(QVariantMap, args));
Class that encapsulates a reply coming from the helper after executing an action.
Definition actionreply.h:335
Type type(const QSqlDatabase &db)
KAUTHCORE_EXPORT void progressStep(int step)
Send a progressStep signal to the caller application.
Definition helpersupport.cpp:138
Definition action.cpp:19
QStringView level(QStringView ifopt)
QString name(StandardAction id)
char * data()
Block
QString interface() const const
QDBusReply< uint > serviceUid(const QString &serviceName) const const
InvalidArgs
ErrorMessage
QDBusMessage createMethodCall(const QString &service, const QString &path, const QString &interface, const QString &method)
QString errorMessage() const const
void setArguments(const QList< QVariant > &arguments)
MessageType type() const const
void finished(QDBusPendingCallWatcher *self)
AllEvents
bool processEvents(ProcessEventsFlags flags)
WriteOnly
qsizetype count() const const
void removeAt(qsizetype i)
auto asKeyValueRange() &
iterator insert(const Key &key, const T &value)
bool invoke(QObject *obj, Args &&... arguments) const const
bool isValid() const const
const char * typeName() const const
QMetaType fromType()
QVariant property(const char *name) const const
QString fromLocal8Bit(QByteArrayView str)
qsizetype length() const const
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
QString right(qsizetype n) const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
QByteArray toLatin1() const const
DirectConnection
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void start()
void stop()
QVariant fromValue(T &&value)
T value() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.