Created UserInterface namespace, WebServerService -> UserInterfaceService.
This commit is contained in:
@@ -78,5 +78,4 @@ void Connection::handleWrite(const boost::system::error_code& error)
|
||||
}
|
||||
|
||||
} // namespace Server
|
||||
|
||||
} // namespace Remote
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "messages/Header.hpp"
|
||||
|
||||
namespace Remote {
|
||||
|
||||
namespace Server {
|
||||
|
||||
class ConnectionManager;
|
||||
@@ -71,7 +70,6 @@ class Connection : public std::enable_shared_from_this<Connection>
|
||||
|
||||
|
||||
} // namespace Server
|
||||
|
||||
} // namespace Remote
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "ConnectionManager.hpp"
|
||||
|
||||
namespace Remote {
|
||||
|
||||
namespace Server {
|
||||
|
||||
ConnectionManager::ConnectionManager()
|
||||
@@ -39,7 +38,6 @@ ConnectionManager::stopAll()
|
||||
|
||||
|
||||
} // namespace Server
|
||||
|
||||
} // namespace Remote
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "Connection.hpp"
|
||||
|
||||
namespace Remote {
|
||||
|
||||
namespace Server {
|
||||
|
||||
/// Manages open connections so that they may be cleanly stopped when the server
|
||||
@@ -35,7 +34,6 @@ class ConnectionManager
|
||||
};
|
||||
|
||||
} // namespace Server
|
||||
|
||||
} // namespace Remote
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
#include "RequestHandler.hpp"
|
||||
|
||||
namespace Remote {
|
||||
namespace Server {
|
||||
|
||||
RequestHandler::RequestHandler(boost::filesystem::path dbPath)
|
||||
: _db( dbPath )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
} // namespace Server
|
||||
} // namespace Remote
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +1,30 @@
|
||||
#ifndef REMOTE_REQUEST_HANDLER
|
||||
#define REMOTE_REQUEST_HANDLER
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include "database/DatabaseHandler.hpp"
|
||||
|
||||
// #include "remote/messages/
|
||||
|
||||
namespace Remote {
|
||||
namespace Server {
|
||||
|
||||
class RequestHandler
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
RequestHandler(boost::filesystem::path dbPath);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
DatabaseHandler _db;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Server
|
||||
} // namespace Remote
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
#include "Server.hpp"
|
||||
|
||||
namespace Remote {
|
||||
|
||||
namespace Server {
|
||||
|
||||
Server::Server(const endpoint_type& endpoint)
|
||||
Server::Server(const endpoint_type& endpoint, boost::filesystem::path dbPath)
|
||||
:
|
||||
_acceptor(_ioService),
|
||||
_connectionManager(),
|
||||
_socket(_ioService)
|
||||
_socket(_ioService),
|
||||
_requestHandler(dbPath)
|
||||
{
|
||||
// Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR).
|
||||
boost::asio::ip::tcp::resolver resolver(_ioService);
|
||||
@@ -72,5 +72,4 @@ Server::stop()
|
||||
}
|
||||
|
||||
} // namespace Server
|
||||
|
||||
} // namespace Remote
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define REMOTE_SERVER_HPP
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include "Connection.hpp"
|
||||
#include "ConnectionManager.hpp"
|
||||
@@ -9,7 +10,6 @@
|
||||
#include "RequestHandler.hpp"
|
||||
|
||||
namespace Remote {
|
||||
|
||||
namespace Server {
|
||||
|
||||
class Server
|
||||
@@ -22,7 +22,7 @@ class Server
|
||||
typedef boost::asio::ip::tcp::endpoint endpoint_type;
|
||||
|
||||
// Serve up data from the given database
|
||||
Server(const endpoint_type& endpoint);
|
||||
Server(const endpoint_type& endpoint, boost::filesystem::path dbPath);
|
||||
|
||||
// Run the server's io_service loop.
|
||||
void run();
|
||||
@@ -50,7 +50,6 @@ class Server
|
||||
};
|
||||
|
||||
} // namespace Server
|
||||
|
||||
} // namespace Remote
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user