12 namespace swift::misc::shared_state::dbus
22 return std::make_pair(m_clients.value(identifier), future);
27 if (!m_clients.contains(client))
29 m_clients.insert(client, QSharedPointer<CDuplex>::create(
this, client, m_server,
this));
38 m_clients.take(client);
54 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.
virtual bool openDuplex(const swift::misc::CIdentifier &client)
Create a duplex object for the identified process.
const auto & clients() const
Returns a range containing all duplex objects.
CHub(CDBusServer *server, QObject *parent=nullptr)
Constructor.
virtual ~CHub()
Destructor.
virtual QFuture< bool > openDuplexAsync(const CIdentifier &client)
Create a duplex object for the identified process.
virtual std::pair< QSharedPointer< IDuplex >, QFuture< bool > > getDuplex(const CIdentifier &)
Create a duplex object for the identified process.
virtual void closeDuplex(const swift::misc::CIdentifier &client)
Destroy the duplex object for the identified process.
Abstract interface for the hub in a star topology.
#define SWIFT_MISC_HUB_PATH
DBus object path root for sharedstate hub.