FlightGear next
|
DBus connection. More...
#include <dbusserver.h>
Inherits flightgear::swift::IDispatchable.
Public Types | |
using | NewConnectionFunc = std::function<void(std::shared_ptr<CDBusConnection>)> |
New connection handler function. | |
Public Member Functions | |
CDBusServer () | |
Constructor. | |
~CDBusServer () override | |
Destructor. | |
void | setDispatcher (CDBusDispatcher *dispatcher) |
Set the dispatcher. | |
bool | listen (const std::string &address) |
Connect to bus. | |
bool | isConnected () const |
Is connected? | |
void | dispatch () override |
Dispatch execution method. | |
void | close () |
Close connection. | |
CDBusError | lastError () const |
Get the last error. | |
void | setNewConnectionFunc (const NewConnectionFunc &func) |
Set the function to be used for handling new connections. | |
![]() | |
IDispatchable ()=default | |
Default constructor. | |
virtual | ~IDispatchable ()=default |
Default destructor. | |
DBus connection.
Definition at line 27 of file dbusserver.h.
using flightgear::swift::CDBusServer::NewConnectionFunc = std::function<void(std::shared_ptr<CDBusConnection>)> |
New connection handler function.
Definition at line 31 of file dbusserver.h.
flightgear::swift::CDBusServer::CDBusServer | ( | ) |
Constructor.
Definition at line 15 of file dbusserver.cpp.
|
override |
Destructor.
Definition at line 20 of file dbusserver.cpp.
void flightgear::swift::CDBusServer::close | ( | ) |
Close connection.
Definition at line 44 of file dbusserver.cpp.
|
inlineoverridevirtual |
Dispatch execution method.
Implements flightgear::swift::IDispatchable.
Definition at line 48 of file dbusserver.h.
bool flightgear::swift::CDBusServer::isConnected | ( | ) | const |
Is connected?
Definition at line 39 of file dbusserver.cpp.
|
inline |
Get the last error.
Definition at line 54 of file dbusserver.h.
bool flightgear::swift::CDBusServer::listen | ( | const std::string & | address | ) |
Connect to bus.
Definition at line 25 of file dbusserver.cpp.
void flightgear::swift::CDBusServer::setDispatcher | ( | CDBusDispatcher * | dispatcher | ) |
Set the dispatcher.
Definition at line 49 of file dbusserver.cpp.
|
inline |
Set the function to be used for handling new connections.
Definition at line 57 of file dbusserver.h.