swift
Loading...
Searching...
No Matches
XSwiftBus::CDBusMessage Class Reference

DBus Message. More...

#include <dbusmessage.h>

Public Member Functions

 ~CDBusMessage ()
 Destructor.
CDBusMessage & operator= (CDBusMessage other)
 Assignment operator.
bool isMethodCall () const
 Is this message a method call?
bool wantsReply () const
 Does this message want a reply?
std::string getSender () const
 Get the message sender.
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.
std::string_view getObjectPath () const
 Get the called object path.
std::string_view getMethodName () const
 Get the called method name.
void beginArgumentWrite ()
 Begin writing argument.
void beginArgumentRead ()
 Begin reading arguments.
 CDBusMessage (DBusMessage *message)
 Constructor.
 CDBusMessage (const CDBusMessage &other)
 Constructor.
void appendArgument (bool value)
 Append argument. Make sure to call.
void appendArgument (const char *value)
 Append argument. Make sure to call.
void appendArgument (const std::string &value)
 Append argument. Make sure to call.
void appendArgument (int value)
 Append argument. Make sure to call.
void appendArgument (double value)
 Append argument. Make sure to call.
void appendArgument (const std::vector< bool > &array)
 Append argument. Make sure to call.
void appendArgument (const std::vector< double > &array)
 Append argument. Make sure to call.
void appendArgument (const std::vector< std::string > &array)
 Append argument. Make sure to call.
void getArgument (int &value)
 Read single argument. Make sure to call.
void getArgument (bool &value)
 Read single argument. Make sure to call.
void getArgument (double &value)
 Read single argument. Make sure to call.
void getArgument (std::string &value)
 Read single argument. Make sure to call.
void getArgument (std::vector< int > &value)
 Read single argument. Make sure to call.
void getArgument (std::vector< bool > &value)
 Read single argument. Make sure to call.
void getArgument (std::vector< double > &value)
 Read single argument. Make sure to call.
void getArgument (std::vector< std::string > &value)
 Read single argument. Make sure to call.

Static Public Member Functions

static CDBusMessage createSignal (const std::string &path, const std::string &interfaceName, const std::string &signalName)
 Creates a DBus message containing a DBus signal.
static CDBusMessage createReply (const std::string &destination, dbus_uint32_t serial)
 Creates a DBus message containing a DBus reply.

Friends

class CDBusConnection

Detailed Description

DBus Message.

Definition at line 16 of file dbusmessage.h.

Constructor & Destructor Documentation

◆ CDBusMessage() [1/2]

XSwiftBus::CDBusMessage::CDBusMessage ( DBusMessage * message)

Constructor.

Definition at line 9 of file dbusmessage.cpp.

◆ CDBusMessage() [2/2]

XSwiftBus::CDBusMessage::CDBusMessage ( const CDBusMessage & other)

Constructor.

Definition at line 11 of file dbusmessage.cpp.

◆ ~CDBusMessage()

XSwiftBus::CDBusMessage::~CDBusMessage ( )

Destructor.

Definition at line 23 of file dbusmessage.cpp.

Member Function Documentation

◆ appendArgument() [1/8]

void XSwiftBus::CDBusMessage::appendArgument ( bool value)

Append argument. Make sure to call.

See also
beginArgumentWrite() before.

Definition at line 55 of file dbusmessage.cpp.

◆ appendArgument() [2/8]

void XSwiftBus::CDBusMessage::appendArgument ( const char * value)

Append argument. Make sure to call.

See also
beginArgumentWrite() before.

Definition at line 61 of file dbusmessage.cpp.

◆ appendArgument() [3/8]

void XSwiftBus::CDBusMessage::appendArgument ( const std::string & value)

Append argument. Make sure to call.

See also
beginArgumentWrite() before.

Definition at line 66 of file dbusmessage.cpp.

◆ appendArgument() [4/8]

void XSwiftBus::CDBusMessage::appendArgument ( const std::vector< bool > & array)

Append argument. Make sure to call.

See also
beginArgumentWrite() before.

Definition at line 83 of file dbusmessage.cpp.

◆ appendArgument() [5/8]

void XSwiftBus::CDBusMessage::appendArgument ( const std::vector< double > & array)

Append argument. Make sure to call.

See also
beginArgumentWrite() before.

Definition at line 102 of file dbusmessage.cpp.

◆ appendArgument() [6/8]

void XSwiftBus::CDBusMessage::appendArgument ( const std::vector< std::string > & array)

Append argument. Make sure to call.

See also
beginArgumentWrite() before.

Definition at line 112 of file dbusmessage.cpp.

◆ appendArgument() [7/8]

void XSwiftBus::CDBusMessage::appendArgument ( double value)

Append argument. Make sure to call.

See also
beginArgumentWrite() before.

Definition at line 78 of file dbusmessage.cpp.

◆ appendArgument() [8/8]

void XSwiftBus::CDBusMessage::appendArgument ( int value)

Append argument. Make sure to call.

See also
beginArgumentWrite() before.

Definition at line 72 of file dbusmessage.cpp.

◆ beginArgumentRead()

void XSwiftBus::CDBusMessage::beginArgumentRead ( )

Begin reading arguments.

Definition at line 125 of file dbusmessage.cpp.

◆ beginArgumentWrite()

void XSwiftBus::CDBusMessage::beginArgumentWrite ( )

Begin writing argument.

Definition at line 53 of file dbusmessage.cpp.

◆ createReply()

CDBusMessage XSwiftBus::CDBusMessage::createReply ( const std::string & destination,
dbus_uint32_t serial )
static

Creates a DBus message containing a DBus reply.

Definition at line 270 of file dbusmessage.cpp.

◆ createSignal()

CDBusMessage XSwiftBus::CDBusMessage::createSignal ( const std::string & path,
const std::string & interfaceName,
const std::string & signalName )
static

Creates a DBus message containing a DBus signal.

Definition at line 263 of file dbusmessage.cpp.

◆ getArgument() [1/8]

void XSwiftBus::CDBusMessage::getArgument ( bool & value)

Read single argument. Make sure to call.

See also
beginArgumentRead() before.

Definition at line 139 of file dbusmessage.cpp.

◆ getArgument() [2/8]

void XSwiftBus::CDBusMessage::getArgument ( double & value)

Read single argument. Make sure to call.

See also
beginArgumentRead() before.

Definition at line 158 of file dbusmessage.cpp.

◆ getArgument() [3/8]

void XSwiftBus::CDBusMessage::getArgument ( int & value)

Read single argument. Make sure to call.

See also
beginArgumentRead() before.

Definition at line 127 of file dbusmessage.cpp.

◆ getArgument() [4/8]

void XSwiftBus::CDBusMessage::getArgument ( std::string & value)

Read single argument. Make sure to call.

See also
beginArgumentRead() before.

Definition at line 168 of file dbusmessage.cpp.

◆ getArgument() [5/8]

void XSwiftBus::CDBusMessage::getArgument ( std::vector< bool > & value)

Read single argument. Make sure to call.

See also
beginArgumentRead() before.

Definition at line 198 of file dbusmessage.cpp.

◆ getArgument() [6/8]

void XSwiftBus::CDBusMessage::getArgument ( std::vector< double > & value)

Read single argument. Make sure to call.

See also
beginArgumentRead() before.

Definition at line 227 of file dbusmessage.cpp.

◆ getArgument() [7/8]

void XSwiftBus::CDBusMessage::getArgument ( std::vector< int > & value)

Read single argument. Make sure to call.

See also
beginArgumentRead() before.

Definition at line 180 of file dbusmessage.cpp.

◆ getArgument() [8/8]

void XSwiftBus::CDBusMessage::getArgument ( std::vector< std::string > & value)

Read single argument. Make sure to call.

See also
beginArgumentRead() before.

Definition at line 245 of file dbusmessage.cpp.

◆ getInterfaceName()

std::string_view XSwiftBus::CDBusMessage::getInterfaceName ( ) const

Get the called interface name.

Definition at line 47 of file dbusmessage.cpp.

◆ getMethodName()

std::string_view XSwiftBus::CDBusMessage::getMethodName ( ) const

Get the called method name.

Definition at line 51 of file dbusmessage.cpp.

◆ getObjectPath()

std::string_view XSwiftBus::CDBusMessage::getObjectPath ( ) const

Get the called object path.

Definition at line 49 of file dbusmessage.cpp.

◆ getSender()

std::string XSwiftBus::CDBusMessage::getSender ( ) const

Get the message sender.

Definition at line 39 of file dbusmessage.cpp.

◆ getSerial()

dbus_uint32_t XSwiftBus::CDBusMessage::getSerial ( ) const

Get the message serial. This is usally required for reply message.

Definition at line 45 of file dbusmessage.cpp.

◆ isMethodCall()

bool XSwiftBus::CDBusMessage::isMethodCall ( ) const

Is this message a method call?

Definition at line 32 of file dbusmessage.cpp.

◆ operator=()

CDBusMessage & XSwiftBus::CDBusMessage::operator= ( CDBusMessage other)

Assignment operator.

Definition at line 25 of file dbusmessage.cpp.

◆ wantsReply()

bool XSwiftBus::CDBusMessage::wantsReply ( ) const

Does this message want a reply?

Definition at line 37 of file dbusmessage.cpp.

◆ CDBusConnection

friend class CDBusConnection
friend

Definition at line 90 of file dbusmessage.h.


The documentation for this class was generated from the following files: