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 {
28 UnknownAuth,
29 Plain,
30 Login,
31 CramMD5,
32 DigestMD5,
33 NTLM,
34 GSSAPI,
35 Anonymous,
36 XOAuth2
37 };
38
39 enum LoginError {
40 TokenExpired = KJob::UserDefinedError + 1
41 };
42
43 explicit LoginJob(Session *session);
44 ~LoginJob() override;
45
46 void setUserName(const QString &userName);
47 void setPassword(const QString &password);
48
49 void setPreferedAuthMode(AuthMode mode);
50 [[nodiscard]] AuthMode usedAuthMode() const;
51
52protected:
53 void doStart() override;
54 void handleResponse(const ServerResponse &r) override;
55};
56}
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 Nov 29 2024 11:56:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.