KIMAP

expungejob.h
1/*
2 SPDX-FileCopyrightText: 2009 Andras Mantia <amantia@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 ImapSet;
18class ExpungeJobPrivate;
19
20/**
21 * Expunges the deleted messages in the selected mailbox.
22 *
23 * This permanently removes any messages that have the
24 * \Deleted flag set in the selected mailbox.
25 *
26 * This job can only be run when the session is in the
27 * selected state.
28 *
29 * If the server supports ACLs, the user will need the
30 * Acl::Expunge right on the mailbox.
31 */
32class KIMAP_EXPORT ExpungeJob : public Job
33{
34 Q_OBJECT
35 Q_DECLARE_PRIVATE(ExpungeJob)
36
37 friend class SessionPrivate;
38
39public:
40 explicit ExpungeJob(Session *session);
41 ~ExpungeJob() override = default;
42
43 /**
44 * Returns UIDs of messages that have been expunged.
45 *
46 * This feature is only available when QRESYNC capability (RFC5162) is
47 * supported by the server and have been enabled on the current session.
48 *
49 * @see KIMAP::EnableJob
50 * @since 5.16
51 */
52 [[nodiscard]] KIMAP::ImapSet vanishedMessages() const;
53
54 /**
55 * Returns new highest modification sequence number.
56 *
57 * This feature is only available when QRESYNC capability (RFC5162) is
58 * supported by the server and have been enabled on the current session.
59 *
60 * @see KIMAP::EnableJob
61 * @since 5.16
62 */
63 [[nodiscard]] quint64 newHighestModSeq() const;
64
65protected:
66 void doStart() override;
67 void handleResponse(const Response &response) override;
68};
69
70}
Expunges the deleted messages in the selected mailbox.
Definition expungejob.h:33
Represents a set of natural numbers (1->∞) in a as compact as possible form.
Definition imapset.h:127
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.