blob: 9d6b4187933d99db4a60b3e760c2856430b3fce7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#pragma once
#include <unordered_map>
#include <string>
#include "general/struct.hpp"
namespace smtp::converter
{
class StructToString
{
public:
StructToString() = default;
~StructToString() = default;
std::string Convert( general::SettingsFields const& from ) const;
private:
void ApplyAuth( general::SettingsFields const& from, std::string& result ) const;
void ApplySsl( general::SettingsFields const& from, std::string& result ) const;
void ApplyUsername( general::SettingsFields const& from, std::string& result ) const;
void ApplyPassword( general::SettingsFields const& from, std::string& result ) const;
void ApplyHost( general::SettingsFields const& from, std::string& result ) const;
void ApplyPort( general::SettingsFields const& from, std::string& result ) const;
std::string GetStringParam( std::string const& field, std::string const& param ) const;
std::string GetBoolParam( std::string const& field, bool param ) const;
};
}
|