mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
populate zeroconf/avahi/bonjour records via json api (#419)
* start of integrating a bonkour service browser * some experiments * blub * bonjour browser via jsonrpc ... * fix indention * - make leddevice as component - extend sysinfo with domain - add more data for bonjour browser (e.g. split domain and hostname) * code cleanup * add translation * use component names instead of ids * fix compile
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <utils/RgbToRgbw.h>
|
||||
#include <utils/Logger.h>
|
||||
#include <functional>
|
||||
#include <utils/Components.h>
|
||||
|
||||
class LedDevice;
|
||||
|
||||
@@ -58,6 +59,12 @@ public:
|
||||
static QJsonObject getLedDeviceSchemas();
|
||||
static void setLedCount(int ledCount);
|
||||
static int getLedCount() { return _ledCount; }
|
||||
|
||||
void setEnable(bool enable);
|
||||
bool enabled() { return _enabled; };
|
||||
|
||||
inline bool componentState() { return enabled(); };
|
||||
|
||||
protected:
|
||||
///
|
||||
/// Writes the RGB-Color values to the leds.
|
||||
@@ -88,11 +95,13 @@ protected:
|
||||
/// e.g. Adalight device will switch off when it does not receive data at least every 15 seconds
|
||||
QTimer _refresh_timer;
|
||||
unsigned int _refresh_timer_interval;
|
||||
|
||||
|
||||
protected slots:
|
||||
/// Write the last data to the leds again
|
||||
int rewriteLeds();
|
||||
|
||||
private:
|
||||
std::vector<ColorRgb> _ledValues;
|
||||
bool _componentRegistered;
|
||||
bool _enabled;
|
||||
};
|
||||
|
Reference in New Issue
Block a user