KIMAP

renamejob.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 "renamejob.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 RenameJobPrivate : public JobPrivate
19{
20public:
21 RenameJobPrivate(Session *session, const QString &name)
22 : JobPrivate(session, name)
23 {
24 }
25 ~RenameJobPrivate()
26 {
27 }
28
29 QString sourceMailBox;
30 QString destinationMailBox;
31};
32}
33
34using namespace KIMAP;
35
36RenameJob::RenameJob(Session *session)
37 : Job(*new RenameJobPrivate(session, i18n("Rename")))
38{
39}
40
41RenameJob::~RenameJob()
42{
43}
44
45void RenameJob::doStart()
46{
47 Q_D(RenameJob);
48 d->tags << d->sessionInternal()->sendCommand("RENAME",
49 '\"' + KIMAP::encodeImapFolderName(d->sourceMailBox.toUtf8()) + "\" \""
50 + KIMAP::encodeImapFolderName(d->destinationMailBox.toUtf8()) + '\"');
51}
52
53void RenameJob::setSourceMailBox(const QString &mailBox)
54{
55 Q_D(RenameJob);
56 d->sourceMailBox = mailBox;
57}
58
59QString RenameJob::sourceMailBox() const
60{
61 Q_D(const RenameJob);
62 return d->sourceMailBox;
63}
64
65void RenameJob::setDestinationMailBox(const QString &mailBox)
66{
67 Q_D(RenameJob);
68 d->destinationMailBox = mailBox;
69}
70
71QString RenameJob::destinationMailBox() const
72{
73 Q_D(const RenameJob);
74 return d->destinationMailBox;
75}
76
77#include "moc_renamejob.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 8 2024 12:06:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.