diff options
author | eportnov <eportnov@ibs.ru> | 2022-09-12 16:46:49 +0300 |
---|---|---|
committer | eportnov <eportnov@ibs.ru> | 2022-09-12 16:46:49 +0300 |
commit | df33492b80495fd36a1a488c0b0a39753f1df415 (patch) | |
tree | c465900180840832e241ca5419dd90b429459588 /src/service/settings.hpp | |
parent | 9fa4addff6f90a8b5697a594e034f5517d64dd25 (diff) | |
parent | cdb7ae4c729b6a6c51b57eeefd21574952a4b767 (diff) | |
download | obmc-sila-smtp-df33492b80495fd36a1a488c0b0a39753f1df415.tar.xz |
Merge branch 'feature/refactor'
Diffstat (limited to 'src/service/settings.hpp')
-rw-r--r-- | src/service/settings.hpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/service/settings.hpp b/src/service/settings.hpp new file mode 100644 index 0000000..b6319f6 --- /dev/null +++ b/src/service/settings.hpp @@ -0,0 +1,36 @@ +#pragma once + +#include <string> + +namespace smtp::service +{ + struct SettingsFields + { + bool is_need_auth; + bool is_need_ssl; + std::string username; + std::string password; + std::string host; + std::string port; + }; + + class Settings + { + public: + Settings(); + explicit Settings( SettingsFields data ); + ~Settings() = default; + + bool CheckAndSetSettings( SettingsFields data ); + + bool IsNeedAuth() const noexcept; + bool IsNeedSsl() const noexcept; + + std::string GetUserName() const; + std::string GetPassword() const; + std::string GetHost() const; + std::string GetPort() const; + private: + SettingsFields mSettingsFields; + }; +} |