KSMTP

loginjob.h
1/*
2 SPDX-FileCopyrightText: 2010 BetterInbox <contact@betterinbox.com>
3 SPDX-FileContributor: Christophe Laveault <christophe@betterinbox.com>
4 SPDX-FileContributor: Gregory Schlomoff <gregory.schlomoff@gmail.com>
5
6 SPDX-License-Identifier: LGPL-2.1-or-later
7*/
8
9#pragma once
10
11#include "ksmtp_export.h"
12
13#include "job.h"
14
15namespace KSmtp
16{
17class LoginJobPrivate;
18/**
19 * @brief The LoginJob class
20 */
21class KSMTP_EXPORT LoginJob : public Job
22{
23 Q_OBJECT
24 Q_DECLARE_PRIVATE(LoginJob)
25
26public:
27 enum AuthMode { UnknownAuth, Plain, Login, CramMD5, DigestMD5, NTLM, GSSAPI, Anonymous, XOAuth2 };
28
29 enum LoginError { TokenExpired = KJob::UserDefinedError + 1 };
30
31 explicit LoginJob(Session *session);
32 ~LoginJob() override;
33
34 void setUserName(const QString &userName);
35 void setPassword(const QString &password);
36
37 void setPreferedAuthMode(AuthMode mode);
38 [[nodiscard]] AuthMode usedAuthMode() const;
39
40protected:
41 void doStart() override;
42 void handleResponse(const ServerResponse &r) override;
43};
44}
The Job class.
Definition job.h:25
The LoginJob class.
Definition loginjob.h:22
The Session class.
Definition session.h:24
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:14:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.