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 { SetFlags, AppendFlags, RemoveFlags };
31
32 explicit StoreJob(Session *session);
33 ~StoreJob() override;
34
35 void setSequenceSet(const ImapSet &set);
36 [[nodiscard]] ImapSet sequenceSet() const;
37
38 void setUidBased(bool uidBased);
39 [[nodiscard]] bool isUidBased() const;
40
41 void setFlags(const MessageFlags &flags);
42 [[nodiscard]] MessageFlags flags() const;
43
44 void setGMLabels(const MessageFlags &gmLabels);
45 [[nodiscard]] MessageFlags gmLabels() const;
46
47 void setMode(StoreMode mode);
48 [[nodiscard]] StoreMode mode() const;
49
50 [[nodiscard]] QMap<int, MessageFlags> resultingFlags() const;
51
52protected:
53 void doStart() override;
54 void handleResponse(const Response &response) override;
55};
56
57}
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 May 17 2024 11:52:37 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.