summaryrefslogtreecommitdiff
path: root/src/file/settings_converter.hpp
diff options
context:
space:
mode:
authoreportnov <eportnov@ibs.ru>2022-09-13 15:03:25 +0300
committereportnov <eportnov@ibs.ru>2022-09-13 15:03:25 +0300
commite8aeea36e6b48e18d27f9d7857cd29524cc8aa1f (patch)
treeb99540f810072b746d033d6cd8d06aabb75afcad /src/file/settings_converter.hpp
parenta58088ec7a45bb86b155a8ef9514b35b0ba8d1c9 (diff)
downloadobmc-sila-smtp-e8aeea36e6b48e18d27f9d7857cd29524cc8aa1f.tar.xz
add writing filesbugfix/write_file
Diffstat (limited to 'src/file/settings_converter.hpp')
-rw-r--r--src/file/settings_converter.hpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/file/settings_converter.hpp b/src/file/settings_converter.hpp
deleted file mode 100644
index 36041c3..0000000
--- a/src/file/settings_converter.hpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#pragma once
-
-#include <unordered_map>
-#include <string>
-
-namespace smtp::file
-{
- struct SettingsFields
- {
- bool is_need_auth;
- bool is_need_ssl;
- std::string username;
- std::string password;
- std::string host;
- std::string port;
- };
-
- using ParsedDataType = std::unordered_map<std::string, std::string>;;
-
- class SettingsConverter
- {
- public:
- SettingsConverter() = default;
- ~SettingsConverter() = default;
-
- SettingsFields Convert( std::unordered_map<std::string, std::string> const& from ) const;
- std::unordered_map<std::string, std::string> Convert( SettingsFields const& from ) const;
- private:
- void ApplyAuth( SettingsFields& result, ParsedDataType const& from ) const;
- void ApplySsl( SettingsFields& result, ParsedDataType const& from ) const;
- void ApplyBool( ParsedDataType const& from, std::string const& search_field, bool& field ) const;
-
- void ApplyUsername( SettingsFields& result, ParsedDataType const& from ) const;
- void ApplyPassword( SettingsFields& result, ParsedDataType const& from ) const;
- void ApplyHost( SettingsFields& result, ParsedDataType const& from ) const;
- void ApplyPort( SettingsFields& result, ParsedDataType const& from ) const;
- void ApplyString( ParsedDataType const& from, std::string const& search_field, std::string& field ) const;
- };
-}
-
-