41 parametersValidated(
false), autoStartService(true),
42 interactiveAuthorizationAllowed(
false)
49 q_dbus_message_unref(
msg);
51 q_dbus_message_unref(
reply);
87 DBusMessage *
msg =
nullptr;
90 switch (d_ptr->
type) {
116 q_dbus_message_set_destination(
msg, q_dbus_message_get_sender(d_ptr->
reply));
117 q_dbus_message_set_reply_serial(
msg, q_dbus_message_get_serial(d_ptr->
reply));
129 q_dbus_message_set_destination(
msg, q_dbus_message_get_sender(d_ptr->
reply));
130 q_dbus_message_set_reply_serial(
msg, q_dbus_message_get_serial(d_ptr->
reply));
158 q_dbus_message_iter_init_append(
msg, &marshaller.
iterator);
170 q_dbus_message_unref(
msg);
214 message.d_ptr->interactiveAuthorizationAllowed = q_dbus_message_get_allow_interactive_authorization(dmsg);
215 message.d_ptr->msg = q_dbus_message_ref(dmsg);
218 demarshaller.
message = q_dbus_message_ref(dmsg);
219 if (q_dbus_message_iter_init(demarshaller.
message, &demarshaller.
iterator))
220 while (!demarshaller.
atEnd())
227 return message.d_ptr->localMessage;
243 if ((
id.
id() != QMetaType::QStringList &&
id.
id() != QMetaType::QByteArray &&
273 d->path = asSent.d_ptr->
path;
275 d->name = asSent.d_ptr->
name;
277 d->type = asSent.d_ptr->
type;
280 d->signature = computedSignature;
281 d->localMessage =
true;
622 return !q_dbus_message_get_no_reply(d_ptr->
msg);
767 switch (d_ptr->
type) {
782#ifndef QT_NO_DEBUG_STREAM
788 return dbg <<
"MethodCall";
790 return dbg <<
"MethodReturn";
792 return dbg <<
"Signal";
794 return dbg <<
"Error";
796 return dbg <<
"Invalid";
805 dbg.nospace() <<
", ";
814 dbg.nospace() <<
"QDBusMessage(type=" << msg.
type()
815 <<
", service=" << msg.
service();
818 dbg.nospace() <<
", path=" << msg.
path()
820 <<
", member=" << msg.
member();
822 dbg.nospace() <<
", error name=" << msg.
errorName()
824 dbg.nospace() <<
", signature=" << msg.
signature()
827 dbg.nospace() <<
") )";
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
bool isEmpty() const noexcept
Returns true if the byte array has size 0; otherwise returns false.
QDBusConnection::ConnectionCapabilities connectionCapabilities() const
QVariant toVariantInternal()
static QString errorString(ErrorType error)
ErrorType
In order to facilitate verification of the most common D-Bus errors generated by the D-Bus implementa...
bool appendVariantInternal(const QVariant &arg)
QList< QVariant > arguments
uint interactiveAuthorizationAllowed
static QDBusMessage fromDBusMessage(DBusMessage *dmsg, QDBusConnection::ConnectionCapabilities capabilities)
QDBusMessage * localReply
static QDBusMessage makeLocalReply(const QDBusConnectionPrivate &conn, const QDBusMessage &asSent)
static DBusMessage * toDBusMessage(const QDBusMessage &message, QDBusConnection::ConnectionCapabilities capabilities, QDBusError *error)
static bool isLocal(const QDBusMessage &msg)
static QDBusMessage makeLocal(const QDBusConnectionPrivate &conn, const QDBusMessage &asSent)
QDBusMessage::MessageType type
static QDBusMessage createSignal(const QString &path, const QString &interface, const QString &name)
Constructs a new DBus message with the given path, interface and name, representing a signal emission...
QString errorName() const
Returns the name of the error that was received.
QDBusMessage()
Constructs an empty, invalid QDBusMessage object.
void setAutoStartService(bool enable)
Sets the auto start flag to enable.
QDBusMessage & operator<<(const QVariant &arg)
Appends the argument arg to the list of arguments to be sent over D-Bus in a method call or signal em...
QString service() const
Returns the name of the service or the bus address of the remote method call.
QDBusMessage createReply(const QList< QVariant > &arguments=QList< QVariant >()) const
Constructs a new DBus message representing a reply, with the given arguments.
void setInteractiveAuthorizationAllowed(bool enable)
Sets the interactive authorization flag to enable.
bool isInteractiveAuthorizationAllowed() const
Returns the interactive authorization allowed flag, as set by setInteractiveAuthorizationAllowed().
QList< QVariant > arguments() const
Returns the list of arguments that are going to be sent or were received from D-Bus.
friend class QDBusMessagePrivate
bool isReplyRequired() const
Returns the flag that indicates if this message should see a reply or not.
void setArguments(const QList< QVariant > &arguments)
Sets the arguments that are going to be sent over D-Bus to arguments.
QString interface() const
Returns the interface of the method being called (in the case of a method call) or of the signal bein...
bool autoStartService() const
Returns the auto start flag, as set by setAutoStartService().
static QDBusMessage createError(const QString &name, const QString &msg)
Constructs a new DBus message representing an error, with the given name and msg.
MessageType type() const
Returns the message type.
QString member() const
Returns the name of the signal that was emitted or the name of the method that was called.
static QDBusMessage createTargetedSignal(const QString &service, const QString &path, const QString &interface, const QString &name)
QString signature() const
Returns the signature of the signal that was received or for the output arguments of a method call.
QDBusMessage & operator=(QDBusMessage &&other) noexcept
bool isDelayedReply() const
Returns the delayed reply flag, as set by setDelayedReply().
MessageType
The possible message types:
QString errorMessage() const
void setDelayedReply(bool enable) const
Sets whether the message will be replied later (if enable is true) or if an automatic reply should be...
static QDBusMessage createMethodCall(const QString &destination, const QString &path, const QString &interface, const QString &method)
Constructs a new DBus message representing a method call.
QString path() const
Returns the path of the object that this message is being sent to (in the case of a method call) or b...
QDBusMessage createErrorReply(const QString &name, const QString &msg) const
Constructs a new DBus message representing an error reply message, with the given name and msg.
~QDBusMessage()
Disposes of the object and frees any resources that were being held.
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
void append(parameter_type t)
QScopedPointer< QObjectData > d_ptr
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QByteArray toUtf8() const &
QString toString() const
Returns the variant as a QString if the variant has a userType() including, but not limited to:
#define DBUS_MESSAGE_TYPE_METHOD_CALL
#define DBUS_MESSAGE_TYPE_ERROR
#define DBUS_MESSAGE_TYPE_METHOD_RETURN
#define DBUS_MESSAGE_TYPE_SIGNAL
#define DBUS_MESSAGE_TYPE_INVALID
QList< QVariant > arguments
bool checkInterfaceName(const QString &name, AllowEmptyFlag empty, QDBusError *error)
QString argumentToString(const QVariant &arg)
bool checkObjectPath(const QString &path, AllowEmptyFlag empty, QDBusError *error)
bool checkErrorName(const QString &name, AllowEmptyFlag empty, QDBusError *error)
bool checkBusName(const QString &name, AllowEmptyFlag empty, QDBusError *error)
bool checkMemberName(const QString &name, AllowEmptyFlag empty, QDBusError *error, const char *nameType=nullptr)
Combined button and popup list for selecting options.
QT_WARNING_POP void qAtomicAssign(T *&d, T *x)
This is a helper for the assignment operators of implicitly shared classes.
size_t qstrlen(const char *str)
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char * interface
DBusConnection const char DBusError * error
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char * method
static void debugVariantList(QDebug dbg, const QVariantList &list)
static QDebug operator<<(QDebug dbg, QDBusMessage::MessageType t)
GLuint GLsizei const GLchar * message
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei const GLchar *const * path
#define qPrintable(string)