Refactor Hyperion JSON-API (#1727)

This commit is contained in:
LordGrey
2024-05-08 22:06:32 +02:00
committed by GitHub
parent 94850d890a
commit cf287f5adb
64 changed files with 4203 additions and 2962 deletions

View File

@@ -67,6 +67,7 @@ class Hyperion : public QObject
Q_OBJECT
public:
/// Type definition of the info structure used by the priority muxer
using InputsMap = PriorityMuxer::InputsMap;
using InputInfo = PriorityMuxer::InputInfo;
///
@@ -107,7 +108,7 @@ public:
///
QString getActiveDeviceType() const;
bool getReadOnlyMode() {return _readOnlyMode; }
bool getReadOnlyMode() const {return _readOnlyMode; }
public slots:
@@ -235,13 +236,13 @@ public slots:
/// @param priority The priority channel of the effect
/// @param timeout The timeout of the effect (after the timout, the effect will be cleared)
int setEffect(const QString &effectName
, const QJsonObject &args
, int priority
, int timeout = PriorityMuxer::ENDLESS
, const QString &pythonScript = ""
, const QString &origin="System"
, const QString &imageData = ""
);
, const QJsonObject &args
, int priority
, int timeout = PriorityMuxer::ENDLESS
, const QString &pythonScript = ""
, const QString &origin="System"
, const QString &imageData = ""
);
/// Get the list of available effects
/// @return The list of available effects
@@ -303,7 +304,14 @@ public slots:
QList<int> getActivePriorities() const;
///
/// Returns the information of a specific priorrity channel
/// Returns the information of all priority channels.
///
/// @return The information fo all priority channels
///
PriorityMuxer::InputsMap getPriorityInfo() const;
///
/// Returns the information of a specific priority channel
///
/// @param[in] priority The priority channel
///
@@ -346,7 +354,7 @@ public slots:
/// @brief Get the component Register
/// return Component register pointer
///
ComponentRegister* getComponentRegister() { return _componentRegister; }
ComponentRegister* getComponentRegister() const { return _componentRegister; }
///
/// @brief Called from components to update their current state. DO NOT CALL FROM USERS