FlightGear next
|
DBus base object. More...
#include <dbusobject.h>
Inherited by flightgear::swift::CService, and flightgear::swift::CTraffic.
Public Member Functions | |
CDBusObject ()=default | |
Constructor. | |
virtual | ~CDBusObject () |
Destructor. | |
void | setDBusConnection (const std::shared_ptr< CDBusConnection > &dbusConnection) |
Set the assigned DBus connection. | |
void | registerDBusObjectPath (const std::string &interfaceName, const std::string &objectPath) |
Register itself with interfaceName and objectPath. | |
Protected Member Functions | |
virtual void | dbusConnectedHandler () |
Handler which is called when DBusCconnection is established. | |
virtual DBusHandlerResult | dbusMessageHandler (const CDBusMessage &message)=0 |
DBus message handler. | |
virtual void | dbusDisconnectedHandler () |
Handler which is called when DBusConnection disconnected. | |
void | sendDBusSignal (const std::string &name) |
Send DBus signal. | |
void | sendDBusMessage (const CDBusMessage &message) |
Send DBus message. | |
void | maybeSendEmptyDBusReply (bool wantsReply, const std::string &destination, dbus_uint32_t serial) |
Maybe sends an empty DBus reply (acknowledgement) | |
template<typename T> | |
void | sendDBusReply (const std::string &destination, dbus_uint32_t serial, const T &argument) |
Send DBus reply. | |
template<typename T> | |
void | sendDBusReply (const std::string &destination, dbus_uint32_t serial, const std::vector< T > &array) |
Send DBus reply. | |
void | queueDBusCall (const std::function< void()> &func) |
Queue a DBus call to be executed in a different thread. | |
void | invokeQueuedDBusCalls () |
Invoke all pending DBus calls. They will be executed in the calling thread. | |
DBus base object.
Definition at line 15 of file dbusobject.h.
|
default |
Constructor.
|
virtual |
Destructor.
Definition at line 14 of file dbusobject.cpp.
|
inlineprotectedvirtual |
Handler which is called when DBusCconnection is established.
Definition at line 34 of file dbusobject.h.
|
inlineprotectedvirtual |
Handler which is called when DBusConnection disconnected.
Reimplemented in flightgear::swift::CTraffic.
Definition at line 40 of file dbusobject.h.
|
protectedpure virtual |
DBus message handler.
Implemented in flightgear::swift::CService, and flightgear::swift::CTraffic.
|
protected |
Invoke all pending DBus calls. They will be executed in the calling thread.
Definition at line 62 of file dbusobject.cpp.
|
protected |
Maybe sends an empty DBus reply (acknowledgement)
Definition at line 48 of file dbusobject.cpp.
|
protected |
Queue a DBus call to be executed in a different thread.
Definition at line 56 of file dbusobject.cpp.
void flightgear::swift::CDBusObject::registerDBusObjectPath | ( | const std::string & | interfaceName, |
const std::string & | objectPath ) |
Register itself with interfaceName and objectPath.
Definition at line 27 of file dbusobject.cpp.
|
protected |
Send DBus message.
Definition at line 42 of file dbusobject.cpp.
|
inlineprotected |
Send DBus reply.
Definition at line 63 of file dbusobject.h.
|
inlineprotected |
Send DBus reply.
Definition at line 53 of file dbusobject.h.
|
protected |
Send DBus signal.
Definition at line 35 of file dbusobject.cpp.
void flightgear::swift::CDBusObject::setDBusConnection | ( | const std::shared_ptr< CDBusConnection > & | dbusConnection | ) |
Set the assigned DBus connection.
Definition at line 19 of file dbusobject.cpp.