diff --git a/src/scan/main.cpp b/src/scan/main.cpp index efaa476..ca0f788 100644 --- a/src/scan/main.cpp +++ b/src/scan/main.cpp @@ -49,11 +49,13 @@ // bool add_to_db ( const std::vector& parData, const std::string& parSetName, char parType, char parContent, const dinlib::SettingsDB& parDBSettings, bool parForce=false ); //} //unnamed namespace +namespace stask = mchlib::scantask; + int main (int parArgc, char* parArgv[]) { using std::placeholders::_1; using std::placeholders::_2; using boost::program_options::variables_map; - using FileRecordDataFiller = mchlib::scantask::GeneralFiller; + using FileRecordDataFiller = stask::GeneralFiller; variables_map vm; try { @@ -81,11 +83,11 @@ int main (int parArgc, char* parArgv[]) { } const std::string search_path(vm["search-path"].as()); - std::shared_ptr scan_dirtree(new mchlib::scantask::DirTree(search_path)); - std::shared_ptr media_type(new mchlib::scantask::MediaType((vm.count("type") ? vm["type"].as() : 'O'), vm.count("type"), search_path)); - std::shared_ptr hashing(new mchlib::scantask::Hashing(scan_dirtree, true)); - std::shared_ptr content_type(new mchlib::scantask::ContentType(scan_dirtree, media_type)); - std::shared_ptr mime(new mchlib::scantask::Mime(scan_dirtree)); + std::shared_ptr scan_dirtree(new stask::DirTree(search_path)); + std::shared_ptr media_type(new stask::MediaType((vm.count("type") ? vm["type"].as() : 'O'), vm.count("type"), search_path)); + std::shared_ptr hashing(new stask::Hashing(scan_dirtree, true)); + std::shared_ptr content_type(new stask::ContentType(scan_dirtree, media_type)); + std::shared_ptr mime(new stask::Mime(scan_dirtree)); std::shared_ptr filerecdata(new FileRecordDataFiller(mime, hashing)); std::cout << "Content type: " << mchlib::content_type_to_char(content_type->get_or_create()) << std::endl;