summaryrefslogtreecommitdiff
path: root/src/file/settings.hpp
diff options
context:
space:
mode:
authorclaiff <claiff@mail.ru>2022-09-21 16:05:06 +0300
committerclaiff <claiff@mail.ru>2022-09-21 16:05:06 +0300
commitee8c175e9eae4faccdf913578fb30d09c200204f (patch)
treec2244021130919d5360d130fd3b38954a096687b /src/file/settings.hpp
parenta282ae6418c85db1aae5a2823dd37d56e56e5249 (diff)
parent641c95dcf8c6585caaa6e79d4bec9b53fd666369 (diff)
downloadobmc-sila-smtp-ee8c175e9eae4faccdf913578fb30d09c200204f.tar.xz
Merge branch 'master' into feature/logger
# Conflicts: # CMakeLists.txt # src/file/mail.cpp # src/file/settings.cpp # src/management/logger.cpp # src/management/logger.hpp # src/message/sender.cpp # src/message/sender.hpp
Diffstat (limited to 'src/file/settings.hpp')
-rw-r--r--src/file/settings.hpp39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/file/settings.hpp b/src/file/settings.hpp
index fb77b1e..0882ac3 100644
--- a/src/file/settings.hpp
+++ b/src/file/settings.hpp
@@ -5,26 +5,29 @@
#include "converter/full.hpp"
#include "parser/settings.hpp"
-#include "managment/general.hpp"
+#include "management/general.hpp"
+#include "checker/registrator_settings.hpp"
namespace smtp::file
{
- using ParsedStoreType = std::unordered_map<std::string, std::string>;
-
- class Settings
- {
- public:
- explicit Settings( std::string const& path_file );
- ~Settings() = default;
-
- manage::SettingsFields Read() const;
- bool Write( manage::SettingsFields const& settings_fields ) const;
- private:
- ParsedStoreType GetParsedStore() const;
- bool SetParsedData( ParsedStoreType const& parsed_data ) const;
- std::string BuildParam( std::pair<std::string, std::string> const& data ) const;
-
- std::string mPathFile;
- };
+
+
+ class Settings
+ {
+ public:
+ explicit Settings( std::string const& path_file, checker::RegistratorSettings const& registrator_errors );
+ ~Settings() = default;
+
+ manage::SettingsFields Read() const;
+ bool Write( manage::SettingsFields const& settings_fields ) const;
+ private:
+ manage::SettingsFileDataType GetParsedStore() const;
+ bool SetParsedData( manage::SettingsFileDataType const& parsed_data ) const;
+ std::string BuildParam( std::pair < std::string, std::string > const& data ) const;
+
+ std::string mPathFile;
+ checker::RegistratorSettings mRegistratorErrors;
+ manage::SettingsFileDataType GetDataFromFile( std::ifstream& settings_file ) const;
+ };
}