KIMAP

capabilitiesjob.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 "job.h"
12 
13 namespace KIMAP
14 {
15 class Session;
16 struct Response;
17 class CapabilitiesJobPrivate;
18 
19 /**
20  * Checks server capabilities.
21  *
22  * This job can be run in any open session.
23  *
24  * This simply asks the server what capabilities it supports
25  * (using the CAPABILITY command) and returns the list
26  * provided by the server. The list may, therefore, be
27  * inaccurate: the server may claim to support something
28  * it does not implement properly, or it may omit a feature
29  * that it does, in reality, support.
30  */
31 class KIMAP_EXPORT CapabilitiesJob : public Job
32 {
33  Q_OBJECT
34  Q_DECLARE_PRIVATE(CapabilitiesJob)
35 
36  friend class SessionPrivate;
37 
38 public:
39  CapabilitiesJob(Session *session);
40  ~CapabilitiesJob() override;
41 
42  /**
43  * The capabilities the server claims to support.
44  *
45  * This will return an empty list until the job has completed.
46  */
47  [[nodiscard]] QStringList capabilities() const;
48 
49 Q_SIGNALS:
50  /**
51  * Notifies listeners that the capabilities have been fetched.
52  *
53  * @param capabilities The capabilities the server claims to support.
54  */
55  void capabilitiesReceived(const QStringList &capabilities);
56 
57 protected:
58  void doStart() override;
59  void handleResponse(const Response &response) override;
60 };
61 
62 }
Checks server capabilities.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 10 2023 03:48:59 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.