4 #ifndef SWIFT_SIM_XSWIFTBUS_DBUSMESSAGE_H
5 #define SWIFT_SIM_XSWIFTBUS_DBUSMESSAGE_H
11 #include "dbus/dbus.h"
84 const std::string &signalName);
92 DBusMessage *m_message =
nullptr;
93 DBusMessageIter m_messageIterator;
94 CDBusMessage(DBusMessage *message, dbus_uint32_t serial);
95 dbus_uint32_t m_serial = 0;
CDBusMessage & operator=(CDBusMessage other)
Assignment operator.
bool wantsReply() const
Does this message want a reply?
bool isMethodCall() const
Is this message a method call?
void appendArgument(bool value)
Append argument. Make sure to call.
void getArgument(int &value)
Read single argument. Make sure to call.
std::string getSender() const
Get the message sender.
std::string_view getObjectPath() const
Get the called object path.
std::string_view getMethodName() const
Get the called method name.
dbus_uint32_t getSerial() const
Get the message serial. This is usally required for reply message.
std::string_view getInterfaceName() const
Get the called interface name.
CDBusMessage(DBusMessage *message)
Constructor.
void beginArgumentRead()
Begin reading arguments.
void beginArgumentWrite()
Begin writing argument.
static CDBusMessage createReply(const std::string &destination, dbus_uint32_t serial)
Creates a DBus message containing a DBus reply.
static CDBusMessage createSignal(const std::string &path, const std::string &interfaceName, const std::string &signalName)
Creates a DBus message containing a DBus signal.
~CDBusMessage()
Destructor.
Plugin loaded by X-Plane which publishes a DBus service.