Continues migration with DDS, Common

This commit is contained in:
torsten committed 2026-07-17 12:41:42 +02:00
1 parent 9b15cee841
commit fa48db111e
668 files changed
+111841 -2

No files matched your search

+70
View File
@@ -0,0 +1,70 @@
#pragma once
#include <LtsWebSocket/ltswebsocketcommon_export.h>
#include <QString>
#include <QJsonObject>
#include <QJsonParseError>
namespace LtsWebSocket
{
class LTSWEBSOCKETCOMMON_EXPORT ReplyMessage
{
public:
virtual ~ReplyMessage() = default;
virtual QString toJsonString() const;
QJsonObject json() const { return m_jsonRepresentation; }
protected:
ReplyMessage() = default;
ReplyMessage(const QString &type, const int typeId, const QString &uuid);
protected:
QJsonObject m_jsonRepresentation;
};
class LTSWEBSOCKETCOMMON_EXPORT ReplyHandler
{
public:
virtual ~ReplyHandler() = default;
virtual void addReply(ReplyMessage *message) = 0;
};
class LTSWEBSOCKETCOMMON_EXPORT ErrorMessage final
: public ReplyMessage
{
public:
struct ErrorData
{
int errorClass = 0;
QString uuid;
QString errorMessage;
};
explicit ErrorMessage(const ErrorData &data);
};
}