Debian Codegraph @

src/Network/Swift/plugin.h

raw symbols SCIP
1 /*
2 * SPDX-FileCopyrightText: (C) 2019-2022 swift Project Community / Contributors (https://swift-project.org/)
3 * SPDX-FileCopyrightText: (C) 2019-2022 Lars Toenning <[email protected]>
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7 #pragma once
8
9
10
11 #include "config.h"
12 #include "dbusconnection.h"
13 #include "dbusdispatcher.h"
14 #include "dbusserver.h"
15 #include <memory>
16 #include <thread>
17
18 namespace flightgear::swift {
19 class CService;
20 class CTraffic;
21
22 /*!
23 * Plugin loaded by Flightgear which publishes a DBus service
24 */
25 class CPlugin
26 {
27 public:
28 //! Constructor
29 CPlugin();
30 void startServer();
31 //! Destructor
32 ~CPlugin();
33 void fastLoop();
34
35 private:
36 CDBusDispatcher m_dbusDispatcher;
37 std::unique_ptr<CDBusServer> m_dbusP2PServer;
38 std::shared_ptr<CDBusConnection> m_dbusConnection;
39 std::unique_ptr<CService> m_service;
40 std::unique_ptr<CTraffic> m_traffic;
41
42 std::thread m_dbusThread;
43 };
44 } // namespace flightgear::swift