KIMAP

deletejob.h
1 /*
2  SPDX-FileCopyrightText: 2009 Andras Mantia <[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 class 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  */
32 class KIMAP_EXPORT DeleteJob : public Job
33 {
34  Q_OBJECT
35  Q_DECLARE_PRIVATE(DeleteJob)
36 
37  friend class SessionPrivate;
38 
39 public:
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 
52 protected:
53  void doStart() override;
54  void handleResponse(const Response &response) override;
55 };
56 
57 }
Delete a mailbox.
Definition: deletejob.h:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 3 2023 03:51:44 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.