KIMAP

subscribejob.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 "subscribejob.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 SubscribeJobPrivate : public JobPrivate
19{
20public:
21 SubscribeJobPrivate(Session *session, const QString &name)
22 : JobPrivate(session, name)
23 {
24 }
25 ~SubscribeJobPrivate()
26 {
27 }
28
29 QString mailBox;
30};
31}
32
33using namespace KIMAP;
34
35SubscribeJob::SubscribeJob(Session *session)
36 : Job(*new SubscribeJobPrivate(session, i18n("Subscribe")))
37{
38}
39
40SubscribeJob::~SubscribeJob()
41{
42}
43
44void SubscribeJob::doStart()
45{
46 Q_D(SubscribeJob);
47 d->tags << d->sessionInternal()->sendCommand("SUBSCRIBE", '\"' + KIMAP::encodeImapFolderName(d->mailBox.toUtf8()) + '\"');
48}
49
50void SubscribeJob::setMailBox(const QString &mailBox)
51{
52 Q_D(SubscribeJob);
53 d->mailBox = mailBox;
54}
55
56QString SubscribeJob::mailBox() const
57{
58 Q_D(const SubscribeJob);
59 return d->mailBox;
60}
61
62#include "moc_subscribejob.cpp"
QString i18n(const char *text, const TYPE &arg...)
QString name(GameStandardAction 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 Fri Nov 22 2024 12:12:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.