KIMAP

job.h
1 /*
2  SPDX-FileCopyrightText: 2009 Kevin Ottens <[email protected]>
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 
13 namespace KIMAP
14 {
15 class Session;
16 class SessionPrivate;
17 class JobPrivate;
18 struct Response;
19 
20 class KIMAP_EXPORT Job : public KJob
21 {
22  Q_OBJECT
23  Q_DECLARE_PRIVATE(Job)
24 
25  friend class SessionPrivate;
26 
27 public:
28  ~Job() override;
29 
30  Session *session() const;
31 
32  void start() override;
33 
34 private:
35  virtual void doStart() = 0;
36  virtual void handleResponse(const Response &response);
37  virtual void connectionLost();
38 
39 protected:
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-2023 The KDE developers.
Generated on Sun Dec 3 2023 03:51:44 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.