KIMAP2

selectjob.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_SELECTJOB_H
21#define KIMAP2_SELECTJOB_H
22
23#include "kimap2_export.h"
24
25#include "job.h"
26
27namespace KIMAP2
28{
29
30class Session;
31struct Message;
32class SelectJobPrivate;
33
34class KIMAP2_EXPORT SelectJob : public Job
35{
36 Q_OBJECT
37 Q_DECLARE_PRIVATE(SelectJob)
38
39 friend class SessionPrivate;
40
41public:
42 explicit SelectJob(Session *session);
43 virtual ~SelectJob();
44
45 void setMailBox(const QString &mailBox);
46 QString mailBox() const;
47
48 void setOpenReadOnly(bool readOnly);
49 bool isOpenReadOnly() const;
50
51 QList<QByteArray> flags() const;
52 QList<QByteArray> permanentFlags() const;
53
54 int messageCount() const;
55 int recentCount() const;
56 int firstUnseenIndex() const;
57
58 qint64 uidValidity() const;
59 qint64 nextUid() const;
60
61 /**
62 * @return Highest mod-sequence value of all messages in the mailbox or 0
63 * if the server does not have CONDSTORE capability (RFC4551) or does not
64 * support persistent storage of mod-sequences.
65 *
66 * @since 4.12
67 */
68 quint64 highestModSequence() const;
69
70 /**
71 * Whether to append CONDSTORE parameter to the SELECT command.
72 *
73 * This option is false by default and can be enabled only when server
74 * has CONDSTORE capability (RFC4551), otherwise the SELECT command will
75 * fail.
76 *
77 * @since 4.12
78 */
79 void setCondstoreEnabled(bool enable);
80
81 /**
82 * Returns whether the CONDSTORE parameter will be appended to SELECT command
83 *
84 * @since 4.12
85 */
86 bool condstoreEnabled() const;
87
88protected:
89 void doStart() Q_DECL_OVERRIDE;
90 void handleResponse(const Message &response) Q_DECL_OVERRIDE;
91};
92
93}
94
95#endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:09:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.