KIMAP

unsubscribejob.cpp
1/*
2 SPDX-FileCopyrightText: 2009 Andras Mantia <amantia@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "unsubscribejob.h"
8
9#include <KLocalizedString>
10
11#include "job_p.h"
12#include "response_p.h"
13#include "rfccodecs.h"
14#include "session_p.h"
15
16namespace KIMAP
17{
18class UnsubscribeJobPrivate : public JobPrivate
19{
20public:
21 UnsubscribeJobPrivate(Session *session, const QString &name)
22 : JobPrivate(session, name)
23 {
24 }
25 ~UnsubscribeJobPrivate()
26 {
27 }
28
29 QString mailBox;
30};
31}
32
33using namespace KIMAP;
34
35UnsubscribeJob::UnsubscribeJob(Session *session)
36 : Job(*new UnsubscribeJobPrivate(session, i18n("Unsubscribe")))
37{
38}
39
40UnsubscribeJob::~UnsubscribeJob()
41{
42}
43
44void UnsubscribeJob::doStart()
45{
46 Q_D(UnsubscribeJob);
47 d->tags << d->sessionInternal()->sendCommand("UNSUBSCRIBE", '\"' + KIMAP::encodeImapFolderName(d->mailBox.toUtf8()) + '\"');
48}
49
50void UnsubscribeJob::setMailBox(const QString &mailBox)
51{
52 Q_D(UnsubscribeJob);
53 d->mailBox = mailBox;
54}
55
56QString UnsubscribeJob::mailBox() const
57{
58 Q_D(const UnsubscribeJob);
59 return d->mailBox;
60}
61
62#include "moc_unsubscribejob.cpp"
QString i18n(const char *text, const TYPE &arg...)
QString name(StandardAction id)
This file is part of the IMAP support library and defines the RfcCodecs class.
Q_D(Todo)
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.