diff options
Diffstat (limited to 'src/management/builder/settings.cpp')
-rw-r--r-- | src/management/builder/settings.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/management/builder/settings.cpp b/src/management/builder/settings.cpp new file mode 100644 index 0000000..d5a5e3b --- /dev/null +++ b/src/management/builder/settings.cpp @@ -0,0 +1,29 @@ +#include "settings.hpp" +#include "checker/errors/settings/host_number.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::HostNumber >()); + return result; + } + +} |