KDECore
kauthactionreply.cpp
Go to the documentation of this file.
31 QVariantMap data; // User-defined data for success and helper error replies, empty for kauth errors
43const ActionReply ActionReply::AuthorizationDeniedReply = ActionReply(ActionReply::AuthorizationDenied);
183 return d << reply.d->data << reply.d->errorCode << (quint32)reply.d->type << reply.d->errorDescription;
Class that encapsulates a reply coming from the helper after executing an action.
Definition: kauthactionreply.h:371
static const ActionReply HelperErrorReply
An empty reply with type() == HelperError.
Definition: kauthactionreply.h:386
bool operator!=(const ActionReply &reply) const
Negated comparison operator.
Definition: kauthactionreply.cpp:176
ActionReply & operator=(const ActionReply &reply)
Assignment operator.
Definition: kauthactionreply.cpp:161
void addData(const QString &key, const QVariant &value)
Convenience method to add some data to the reply.
Definition: kauthactionreply.cpp:86
static const ActionReply SuccessReply
An empty successful reply. Same as using the default constructor.
Definition: kauthactionreply.h:385
bool operator==(const ActionReply &reply) const
Comparison operator.
Definition: kauthactionreply.cpp:171
static const ActionReply InvalidActionReply
errorCode() == InvalidAction
Definition: kauthactionreply.h:390
static const ActionReply AuthorizationDeniedReply
errorCode() == AuthorizationDenied
Definition: kauthactionreply.h:391
static const ActionReply UserCancelledReply
errorCode() == UserCancelled
Definition: kauthactionreply.h:392
void setErrorDescription(const QString &error)
Sets a human-readble description of the error.
Definition: kauthactionreply.cpp:134
QString errorDescription() const
Gets a human-readble description of the error, if available.
Definition: kauthactionreply.cpp:129
@ HelperBusy
The helper is busy executing another action (or group of actions). Try later.
Definition: kauthactionreply.h:406
@ NoResponder
The helper responder object hasn't been set. This shouldn't happen if you use the KDE4_AUTH_HELPER ma...
Definition: kauthactionreply.h:401
@ AuthorizationDenied
You don't have the authorization to execute the action.
Definition: kauthactionreply.h:404
ActionReply()
Default constructor. Sets type() to Success and errorCode() to zero.
Definition: kauthactionreply.cpp:55
static ActionReply deserialize(const QByteArray &data)
Deserialize a reply from a QByteArray.
Definition: kauthactionreply.cpp:149
void setErrorCode(int errorCode)
Sets the error code of an error reply.
Definition: kauthactionreply.cpp:121
void setData(const QVariantMap &data)
Sets the custom data to send back to the application.
Definition: kauthactionreply.cpp:81
QByteArray serialized() const
Serialize the reply into a QByteArray.
Definition: kauthactionreply.cpp:139
static const ActionReply NoResponderReply
errorCode() == NoResponder
Definition: kauthactionreply.h:388
QVariantMap data() const
Returns the custom data coming from the helper.
Definition: kauthactionreply.cpp:91
static const ActionReply NoSuchActionReply
errorCode() == NoSuchAction
Definition: kauthactionreply.h:389
Definition: AuthBackend.cpp:24
QDataStream & operator<<(QDataStream &d, const ActionReply &reply)
Definition: kauthactionreply.cpp:181
QDataStream & operator>>(QDataStream &stream, ActionReply &reply)
Definition: kauthactionreply.cpp:186
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.