KSMTP

job.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 <KJob>
14
15namespace KSmtp
16{
17class Session;
18class SessionPrivate;
19class JobPrivate;
20class ServerResponse;
21/**
22 * @brief The Job class
23 */
24class KSMTP_EXPORT Job : public KJob
25{
26 Q_OBJECT
27 Q_DECLARE_PRIVATE(Job)
28
29 friend class SessionPrivate;
30
31public:
32 ~Job() override;
33
34 [[nodiscard]] Session *session() const;
35 void start() override;
36
37protected:
38 void sendCommand(const QByteArray &cmd);
39 virtual void doStart() = 0;
40 virtual void handleResponse(const ServerResponse &response) = 0;
41 void handleErrors(const ServerResponse &response);
42 void connectionLost();
43
44 explicit Job(Session *session);
45 explicit Job(JobPrivate &dd);
46
47 std::unique_ptr<JobPrivate> const d_ptr;
48};
49}
The Job class.
Definition job.h:25
The Session class.
Definition session.h:24
Q_SCRIPTABLE Q_NOREPLY void start()
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.