WIP. RemoteServer, DbUpdate settings implemented
This commit is contained in:
@@ -24,3 +24,24 @@ ConfigReader::getUserInterfaceConfig(Service::UserInterfaceService::Config& conf
|
||||
config.dbPath = _config.lookup("main.db");
|
||||
}
|
||||
|
||||
void
|
||||
ConfigReader::getRemoteServerConfig(Service::RemoteServerService::Config& config)
|
||||
{
|
||||
config.enable = _config.lookup("remote.enable");
|
||||
if (!config.enable)
|
||||
return;
|
||||
|
||||
config.port = static_cast<unsigned int>(_config.lookup("remote.listen-endpoint.port"));
|
||||
config.address = boost::asio::ip::address::from_string((const char*)_config.lookup("remote.listen-endpoint.addr"));
|
||||
|
||||
config.dbPath = _config.lookup("main.db");
|
||||
}
|
||||
|
||||
void
|
||||
ConfigReader::getDatabaseUpdateConfig(Service::DatabaseUpdateService::Config& config)
|
||||
{
|
||||
config.enable = true;
|
||||
|
||||
config.dbPath = _config.lookup("main.db");
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include <libconfig.h++>
|
||||
|
||||
#include "service/UserInterfaceService.hpp"
|
||||
#include "service/RemoteServerService.hpp"
|
||||
#include "service/DatabaseUpdateService.hpp"
|
||||
|
||||
class ConfigReader
|
||||
{
|
||||
@@ -13,7 +15,8 @@ class ConfigReader
|
||||
ConfigReader(boost::filesystem::path p);
|
||||
|
||||
void getUserInterfaceConfig(Service::UserInterfaceService::Config& config);
|
||||
|
||||
void getRemoteServerConfig(Service::RemoteServerService::Config& config);
|
||||
void getDatabaseUpdateConfig(Service::DatabaseUpdateService::Config& config);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user