Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/Plugins/AdlerJson/ws_interface.h
T
berrux-dev 855b0a6101 Remove modules not compiled by this branch's release build
Lts/Common: drop the 17 submodules excluded from the RELEASE_BUILD
branch of Lts/Common/CMakeLists.txt (CodeGen, LtsAppManager, LtsBotan,
LtsCoordinate, LtsElevation, LtsLogin, LtsMultiMonitor,
LtsPluginManager, LtsPrinting, LtsProjectionWorkstation,
LtsScriptTimeline, LtsSession, LtsTimeline, LtsTimelineClassic,
LtsVirtualKeyboard, LtsWidgets, TopicEditorBase). Only the 13
subdirectories actually built remain.

TrainingAreaBase: drop sources of targets excluded by
IF(NOT RELEASE_BUILD) / IF(BUILD_RTI) (svcTabClient, svcTabServer,
svcTrainingAreaBase exe, RecordReplayPlugin customization) and the 7
plugin directories not added in the release path (AdlerJson,
ApacheHlaJson, DebugJsonDir, HlaJson, Nmea, UAS, WlsTetra). Only
tabTelegrams, svcTabCommon and the TetraJson plugin are compiled.

Cross-checked: no kept compiled source includes headers from the
removed modules (GuiPluginInterface - the only LtsWidgets consumer -
is itself NOT RELEASE_BUILD-guarded).
2026-10-13 19:19:55 +02:00

46 lines
1.2 KiB
C++
Executable File

#pragma once
#include <QtCore/QObject>
#include <qobjectdefs.h>
namespace TrainingAreaBase {
class WebSocketInterface : public QObject
{
Q_OBJECT
public:
virtual bool init(quint16 listenPort) = 0;
bool init(const QPair<quint16, quint16> &portRange)
{
for (quint16 currentPort = portRange.first; currentPort != portRange.second; ++currentPort)
{
if (init(currentPort))
return true;
}
return init(0);
}
virtual bool isConnected() const = 0;
virtual quint16 getPort() const = 0;
virtual bool disconnectWs(int wsId) = 0;
virtual bool sendTelegram(int typeId, const QJsonObject *data, int exerciseId) = 0;
virtual bool sendTelegram(int wsId, const QJsonObject *data) = 0;
virtual QString getPeerAddress(int wsId) const = 0;
virtual QUrl getPeerUrl(int wsId) const = 0;
virtual int getExerciseId(int wsId) const = 0;
Q_SIGNALS:
void recivedTelegram(int wsId, const QJsonObject& telegramData);
void newConnection(int wsId, const QString& address, qint16 port);
void wsDisconnected(int wsId);
public:
explicit WebSocketInterface(QObject* parent = nullptr) : QObject(parent){}
virtual ~WebSocketInterface() {}
};
}