4 #include <utils/Logger.h> 5 #include <utils/jsonschema/QJsonSchemaChecker.h> 6 #include <utils/Components.h> 7 #include <hyperion/Hyperion.h> 10 #include <QJsonObject> 29 JsonAPI(QString peerAddress,
Logger* log, QObject* parent,
bool noListener =
false);
79 QJsonObject _streaming_leds_reply;
80 QJsonObject _streaming_image_reply;
81 QJsonObject _streaming_logging_reply;
84 bool _streaming_logging_activated;
87 QMutex _image_stream_mutex;
90 QMutex _led_stream_mutex;
93 volatile qint64 _image_stream_timeout;
96 volatile qint64 _led_stream_timeout;
103 void handleColorCommand(
const QJsonObject & message,
const QString &command,
const int tan);
110 void handleImageCommand(
const QJsonObject & message,
const QString &command,
const int tan);
117 void handleEffectCommand(
const QJsonObject &message,
const QString &command,
const int tan);
124 void handleCreateEffectCommand(
const QJsonObject & message,
const QString &command,
const int tan);
131 void handleDeleteEffectCommand(
const QJsonObject & message,
const QString &command,
const int tan);
138 void handleSysInfoCommand(
const QJsonObject & message,
const QString &command,
const int tan);
145 void handleServerInfoCommand(
const QJsonObject & message,
const QString &command,
const int tan);
152 void handleClearCommand(
const QJsonObject & message,
const QString &command,
const int tan);
159 void handleAdjustmentCommand(
const QJsonObject & message,
const QString &command,
const int tan);
166 void handleSourceSelectCommand(
const QJsonObject & message,
const QString &command,
const int tan);
172 void handleConfigCommand(
const QJsonObject & message,
const QString &command,
const int tan);
178 void handleSchemaGetCommand(
const QJsonObject & message,
const QString &command,
const int tan);
184 void handleConfigSetCommand(
const QJsonObject & message,
const QString &command,
const int tan);
191 void handleComponentStateCommand(
const QJsonObject & message,
const QString &command,
const int tan);
197 void handleLedColorsCommand(
const QJsonObject & message,
const QString &command,
const int tan);
203 void handleLoggingCommand(
const QJsonObject & message,
const QString &command,
const int tan);
209 void handleProcessingCommand(
const QJsonObject & message,
const QString &command,
const int tan);
215 void handleVideoModeCommand(
const QJsonObject & message,
const QString &command,
const int tan);
222 void handleClearallCommand(
const QJsonObject & message,
const QString &command,
const int tan);
227 void handleNotImplemented();
232 void sendSuccessReply(
const QString &command=
"",
const int tan=0);
237 void sendSuccessDataReply(
const QJsonDocument &doc,
const QString &command=
"",
const int &tan=0);
244 void sendErrorReply(
const QString & error,
const QString &command=
"",
const int tan=0);
The main class of Hyperion.
Definition: Hyperion.h:57
void streamLedcolorsUpdate(const std::vector< ColorRgb > &ledColors)
is called whenever the current Hyperion instance pushes new led raw values (if enabled) ...
Definition: JsonAPI.cpp:1008
JsonAPI(QString peerAddress, Logger *log, QObject *parent, bool noListener=false)
Constructor.
Definition: JsonAPI.cpp:40
void forwardJsonMessage(QJsonObject)
Signal emits whenever a jsonmessage should be forwarded.
void handleMessage(const QString &message)
Handle an incoming JSON message.
Definition: JsonAPI.cpp:60
void setImage(const Image< ColorRgb > &image)
push images whenever hyperion emits (if enabled)
Definition: JsonAPI.cpp:1035
void incommingLogMessage(const Logger::T_LOG_MESSAGE &)
process and push new log messages from logger (if enabled)
Definition: JsonAPI.cpp:1055
void callbackMessage(QJsonObject)
Signal emits with the reply message provided with handleMessage()