swift
hub.cpp
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 
7 
8 #include <QDBusConnection>
9 
12 
13 namespace swift::misc::shared_state::dbus
14 {
15  IHub::IHub(QObject *parent) : QObject(parent) {}
16 
17  IHub *IHub::create(bool proxy, CDBusServer *server, const QDBusConnection &connection, const QString &service,
18  QObject *parent)
19  {
20  if (proxy) { return new CHubProxy(connection, service, parent); }
21  else { return new CHub(server, parent); }
22  }
23 } // namespace swift::misc::shared_state::dbus
Custom DBusServer.
Definition: dbusserver.h:34
Server side implementation of IHub.
Definition: hubimpl.h:27
Client side implementation of IHub.
Definition: hubproxy.h:23
Abstract interface for the hub in a star topology.
Definition: hub.h:37
static IHub * create(bool proxy, CDBusServer *server, const QDBusConnection &connection, const QString &service, QObject *parent=nullptr)
Construct a new hub.
Definition: hub.cpp:17
IHub(QObject *parent=nullptr)
Constructor.
Definition: hub.cpp:15