mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
* New HomeAssistant LEDDevice * Fix typos * Ping Qt for Windows to 6.7 until aqtinstaller is fixed * Fix HA default port handling * HA - Update default latchtime and range * Add HA Wizard and light selection * Naming consistency * Fix "Selected Hyperion instance is not running" * CodeQL findings * HA - allow to overwrite brightness by HA yes or no * HA - Support switch off on black * HA - Add transition time
40 lines
1.3 KiB
C++
40 lines
1.3 KiB
C++
#ifndef MDNSSERVICEREGISTER_H
|
|
#define MDNSSERVICEREGISTER_H
|
|
|
|
#include <QByteArray>
|
|
#include <QMap>
|
|
|
|
struct mdnsConfig
|
|
{
|
|
QByteArray serviceType;
|
|
QString serviceNameFilter;
|
|
};
|
|
|
|
typedef QMap<QString, mdnsConfig> MdnsServiceMap;
|
|
|
|
const MdnsServiceMap mDnsServiceMap = {
|
|
//Hyperion
|
|
{"jsonapi" , {"_hyperiond-json._tcp.local.", ".*"}},
|
|
{"flatbuffer" , {"_hyperiond-flatbuf._tcp.local.", ".*"}},
|
|
{"protobuffer" , {"_hyperiond-protobuf._tcp.local.", ".*"}},
|
|
{"http" , {"_http._tcp.local.", ".*"}},
|
|
{"https" , {"_https._tcp.local.", ".*"}},
|
|
|
|
//LED Devices
|
|
{"cololight" , {"_hap._tcp.local.", "ColoLight.*"}},
|
|
{"homeassistant", {"_home-assistant._tcp.local.", ".*"}},
|
|
{"nanoleaf" , {"_nanoleafapi._tcp.local.", ".*"}},
|
|
{"philipshue" , {"_hue._tcp.local.", ".*"}},
|
|
{"wled" , {"_wled._tcp.local.", ".*"}},
|
|
{"yeelight" , {"_hap._tcp.local.", "Yeelight.*|YLBulb.*"}},
|
|
};
|
|
|
|
class MdnsServiceRegister {
|
|
public:
|
|
static QByteArray getServiceType(const QString &serviceType) { return mDnsServiceMap[serviceType].serviceType; }
|
|
static QString getServiceNameFilter(const QString &serviceType) { return mDnsServiceMap[serviceType].serviceNameFilter; }
|
|
static MdnsServiceMap getAllConfigs () { return mDnsServiceMap; }
|
|
};
|
|
|
|
#endif // MDNSSERVICEREGISTER_H
|