KSMTP

loginjob.h
1 /*
2  SPDX-FileCopyrightText: 2010 BetterInbox <[email protected]>
3  SPDX-FileContributor: Christophe Laveault <[email protected]>
4  SPDX-FileContributor: Gregory Schlomoff <[email protected]>
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 
15 namespace KSmtp
16 {
17 class LoginJobPrivate;
18 /**
19  * @brief The LoginJob class
20  */
21 class KSMTP_EXPORT LoginJob : public Job
22 {
23  Q_OBJECT
24  Q_DECLARE_PRIVATE(LoginJob)
25 
26 public:
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 
40 protected:
41  void doStart() override;
42  void handleResponse(const ServerResponse &r) override;
43 };
44 }
The Session class.
Definition: session.h:23
The LoginJob class.
Definition: loginjob.h:21
The Job class.
Definition: job.h:24
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Dec 2 2023 04:08:13 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.