(hopefully) clearing up auth_method_t

master
Gernot 3 months ago
parent 4ef9fd0661
commit 8e80564cf5

@ -38,19 +38,17 @@ namespace pEp {
* to mailio::T::auth_method_t for T in {imap, imaps, smtp, smtps}
*/
class auth_method_t {
private:
public:
/// possible values
enum {
enum value
{
NONE,
LOGIN,
START_TLS
} auth_method;
public:
// constructors
auth_method_t()
{
auth_method = LOGIN; // that's the only value in the intersection of all mailio::T::auth_method_t's
}
// LOGIN's the only value in the intersection of all mailio::T::auth_method_t's
auth_method_t(auth_method_t::value in = LOGIN) : auth_method{ in } {}
auth_method_t(mailio::imap::auth_method_t in)
{
switch (in) {
@ -135,6 +133,7 @@ namespace pEp {
return mailio::smtps::auth_method_t::START_TLS;
break;
case NONE:
default:
return mailio::smtps::auth_method_t::NONE;
}
}

Loading…
Cancel
Save