#include #include #include "repoList.h" #include "repo.h" #include GitFS::RepoList::RepoList(const Ice::PropertiesPtr & p) : properties(p) { } AdHocFormatter(RepoPropertyName, "GitFS.%?.%?"); NetFS::VolumePrxPtr GitFS::RepoList::connect(const ::std::string volume, const ::std::string auth, const ::Ice::Current & ice) { if (volume.empty()) throw NetFS::ConfigError(); const auto propReader = std::bind(&Ice::Properties::getProperty, properties, std::bind((std::string(*)(const std::string_view &, const std::string_view &)) (&RepoPropertyName::get), volume, std::placeholders::_1)); if (propReader("gitdir").empty()) throw NetFS::ConfigError(); if (propReader("authkey") != auth) throw NetFS::AuthError(); return Ice::uncheckedCast( ice.adapter->addWithUUID(std::make_shared(propReader))); }