swift
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 
11 namespace swift::misc
12 {
13  class CGenericDBusInterface;
14 
15  namespace shared_state::dbus
16  {
20  class SWIFT_MISC_EXPORT CDuplexProxy final : public IDuplex
21  {
22  Q_OBJECT
23  Q_CLASSINFO("D-Bus Interface", SWIFT_MISC_DUPLEX_INTERFACE)
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:66
Value object encapsulating a list of variants.
Definition: variantlist.h:29
Client side implementation of IDuplex, through which the client communicates with the server.
Definition: duplexproxy.h:21
Abstract interface for the spoke in a star topology.
Definition: duplex.h:36
#define SWIFT_MISC_DUPLEX_INTERFACE
DBus interface for sharedstate hub.
Definition: duplex.h:19
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.