WIP. Database updater now has its own namespace and dedicated directory
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user