|
swift
|
DBus connection. More...
#include <dbusserver.h>
Public Types | |
| using | NewConnectionFunc = std::function<void(std::shared_ptr<CDBusConnection>)> |
| New connection handler function. | |
Public Member Functions | |
| CDBusServer () | |
| Constructor. | |
| virtual | ~CDBusServer () |
| Destructor. | |
| void | setDispatcher (CDBusDispatcher *dispatcher) |
| Set the dispatcher. | |
| bool | listen (const std::string &address) |
| Connect to bus. | |
| bool | isConnected () const |
| Is connected? | |
| void | dispatch () |
| Dispatch execution method. | |
| void | close () |
| Close connection. | |
| const CDBusError & | lastError () const |
| Get the last error. | |
| void | setNewConnectionFunc (const NewConnectionFunc &func) |
| Set the function to be used for handling new connections. | |
| Public Member Functions inherited from XSwiftBus::IDispatchable | |
| IDispatchable ()=default | |
| Default constructor. | |
| virtual | ~IDispatchable ()=default |
| Default destructor. | |
DBus connection.
Definition at line 30 of file dbusserver.h.
| using XSwiftBus::CDBusServer::NewConnectionFunc = std::function<void(std::shared_ptr<CDBusConnection>)> |
New connection handler function.
Definition at line 34 of file dbusserver.h.
| XSwiftBus::CDBusServer::CDBusServer | ( | ) |
Constructor.
Definition at line 16 of file dbusserver.cpp.
|
virtual |
Destructor.
Definition at line 18 of file dbusserver.cpp.
| void XSwiftBus::CDBusServer::close | ( | ) |
Close connection.
Definition at line 37 of file dbusserver.cpp.
|
inlinevirtual |
Dispatch execution method.
Implements XSwiftBus::IDispatchable.
Definition at line 51 of file dbusserver.h.
| bool XSwiftBus::CDBusServer::isConnected | ( | ) | const |
Is connected?
Definition at line 35 of file dbusserver.cpp.
|
inline |
Get the last error.
Definition at line 57 of file dbusserver.h.
| bool XSwiftBus::CDBusServer::listen | ( | const std::string & | address | ) |
Connect to bus.
Definition at line 20 of file dbusserver.cpp.
| void XSwiftBus::CDBusServer::setDispatcher | ( | CDBusDispatcher * | dispatcher | ) |
Set the dispatcher.
Definition at line 45 of file dbusserver.cpp.
|
inline |
Set the function to be used for handling new connections.
Definition at line 60 of file dbusserver.h.