KIMAP

storejob.h
1/*
2 SPDX-FileCopyrightText: 2009 Kevin Ottens <ervin@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 "imapset.h"
12#include "job.h"
13
14namespace KIMAP
15{
16class Session;
17struct Response;
18class StoreJobPrivate;
19
20using MessageFlags = QList<QByteArray>;
21
22class KIMAP_EXPORT StoreJob : public Job
23{
24 Q_OBJECT
25 Q_DECLARE_PRIVATE(StoreJob)
26
27 friend class SessionPrivate;
28
29public:
30 enum StoreMode {
31 SetFlags,
32 AppendFlags,
33 RemoveFlags
34 };
35
36 explicit StoreJob(Session *session);
37 ~StoreJob() override;
38
39 void setSequenceSet(const ImapSet &set);
40 [[nodiscard]] ImapSet sequenceSet() const;
41
42 void setUidBased(bool uidBased);
43 [[nodiscard]] bool isUidBased() const;
44
45 void setFlags(const MessageFlags &flags);
46 [[nodiscard]] MessageFlags flags() const;
47
48 void setGMLabels(const MessageFlags &gmLabels);
49 [[nodiscard]] MessageFlags gmLabels() const;
50
51 void setMode(StoreMode mode);
52 [[nodiscard]] StoreMode mode() const;
53
54 [[nodiscard]] QMap<int, MessageFlags> resultingFlags() const;
55
56protected:
57 void doStart() override;
58 void handleResponse(const Response &response) override;
59};
60
61}
KCRASH_EXPORT void setFlags(KCrash::CrashFlags flags)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:51:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.