KAuth
actionreply.cpp
33 QVariantMap data; // User-defined data for success and helper error replies, empty for kauth errors
Class that encapsulates a reply coming from the helper after executing an action.
Definition actionreply.h:335
static const ActionReply SuccessReply()
An empty successful reply. Same as using the default constructor.
Definition actionreply.cpp:40
static const ActionReply InvalidActionReply()
errorCode() == InvalidAction
Definition actionreply.cpp:64
bool operator!=(const ActionReply &reply) const
Negated comparison operator.
Definition actionreply.cpp:228
void addData(const QString &key, const QVariant &value)
Convenience method to add some data to the reply.
Definition actionreply.cpp:125
static const ActionReply NoSuchActionReply()
errorCode() == NoSuchAction
Definition actionreply.cpp:60
void setErrorDescription(const QString &error)
Sets a human-readble description of the error.
Definition actionreply.cpp:183
static const ActionReply HelperErrorReply()
An empty reply with type() == HelperError and errorCode() == -1.
Definition actionreply.cpp:44
QString errorDescription() const
Gets a human-readble description of the error, if available.
Definition actionreply.cpp:178
Error
The enumeration of the possible values of errorCode() when type() is ActionReply::KAuthError.
Definition actionreply.h:362
@ AuthorizationDeniedError
You don't have the authorization to execute the action.
Definition actionreply.h:367
@ NoResponderError
The helper responder object hasn't been set. This shouldn't happen if you use the KAUTH_HELPER macro ...
Definition actionreply.h:364
@ HelperBusyError
The helper is busy executing another action (or group of actions). Try later.
Definition actionreply.h:369
@ AlreadyStartedError
The action was already started and is currently running.
Definition actionreply.h:370
void setErrorCode(Error errorCode)
Sets the error code of an error reply.
Definition actionreply.cpp:160
ActionReply()
Default constructor. Sets type() to Success and errorCode() to zero.
Definition actionreply.cpp:95
static ActionReply deserialize(const QByteArray &data)
Deserialize a reply from a QByteArray.
Definition actionreply.cpp:198
static const ActionReply UserCancelledReply()
errorCode() == UserCancelled
Definition actionreply.cpp:72
static const ActionReply AuthorizationDeniedReply()
errorCode() == AuthorizationDenied
Definition actionreply.cpp:68
static const ActionReply AlreadyStartedReply()
errorCode() == AlreadyStartedError
Definition actionreply.cpp:80
void setData(const QVariantMap &data)
Sets the custom data to send back to the application.
Definition actionreply.cpp:120
QVariantMap data() const
Returns the custom data coming from the helper.
Definition actionreply.cpp:130
Definition action.cpp:19
WriteOnly
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 11:59:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 11:59:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.