12namespace swift::misc::shared_state::dbus
25 return std::make_pair(m_clients.value(identifier), future);
30 if (!m_clients.contains(client))
41 m_clients.take(client);
57 const auto clients = std::move(m_clients);
void addObject(const QString &name, QObject *object)
Add a QObject to be exposed via DBus.
Value object encapsulating information identifying a component of a modular distributed swift process...
A promise-based interface to QFuture, similar to std::promise for std::future.
QFuture< T > future()
Return a future that can be used to access the result.
void setResult(const T &value)
Set the result value that will be made available through the future.
bool openDuplex(const swift::misc::CIdentifier &client)
Create a duplex object for the identified process.
CHub(CDBusServer *server, QObject *parent=nullptr)
Constructor.
QFuture< bool > openDuplexAsync(const CIdentifier &client)
Create a duplex object for the identified process.
std::pair< QSharedPointer< IDuplex >, QFuture< bool > > getDuplex(const CIdentifier &)
Create a duplex object for the identified process.
const auto & clients() const
Returns a range containing all duplex objects.
void closeDuplex(const swift::misc::CIdentifier &client)
Destroy the duplex object for the identified process.
IHub(QObject *parent=nullptr)
Constructor.
#define SWIFT_MISC_HUB_PATH
DBus object path root for sharedstate hub.
QObject * parent() const const
QSharedPointer< T > create(Args &&... args)