KIMAP

createjob.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 struct Response;
17 class CreateJobPrivate;
18 
19 /**
20  * Creates a new mailbox
21  *
22  * This job can only be run when the session is in the
23  * authenticated (or selected) state.
24  *
25  * This job will fail if the mailbox already exists.
26  *
27  * If the server supports ACLs, the user must have the
28  * Acl::CreateMailbox permission on the parent
29  * mailbox. Note that what is meant by "parent mailbox"
30  * depends on the server: . and / are typical hierarchy
31  * delimiters.
32  */
33 class KIMAP_EXPORT CreateJob : public Job
34 {
35  Q_OBJECT
36  Q_DECLARE_PRIVATE(CreateJob)
37 
38  friend class SessionPrivate;
39 
40 public:
41  explicit CreateJob(Session *session);
42  ~CreateJob() override;
43 
44  /**
45  * Set the name of the new mailbox
46  *
47  * @param mailBox an (unquoted) identifier that does not correspond
48  * to an existing mailbox name
49  */
50  void setMailBox(const QString &mailBox);
51  /**
52  * The name of the mailbox that will be created
53  */
54  [[nodiscard]] QString mailBox() const;
55 
56 protected:
57  void doStart() override;
58  void handleResponse(const Response &response) override;
59 };
60 
61 }
Creates a new mailbox.
Definition: createjob.h:33
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.