QDBusMessage Class

The QDBusMessage class represents one message sent or received over the D-Bus bus. More...

Header: #include <QDBusMessage>
qmake: QT += dbus
Since: Qt 4.2

This class was introduced in Qt 4.2.

Public Types

enum MessageType { MethodCallMessage, SignalMessage, ReplyMessage, ErrorMessage, InvalidMessage }

Detailed Description

This object can represent any of the four different types of messages (MessageType) that can occur on the bus:

  • Method calls
  • Method return values
  • Signal emissions
  • Error codes

Objects of this type are created with the static createError(), createMethodCall() and createSignal() functions. Use the QDBusConnection::send() function to send the messages.

Member Type Documentation

enum QDBusMessage::MessageType

The possible message types:

ConstantValueDescription
QDBusMessage::MethodCallMessage1a message representing an outgoing or incoming method call
QDBusMessage::SignalMessage4a message representing an outgoing or incoming signal emission
QDBusMessage::ReplyMessage2a message representing the return values of a method call
QDBusMessage::ErrorMessage3a message representing an error condition in response to a method call
QDBusMessage::InvalidMessage0an invalid message: this is never set on messages received from D-Bus