KIMAP

enablejob.h
1/*
2 SPDX-FileCopyrightText: 2020 Daniel Vrátil <dvratil@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
13#include <QStringList>
14
15namespace KIMAP
16{
17class Session;
18struct Response;
19class EnableJobPrivate;
20
21/**
22 * Job to enable additional IMAP capabilities.
23 *
24 * Requires server to implement the IMAP ENABLE Extension (RFC5161). The
25 * new capabilities to enable will be specified by the user. The user is
26 * responsible for making sure the capabilities are supported by the server.
27 *
28 * The example usecase for this job is to enable support for the QRESYNC
29 * extension (RFC5162) on the server.
30 *
31 * @since 5.16
32 */
33class KIMAP_EXPORT EnableJob : public Job
34{
35 Q_OBJECT
36 Q_DECLARE_PRIVATE(EnableJob)
37
38 friend class SessionPrivate;
39
40public:
41 explicit EnableJob(Session *session);
42 ~EnableJob() override;
43
44 /**
45 * List of server capabilities to enable.
46 */
47 void setCapabilities(const QStringList &capabilities);
48
49 /**
50 * List of capabilities that were successfully enabled on the server.
51 */
52 [[nodiscard]] QStringList enabledCapabilities() const;
53
54protected:
55 void doStart() override;
56 void handleResponse(const Response &response) override;
57};
58
59}
Job to enable additional IMAP capabilities.
Definition enablejob.h:34
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:02:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.