13 namespace swift::misc::shared_state::dbus
16 :
IHub(parent), m_service(service)
27 auto duplex = QSharedPointer<CDuplexProxy>::create(m_interface->connection(), m_service,
this);
28 connect(duplex.get(), &QObject::destroyed,
this, [=] { closeDuplex(identifier); });
34 return m_interface->
callDBusRet<
bool>(QLatin1String(
"openDuplex"), client);
39 m_interface->
callDBus(QLatin1String(
"closeDuplex"), client);
44 return m_interface->
callDBusFuture<
bool>(QLatin1String(
"openDuplex"), client);
Used for hand written interface based on virtual methods.
QFuture< Ret > callDBusFuture(QLatin1String method, Args &&...args)
Call DBus with asynchronous return as a future.
void callDBus(QLatin1String method, Args &&...args)
Call DBus, no return value.
void relayParentSignals()
For each signal in parent, attempt to connect to it an interface signal of the same name.
Ret callDBusRet(QLatin1String method, Args &&...args)
Call DBus with synchronous return value.
Value object encapsulating information identifying a component of a modular distributed swift process...
static const CIdentifier & anonymous()
Returns an anonymous identifier, which is a valid identifier without name.
virtual QFuture< bool > openDuplexAsync(const CIdentifier &client)
Create a duplex object for the identified process.
CHubProxy(const QDBusConnection &connection, const QString &service, QObject *parent=nullptr)
Constructor.
virtual void closeDuplex(const swift::misc::CIdentifier &client)
Destroy the duplex object for the identified process.
virtual ~CHubProxy()
Destructor.
virtual bool isConnected() const
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 bool openDuplex(const swift::misc::CIdentifier &client)
Create a duplex object for the identified process.
Abstract interface for the hub in a star topology.
#define SWIFT_MISC_HUB_INTERFACE
DBus interface for sharedstate hub.
#define SWIFT_MISC_HUB_PATH
DBus object path root for sharedstate hub.