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 { Handled = 0, NotHandled };
41
42 HandlerResponse handleErrorReplies(const Response &response);
43
44 explicit Job(Session *session);
45 explicit Job(JobPrivate &dd);
46
47 JobPrivate *const d_ptr;
48};
49
50}
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:37 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.