Fixed build

This commit is contained in:
emeric
2015-09-27 20:28:10 +02:00
parent eb34ea1701
commit 1e2c649a3e
3 changed files with 2 additions and 115 deletions
+2 -1
View File
@@ -36,7 +36,8 @@ template<typename T>
static inline bool readAs(const std::string& str, T& data)
{
std::istringstream iss ( str );
return iss >> data;
iss >> data;
return !iss.fail();
}
-64
View File
@@ -1,64 +0,0 @@
/*
* Copyright (C) 2013 Emeric Poupon
*
* This file is part of LMS.
*
* LMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include <boost/asio/ip/address.hpp>
#include "config/ConfigReader.hpp"
#include "logger/Logger.hpp"
#include "LmsAPIServerService.hpp"
namespace Service {
LmsAPIService::LmsAPIService(Wt::Dbo::SqlConnectionPool& connectionPool)
: _server(
boost::asio::ip::tcp::endpoint(
boost::asio::ip::address::from_string(ConfigReader::instance().getString("remote.listen-endpoint.addr")),
ConfigReader::instance().getULong("remote.listen-endpoint.port")),
ConfigReader::instance().getString("remote.ssl-crypto.cert"),
ConfigReader::instance().getString("remote.ssl-crypto.key"),
ConfigReader::instance().getString("remote.ssl-crypto.dh"),
connectionPool)
{
}
void
LmsAPIService::start(void)
{
LMS_LOG(MOD_SERVICE, SEV_DEBUG) << "LmsAPIService::start, starting...";
_server.start();
LMS_LOG(MOD_SERVICE, SEV_DEBUG) << "LmsAPIService::start, started!";
}
void
LmsAPIService::stop(void)
{
LMS_LOG(MOD_SERVICE, SEV_DEBUG) << "LmsAPIService::stop, stopping...";
_server.stop();
LMS_LOG(MOD_SERVICE, SEV_DEBUG) << "LmsAPIService::stop, stopped!";
}
void
LmsAPIService::restart(void)
{
LMS_LOG(MOD_SERVICE, SEV_DEBUG) << "LmsAPIService::restart, not implemented!";
}
} // namespace Service
-50
View File
@@ -1,50 +0,0 @@
/*
* Copyright (C) 2013 Emeric Poupon
*
* This file is part of LMS.
*
* LMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef REMOTE_SERVER_SERVICE_HPP
#define REMOTE_SERVER_SERVICE_HPP
#include <Wt/Dbo/SqlConnectionPool>
#include "config/config.h"
#include "Service.hpp"
#include "lms-api/server/Server.hpp"
namespace Service {
class LmsAPIService : public Service
{
public:
LmsAPIService(Wt::Dbo::SqlConnectionPool& connectionPool);
void start(void);
void stop(void);
void restart(void);
private:
LmsAPI::Server::Server _server;
};
} // namespace Service
#endif