BoblightServer added

Former-commit-id: deb3479ee673d763ad2e5451fcd35a0febedb4f3
This commit is contained in:
johan
2013-11-08 22:18:10 +01:00
parent 85c8ba0100
commit 7300413015
12 changed files with 528 additions and 2 deletions

View File

@@ -8,4 +8,5 @@ target_link_libraries(hyperiond
dispmanx-grabber
xbmcvideochecker
jsonserver
protoserver)
protoserver
boblightserver)

View File

@@ -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;