KIMAP

createjob.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 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 */
33class KIMAP_EXPORT CreateJob : public Job
34{
35 Q_OBJECT
36 Q_DECLARE_PRIVATE(CreateJob)
37
38 friend class SessionPrivate;
39
40public:
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
56protected:
57 void doStart() override;
58 void handleResponse(const Response &response) override;
59};
60
61}
Creates a new mailbox.
Definition createjob.h:34
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.