swift
Loading...
Searching...
No Matches
duplexproxy.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2020 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_MISC_SHAREDSTATE_DBUS_DUPLEXPROXY_H
7#define SWIFT_MISC_SHAREDSTATE_DBUS_DUPLEXPROXY_H
8
10
11namespace swift::misc
12{
14
15 namespace shared_state::dbus
16 {
21 {
24
25 public:
27 CDuplexProxy(const QDBusConnection &connection, const QString &service, QObject *parent = nullptr);
28
29 public slots:
32
34 void postEvent(const QString &channel, const swift::misc::CVariant &param) override;
35
37 void setSubscription(const QString &channel, const swift::misc::CVariantList &filters) override;
38
40 void requestPeerSubscriptions() override;
41
43 void submitRequest(const QString &channel, const swift::misc::CVariant &param, quint32 token) override;
44
46 void reply(const swift::misc::CVariant &param, quint32 token) override;
47
49 void advertise(const QString &channel) override;
50
52 void withdraw(const QString &channel) override;
54
55 private:
56 CGenericDBusInterface *m_interface = nullptr;
57 };
58 } // namespace shared_state::dbus
59} // namespace swift::misc
60
61#endif // SWIFT_MISC_SHAREDSTATE_DBUS_DUPLEXPROXY_H
Used for hand written interface based on virtual methods.
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
Definition variant.h:69
Value object encapsulating a list of variants.
Definition variantlist.h:29
void withdraw(const QString &channel)
Client advertises that it can no longer handle requests for the given channel.
void postEvent(const QString &channel, const swift::misc::CVariant &param)
Client posts an event to the server.
void submitRequest(const QString &channel, const swift::misc::CVariant &param, quint32 token)
Client submits a request to the server. Reply is returned via a future.
void setSubscription(const QString &channel, const swift::misc::CVariantList &filters)
Client announces its subscription to an event channel.
void requestPeerSubscriptions()
Client requests to be notified of all other clients' subscriptions.
void reply(const swift::misc::CVariant &param, quint32 token)
Client replies to a submitted request.
void advertise(const QString &channel)
Client advertises that it can handle requests for the given channel.
CDuplexProxy(const QDBusConnection &connection, const QString &service, QObject *parent=nullptr)
Constructor.
IDuplex(QObject *parent=nullptr)
Constructor.
Definition duplex.cpp:10
#define SWIFT_MISC_DUPLEX_INTERFACE
DBus interface for sharedstate hub.
Definition duplex.h:19
Free functions in swift::misc.
QObject(QObject *parent)
Q_CLASSINFO(Name, Value)
Q_OBJECTQ_OBJECT
QObject * parent() const const
#define SWIFT_MISC_EXPORT
Export a class or function from the library.