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  virtual void postEvent(const QString &channel, const swift::misc::CVariant &param) override;
35 
37  virtual void setSubscription(const QString &channel, const swift::misc::CVariantList &filters) override;
38 
40  virtual void requestPeerSubscriptions() override;
41 
43  virtual void submitRequest(const QString &channel, const swift::misc::CVariant &param,
44  quint32 token) override;
45 
47  virtual void reply(const swift::misc::CVariant &param, quint32 token) override;
48 
50  virtual void advertise(const QString &channel) override;
51 
53  virtual void withdraw(const QString &channel) override;
55 
56  private:
57  CGenericDBusInterface *m_interface = nullptr;
58  };
59  } // namespace shared_state::dbus
60 } // namespace swift::misc
61 
62 #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.