KDECore
DBusHelperProxy.cpp
Go to the documentation of this file.
48 message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.auth"), QLatin1String("stopAction"));
57 bool 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
85 ActionReply 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",
149 Action::AuthStatus DBusHelperProxy::authorizeAction(const QString& action, const QString& helperID)
158 message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.auth"), QLatin1String("authorizeAction"));
297 QByteArray DBusHelperProxy::performAction(const QString &action, const QByteArray &callerID, QByteArray arguments)
void message(KMessage::MessageType messageType, const QString &text, const QString &caption=QString())
Display a long message of a certain type.
Definition: kmessage.cpp:92
QString i18n(const char *text)
Returns a localized version of a string.
Definition: klocalizedstring.h:630
virtual bool isCallerAuthorized(const QString &action, QByteArray callerID)=0
virtual void setHelperResponder(QObject *o)
Definition: DBusHelperProxy.cpp:200
static AuthBackend * authBackend()
Definition: BackendsManager.cpp:120
virtual bool hasToStopAction()
Definition: DBusHelperProxy.cpp:246
static const ActionReply HelperBusyReply
errorCode() == HelperBusy
Definition: kauthactionreply.h:393
virtual bool executeActions(const QList< QPair< QString, QVariantMap > > &list, const QString &helperID)
Definition: DBusHelperProxy.cpp:57
static const ActionReply NoResponderReply
errorCode() == NoResponder
Definition: kauthactionreply.h:388
virtual ActionReply executeAction(const QString &action, const QString &helperID, const QVariantMap &arguments)
Definition: DBusHelperProxy.cpp:85
virtual void sendProgressStep(int step)
Definition: DBusHelperProxy.cpp:387
static const ActionReply AuthorizationDeniedReply
errorCode() == AuthorizationDenied
Definition: kauthactionreply.h:391
The authorization has been denied by the authorization backend.
Definition: kauthaction.h:79
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
The authorization has been granted by the authorization backend.
Definition: kauthaction.h:82
virtual void sendDebugMessage(int level, const char *msg)
Definition: DBusHelperProxy.cpp:377
virtual Action::AuthStatus authorizeAction(const QString &action, const QString &helperID)
Definition: DBusHelperProxy.cpp:149
static const ActionReply NoSuchActionReply
errorCode() == NoSuchAction
Definition: kauthactionreply.h:389
virtual QByteArray callerID() const =0
virtual void stopAction(const QString &action, const QString &helperID)
Definition: DBusHelperProxy.cpp:45
void actionStarted(const QString &action)
static void debugMessageReceived(int t, const QString &message)
Definition: DBusHelperProxy.cpp:407
Definition: DBusHelperProxy.h:32
QByteArray serialized() const
Serialize the reply into a QByteArray.
Definition: kauthactionreply.cpp:139
Class that encapsulates a reply coming from the helper after executing an action. ...
Definition: kauthactionreply.h:370
QByteArray performAction(const QString &action, const QByteArray &callerID, QByteArray arguments)
Definition: DBusHelperProxy.cpp:297
virtual bool initHelper(const QString &name)
Definition: DBusHelperProxy.cpp:183
void remoteSignal(int type, const QString &action, const QByteArray &blob)
void progressStep(const QString &action, int progress)
void actionPerformed(const QString &action, ActionReply reply)
void performActions(QByteArray blob, const QByteArray &callerID)
Definition: DBusHelperProxy.cpp:254
This file is part of the KDE documentation.
Documentation copyright © 1996-2018 The KDE developers.
Generated on Sun Feb 11 2018 21:12:35 by doxygen 1.8.14 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2018 The KDE developers.
Generated on Sun Feb 11 2018 21:12:35 by doxygen 1.8.14 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.