KIMAP

deletejob.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;
16class DeleteJobPrivate;
17
18/**
19 * Delete a mailbox
20 *
21 * Note that some servers will refuse to delete a
22 * mailbox unless it is empty (ie: all mails have
23 * had their \Deleted flag set, and then the
24 * mailbox has been expunged).
25 *
26 * This job can only be run when the session is in the
27 * authenticated (or selected) state.
28 *
29 * If the server supports ACLs, you will need the
30 * Acl::DeleteMailbox right on the mailbox.
31 */
32class KIMAP_EXPORT DeleteJob : public Job
33{
34 Q_OBJECT
35 Q_DECLARE_PRIVATE(DeleteJob)
36
37 friend class SessionPrivate;
38
39public:
40 explicit DeleteJob(Session *session);
41 ~DeleteJob() override;
42
43 /**
44 * Set the mailbox to delete.
45 */
46 void setMailBox(const QString &mailBox);
47 /**
48 * The mailbox that will be deleted.
49 */
50 [[nodiscard]] QString mailBox() const;
51
52protected:
53 void doStart() override;
54 void handleResponse(const Response &response) override;
55};
56
57}
Delete a mailbox.
Definition deletejob.h:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:52:37 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.