KIMAP2

storejob.h
1/*
2 Copyright (c) 2009 Kevin Ottens <ervin@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef KIMAP2_STOREJOB_H
21#define KIMAP2_STOREJOB_H
22
23#include "kimap2_export.h"
24
25#include "job.h"
26#include "imapset.h"
27
28namespace KIMAP2
29{
30
31class Session;
32struct Message;
33class StoreJobPrivate;
34
35typedef QList<QByteArray> MessageFlags;
36
37class KIMAP2_EXPORT StoreJob : public Job
38{
39 Q_OBJECT
40 Q_DECLARE_PRIVATE(StoreJob)
41
42 friend class SessionPrivate;
43
44public:
45 enum StoreMode {
46 SetFlags,
47 AppendFlags,
48 RemoveFlags
49 };
50
51 explicit StoreJob(Session *session);
52 virtual ~StoreJob();
53
54 void setSequenceSet(const ImapSet &set);
55 ImapSet sequenceSet() const;
56
57 void setUidBased(bool uidBased);
58 bool isUidBased() const;
59
60 void setFlags(const MessageFlags &flags);
61 MessageFlags flags() const;
62
63 void setGMLabels(const MessageFlags &gmLabels);
64 MessageFlags gmLabels() const;
65
66 void setMode(StoreMode mode);
67 StoreMode mode() const;
68
69 QMap<int, MessageFlags> resultingFlags() const;
70
71protected:
72 void doStart() Q_DECL_OVERRIDE;
73 void handleResponse(const Message &response) Q_DECL_OVERRIDE;
74};
75
76}
77
78#endif
KCRASH_EXPORT void setFlags(KCrash::CrashFlags flags)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.