KIMAP
9 #include <KLocalizedString>
12 #include "response_p.h"
14 #include "session_p.h"
18 class DeleteJobPrivate :
public JobPrivate
21 DeleteJobPrivate(Session *session,
const QString &name)
22 : JobPrivate(session,
name)
33 using namespace KIMAP;
35 DeleteJob::DeleteJob(Session *session)
36 : Job(*new DeleteJobPrivate(session,
i18n(
"Delete")))
40 DeleteJob::~DeleteJob()
44 void DeleteJob::doStart()
47 d->tags << d->sessionInternal()->sendCommand(
"DELETE",
'\"' + KIMAP::encodeImapFolderName(d->mailBox.toUtf8()) +
'\"');
50 void DeleteJob::handleResponse(
const Response &response)
54 if (!response.content.isEmpty() && d->tags.contains(response.content.first().toString())) {
55 if (response.content.size() >= 2 && response.content[1].toString() ==
"NO") {
56 for (
auto it = response.responseCode.cbegin(), end = response.responseCode.cend(); it != end; ++it) {
59 if (it->toString() ==
"NONEXISTENT") {
61 d->tags.removeAll(response.content.first().toString());
62 if (d->tags.isEmpty()) {
71 handleErrorReplies(response);
86 #include "moc_deletejob.cpp"
void setMailBox(const QString &mailBox)
Set the mailbox to delete.
QString i18n(const char *text, const TYPE &arg...)
const char * name(StandardAction id)
QString mailBox() const
The mailbox that will be deleted.
Provides handlers for various RFC/MIME encodings.
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.