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,7 +19,8 @@ enum Components
|
||||
COMP_V4L,
|
||||
COMP_COLOR,
|
||||
COMP_EFFECT,
|
||||
COMP_PROTOSERVER
|
||||
COMP_PROTOSERVER,
|
||||
COMP_LEDDEVICE
|
||||
};
|
||||
|
||||
inline const char* componentToString(Components c)
|
||||
@@ -37,6 +38,7 @@ inline const char* componentToString(Components c)
|
||||
case COMP_COLOR: return "Solid color";
|
||||
case COMP_EFFECT: return "Effect";
|
||||
case COMP_PROTOSERVER: return "Proto Server";
|
||||
case COMP_LEDDEVICE: return "LED device";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
@@ -56,6 +58,7 @@ inline const char* componentToIdString(Components c)
|
||||
case COMP_COLOR: return "COLOR";
|
||||
case COMP_EFFECT: return "EFFECT";
|
||||
case COMP_PROTOSERVER: return "PROTOSERVER";
|
||||
case COMP_LEDDEVICE: return "LEDDEVICE";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
@@ -74,6 +77,7 @@ inline Components stringToComponent(QString component)
|
||||
if (component == "COLOR") return COMP_COLOR;
|
||||
if (component == "EFFECT") return COMP_EFFECT;
|
||||
if (component == "PROTOSERVER") return COMP_PROTOSERVER;
|
||||
if (component == "LEDDEVICE") return COMP_LEDDEVICE;
|
||||
|
||||
return COMP_INVALID;
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@ public:
|
||||
QString productVersion;
|
||||
QString prettyName;
|
||||
QString hostName;
|
||||
QString domainName;
|
||||
};
|
||||
|
||||
~SysInfo();
|
||||
|
Reference in New Issue
Block a user