diff options
author | eportnov <eportnov@ibs.ru> | 2022-10-03 11:38:05 +0300 |
---|---|---|
committer | eportnov <eportnov@ibs.ru> | 2022-10-03 11:38:05 +0300 |
commit | 2b03fece7f5895591eabd2f04baa2df19b4c3417 (patch) | |
tree | f68d57d9b472cbe1186f235034b97a1be75cac08 /src/converter/struct_to_file.hpp | |
parent | 7e2843c706c1a6e033662c45957a76e01d167438 (diff) | |
parent | e41b247e61ce4d4cc96badab3a14bf413e4f46f2 (diff) | |
download | obmc-sila-smtp-2b03fece7f5895591eabd2f04baa2df19b4c3417.tar.xz |
Merge branch 'refactor/3009'
Diffstat (limited to 'src/converter/struct_to_file.hpp')
-rw-r--r-- | src/converter/struct_to_file.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/converter/struct_to_file.hpp b/src/converter/struct_to_file.hpp new file mode 100644 index 0000000..22f7260 --- /dev/null +++ b/src/converter/struct_to_file.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include <unordered_map> +#include <string> + +#include "management/general.hpp" + +namespace smtp::converter +{ + class StructToFile + { + public: + StructToFile() = default; + ~StructToFile() = default; + + std::unordered_map<std::string, std::string> Convert( manage::SettingsFields const& from ) const; + private: + void ApplyAuth( manage::SettingsFields const& from, manage::SettingsFileDataType& result ) const; + void ApplySsl( manage::SettingsFields const& from, manage::SettingsFileDataType& result ) const; + + void ApplyUsername( manage::SettingsFields const& from, manage::SettingsFileDataType& result ) const; + void ApplyPassword( manage::SettingsFields const& from, manage::SettingsFileDataType& result ) const; + void ApplyHost( manage::SettingsFields const& from, manage::SettingsFileDataType& result ) const; + void ApplyPort( manage::SettingsFields const& from, manage::SettingsFileDataType& result ) const; + }; +} + + |