KDECore
DBusHelperProxy.cpp
Go to the documentation of this file.
48 message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.auth"), QLatin1String("stopAction"));
57bool DBusHelperProxy::executeActions(const QList<QPair<QString, QVariantMap> > &list, const QString &helperID)
66 if (!QDBusConnection::systemBus().connect(helperID, QLatin1String("/"), QLatin1String("org.kde.auth"), QLatin1String("remoteSignal"), this, SLOT(remoteSignalReceived(int,QString,QByteArray)))) {
71 message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.auth"), QLatin1String("performActions"));
77 QDBusPendingCall reply = QDBusConnection::systemBus().asyncCall(message); // This is a NO_REPLY method
85ActionReply DBusHelperProxy::executeAction(const QString &action, const QString &helperID, const QVariantMap &arguments)
98 if (!QDBusConnection::systemBus().connect(helperID, QLatin1String("/"), QLatin1String("org.kde.auth"), QLatin1String("remoteSignal"), this, SLOT(remoteSignalReceived(int,QString,QByteArray)))) {
106 message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.auth"), QLatin1String("performAction"));
137 errorReply.setErrorDescription(i18n("DBus Backend error: received corrupt data from helper %1 %2",
149Action::AuthStatus DBusHelperProxy::authorizeAction(const QString& action, const QString& helperID)
158 message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.auth"), QLatin1String("authorizeAction"));
297QByteArray DBusHelperProxy::performAction(const QString &action, const QByteArray &callerID, QByteArray arguments)
Class that encapsulates a reply coming from the helper after executing an action.
Definition: kauthactionreply.h:371
static const ActionReply AuthorizationDeniedReply
errorCode() == AuthorizationDenied
Definition: kauthactionreply.h:391
void setErrorDescription(const QString &error)
Sets a human-readble description of the error.
Definition: kauthactionreply.cpp:134
static ActionReply deserialize(const QByteArray &data)
Deserialize a reply from a QByteArray.
Definition: kauthactionreply.cpp:149
QByteArray serialized() const
Serialize the reply into a QByteArray.
Definition: kauthactionreply.cpp:139
static const ActionReply NoResponderReply
errorCode() == NoResponder
Definition: kauthactionreply.h:388
static const ActionReply NoSuchActionReply
errorCode() == NoSuchAction
Definition: kauthactionreply.h:389
@ Authorized
The authorization has been granted by the authorization backend.
Definition: kauthaction.h:82
@ VerifyAgainstDBusServiceName
Definition: AuthBackend.h:48
@ VerifyAgainstDBusServicePid
Definition: AuthBackend.h:49
@ NoExtraCallerIDVerificationMethod
Definition: AuthBackend.h:47
virtual QByteArray callerID() const =0
virtual bool isCallerAuthorized(const QString &action, QByteArray callerID)=0
static AuthBackend * authBackend()
Definition: BackendsManager.cpp:120
Definition: DBusHelperProxy.h:33
virtual bool executeActions(const QList< QPair< QString, QVariantMap > > &list, const QString &helperID)
Definition: DBusHelperProxy.cpp:57
QByteArray performAction(const QString &action, const QByteArray &callerID, QByteArray arguments)
Definition: DBusHelperProxy.cpp:297
virtual void sendProgressStep(int step)
Definition: DBusHelperProxy.cpp:387
void performActions(QByteArray blob, const QByteArray &callerID)
Definition: DBusHelperProxy.cpp:254
virtual void sendDebugMessage(int level, const char *msg)
Definition: DBusHelperProxy.cpp:377
uint authorizeAction(const QString &action, const QByteArray &callerID)
Definition: DBusHelperProxy.cpp:351
virtual ActionReply executeAction(const QString &action, const QString &helperID, const QVariantMap &arguments)
Definition: DBusHelperProxy.cpp:85
virtual bool initHelper(const QString &name)
Definition: DBusHelperProxy.cpp:183
virtual bool hasToStopAction()
Definition: DBusHelperProxy.cpp:246
virtual void setHelperResponder(QObject *o)
Definition: DBusHelperProxy.cpp:200
void remoteSignal(int type, const QString &action, const QByteArray &blob)
void stopAction(const QString &action)
Definition: DBusHelperProxy.cpp:237
void progressStep(const QString &action, int progress)
void actionPerformed(const QString &action, ActionReply reply)
void actionStarted(const QString &action)
Definition: kaboutdata.h:33
QString i18n(const char *text)
Returns a localized version of a string.
Definition: klocalizedstring.h:630
Definition: AuthBackend.cpp:24
static void debugMessageReceived(int t, const QString &message)
Definition: DBusHelperProxy.cpp:407
void message(KMessage::MessageType messageType, const QString &text, const QString &caption=QString())
Display a long message of a certain type.
Definition: kmessage.cpp:92
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.