mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Move JsonProcessing from JsonClientConnection to own class (#444)
* update * Tell me why...
This commit is contained in:
@@ -92,7 +92,7 @@ public:
|
||||
/// @return The current priority
|
||||
///
|
||||
int getCurrentPriority() const;
|
||||
|
||||
|
||||
///
|
||||
/// Returns a list of active priorities
|
||||
///
|
||||
@@ -117,15 +117,15 @@ public:
|
||||
/// Get the list of available effects
|
||||
/// @return The list of available effects
|
||||
const std::list<EffectDefinition> &getEffects() const;
|
||||
|
||||
|
||||
/// Get the list of active effects
|
||||
/// @return The list of active effects
|
||||
const std::list<ActiveEffectDefinition> &getActiveEffects();
|
||||
|
||||
|
||||
/// Get the list of available effect schema files
|
||||
/// @return The list of available effect schema files
|
||||
const std::list<EffectSchema> &getEffectSchemas();
|
||||
|
||||
|
||||
/// gets the current json config object
|
||||
/// @return json config
|
||||
const QJsonObject& getQJsonConfig() { return _qjsonConfig; };
|
||||
@@ -139,28 +139,28 @@ public:
|
||||
/// @param origin External setter
|
||||
/// @param priority priority channel
|
||||
void registerPriority(const QString &name, const int priority);
|
||||
|
||||
|
||||
/// unregister a input source to a priority channel
|
||||
/// @param name uniq name of input source
|
||||
void unRegisterPriority(const QString &name);
|
||||
|
||||
|
||||
/// gets current priority register
|
||||
/// @return the priority register
|
||||
const PriorityRegister& getPriorityRegister() { return _priorityRegister; }
|
||||
|
||||
|
||||
/// enable/disable automatic/priorized source selection
|
||||
/// @param enabled the state
|
||||
void setSourceAutoSelectEnabled(bool enabled);
|
||||
|
||||
|
||||
/// set current input source to visible
|
||||
/// @param priority the priority channel which should be vidible
|
||||
/// @return true if success, false on error
|
||||
bool setCurrentSourcePriority(int priority );
|
||||
|
||||
|
||||
/// gets current state of automatic/priorized source selection
|
||||
/// @return the state
|
||||
bool sourceAutoSelectEnabled() { return _sourceAutoSelectEnabled; };
|
||||
|
||||
|
||||
///
|
||||
/// Enable/Disable components during runtime
|
||||
///
|
||||
@@ -177,12 +177,10 @@ public:
|
||||
|
||||
/// gets the methode how image is maped to leds
|
||||
int getLedMappingType() { return _ledMAppingType; };
|
||||
|
||||
|
||||
int getConfigVersionId() { return _configVersionId; };
|
||||
|
||||
|
||||
QJsonObject getConfig() { return _qjsonConfig; };
|
||||
|
||||
QString getConfigFile() { return _configFile; };
|
||||
|
||||
/// unique id per instance
|
||||
QString id;
|
||||
@@ -273,6 +271,9 @@ public slots:
|
||||
///
|
||||
Hyperion::BonjourRegister getHyperionSessions();
|
||||
|
||||
/// Slot which is called, when state of hyperion has been changed
|
||||
void hyperionStateChanged();
|
||||
|
||||
public:
|
||||
static Hyperion *_hyperion;
|
||||
|
||||
@@ -311,8 +312,11 @@ signals:
|
||||
void emitImage(int priority, const Image<ColorRgb> & image, const int timeout_ms);
|
||||
void closing();
|
||||
|
||||
/// Signal which is emitted, when state of config or bonjour or priorityMuxer changed
|
||||
void hyperionStateChanged();
|
||||
/// Signal which is emitted, when a new json message should be forwarded
|
||||
void forwardJsonMessage(QJsonObject);
|
||||
|
||||
/// Signal which is emitted, after the hyperionStateChanged has been processed with a emit count blocker (250ms interval)
|
||||
void sendServerInfo();
|
||||
|
||||
private slots:
|
||||
///
|
||||
@@ -329,7 +333,7 @@ private slots:
|
||||
void checkConfigState();
|
||||
|
||||
private:
|
||||
|
||||
|
||||
///
|
||||
/// Constructs the Hyperion instance based on the given Json configuration
|
||||
///
|
||||
@@ -344,13 +348,13 @@ private:
|
||||
LedString _ledStringClone;
|
||||
|
||||
std::vector<ColorOrder> _ledStringColorOrder;
|
||||
|
||||
|
||||
/// The priority muxer
|
||||
PriorityMuxer _muxer;
|
||||
|
||||
/// The adjustment from raw colors to led colors
|
||||
MultiColorAdjustment * _raw2ledAdjustment;
|
||||
|
||||
|
||||
/// The actual LedDevice
|
||||
LedDevice * _device;
|
||||
|
||||
@@ -359,7 +363,7 @@ private:
|
||||
|
||||
/// Effect engine
|
||||
EffectEngine * _effectEngine;
|
||||
|
||||
|
||||
// proto and json Message forwarder
|
||||
MessageForwarder * _messageForwarder;
|
||||
|
||||
@@ -383,24 +387,24 @@ private:
|
||||
unsigned _hwLedCount;
|
||||
|
||||
ComponentRegister _componentRegister;
|
||||
|
||||
|
||||
/// register of input sources and it's prio channel
|
||||
PriorityRegister _priorityRegister;
|
||||
|
||||
/// flag indicates state for autoselection of input source
|
||||
bool _sourceAutoSelectEnabled;
|
||||
|
||||
|
||||
/// holds the current priority channel that is manualy selected
|
||||
int _currentSourcePriority;
|
||||
|
||||
QByteArray _configHash;
|
||||
|
||||
QSize _ledGridSize;
|
||||
|
||||
|
||||
int _ledMAppingType;
|
||||
|
||||
|
||||
int _configVersionId;
|
||||
|
||||
|
||||
hyperion::Components _prevCompId;
|
||||
BonjourServiceBrowser _bonjourBrowser;
|
||||
BonjourServiceResolver _bonjourResolver;
|
||||
@@ -417,4 +421,8 @@ private:
|
||||
/// holds the current states of configWriteable and modified
|
||||
bool _configMod = false;
|
||||
bool _configWrite = true;
|
||||
|
||||
/// timers to handle severinfo blocking
|
||||
QTimer _fsi_timer;
|
||||
QTimer _fsi_blockTimer;
|
||||
};
|
||||
|
Reference in New Issue
Block a user