WIP. Reorganizing things to get settings work. First attempt on Database settings

This commit is contained in:
emeric
2014-07-22 12:57:29 +02:00
parent f1cea2404e
commit 938e96cc40
32 changed files with 752 additions and 96 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)
{
}