mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
BoblightServer added
Former-commit-id: deb3479ee673d763ad2e5451fcd35a0febedb4f3
This commit is contained in:
@@ -8,4 +8,5 @@ target_link_libraries(hyperiond
|
||||
dispmanx-grabber
|
||||
xbmcvideochecker
|
||||
jsonserver
|
||||
protoserver)
|
||||
protoserver
|
||||
boblightserver)
|
||||
|
@@ -26,6 +26,9 @@
|
||||
// ProtoServer includes
|
||||
#include <protoserver/ProtoServer.h>
|
||||
|
||||
// BoblightServer includes
|
||||
#include <boblightserver/BoblightServer.h>
|
||||
|
||||
void signal_handler(const int signum)
|
||||
{
|
||||
QCoreApplication::quit();
|
||||
@@ -153,6 +156,15 @@ int main(int argc, char** argv)
|
||||
std::cout << "Proto server created and started on port " << protoServer->getPort() << std::endl;
|
||||
}
|
||||
|
||||
// Create Boblight server if configuration is present
|
||||
BoblightServer * boblightServer = nullptr;
|
||||
if (config.isMember("boblightServer"))
|
||||
{
|
||||
const Json::Value & boblightServerConfig = config["boblightServer"];
|
||||
boblightServer = new BoblightServer(&hyperion, boblightServerConfig["port"].asUInt());
|
||||
std::cout << "Boblight server created and started on port " << boblightServer->getPort() << std::endl;
|
||||
}
|
||||
|
||||
// run the application
|
||||
int rc = app.exec();
|
||||
std::cout << "Application closed with code " << rc << std::endl;
|
||||
|
Reference in New Issue
Block a user