#include "settings.hpp" #include "checker/errors/settings/port_number.hpp" #include "checker/errors/settings/server.hpp" namespace smtp::manage::builder { smtp::manage::Settings Settings::Build() const { auto file_manipulator = GetFileSettings(); return smtp::manage::Settings{file_manipulator}; } file::Settings Settings::GetFileSettings() const { static const std::string PATH = "/var/lib/smtp/settings.txt"; auto registrator = BuildErrorRegistrator(); return file::Settings{PATH, registrator}; } checker::RegistratorSettings Settings::BuildErrorRegistrator() const { checker::RegistratorSettings result; result.Add( std::make_shared < checker::errors::settings::PortNumber >()); result.Add( std::make_shared < checker::errors::settings::Server >()); return result; } }