Created UserInterface namespace, WebServerService -> UserInterfaceService.

This commit is contained in:
emeric
2014-04-12 21:28:20 +02:00
parent 788a7638bc
commit 298f6fb885
46 changed files with 291 additions and 167 deletions
+38
View File
@@ -0,0 +1,38 @@
#include <iostream>
#include <iomanip>
#include "UserInterfaceService.hpp"
#include "ui/LmsApplication.hpp"
UserInterfaceService::UserInterfaceService( int argc, char* argv[], boost::filesystem::path dbPath)
: _server(argv[0], "")
{
// TODO configure server using another way (config file?)
_server.setServerConfiguration (argc, argv, WTHTTP_CONFIGURATION);
// bind entry point
_server.addEntryPoint(Wt::Application, boost::bind(UserInterface::LmsApplication::create, _1, dbPath));
}
void
UserInterfaceService::start(void)
{
_server.start();
std::cout << "UserInterfaceService::start -> Service started..." << std::endl;
}
void
UserInterfaceService::stop(void)
{
std::cout << "UserInterfaceService::stop -> stopping..." << std::endl;
_server.stop();
std::cout << "UserInterfaceService::stop -> stopped!" << std::endl;
}
void
UserInterfaceService::restart(void)
{
}