KIMAP

job.h
1/*
2 SPDX-FileCopyrightText: 2009 Kevin Ottens <ervin@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "kimap_export.h"
10
11#include <KJob>
12
13namespace KIMAP
14{
15class Session;
16class SessionPrivate;
17class JobPrivate;
18struct Response;
19
20class KIMAP_EXPORT Job : public KJob
21{
22 Q_OBJECT
23 Q_DECLARE_PRIVATE(Job)
24
25 friend class SessionPrivate;
26
27public:
28 ~Job() override;
29
30 Session *session() const;
31
32 void start() override;
33
34private:
35 virtual void doStart() = 0;
36 virtual void handleResponse(const Response &response);
37 virtual void connectionLost();
38
39protected:
40 enum HandlerResponse {
41 Handled = 0,
42 NotHandled
43 };
44
45 HandlerResponse handleErrorReplies(const Response &response);
46
47 explicit Job(Session *session);
48 explicit Job(JobPrivate &dd);
49
50 JobPrivate *const d_ptr;
51};
52
53}
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.