WIP. Database updater now has its own namespace and dedicated directory

This commit is contained in:
emeric
2014-07-01 23:43:49 +02:00
parent 7fd546eb44
commit 16d1194d61
35 changed files with 320 additions and 224 deletions
+33
View File
@@ -0,0 +1,33 @@
#include <boost/thread.hpp>
#include "DatabaseUpdateService.hpp"
DatabaseUpdateService::DatabaseUpdateService(boost::asio::io_service& ioService, const boost::filesystem::path& p)
: _metadataParser(),
_databaseUpdater( p, _metadataParser)
{
}
void
DatabaseUpdateService::start(void)
{
// _thread = boost::thread(boost::bind(&Database::refresh, &_databaseUpdater.);
}
void
DatabaseUpdateService::stop(void)
{
std::cout << "DatabaseUpdateService::stop, processing..." << std::endl;
_thread.interrupt();
_thread.join();
std::cout << "DatabaseUpdateService::stop, process done" << std::endl;
}
void
DatabaseUpdateService::restart(void)
{
std::cout << "DatabaseUpdateService::restart, not implemented" << std::endl;
}