KIMAP

capabilitiesjob.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 "job.h"
12
13namespace KIMAP
14{
15class Session;
16struct Response;
17class 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 */
31class KIMAP_EXPORT CapabilitiesJob : public Job
32{
33 Q_OBJECT
34 Q_DECLARE_PRIVATE(CapabilitiesJob)
35
36 friend class SessionPrivate;
37
38public:
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
49Q_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
57protected:
58 void doStart() override;
59 void handleResponse(const Response &response) override;
60};
61
62}
Checks server capabilities.
void capabilitiesReceived(const QStringList &capabilities)
Notifies listeners that the capabilities have been fetched.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:06:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.