KIMAP2

closejob.h
1/*
2 Copyright (c) 2009 Andras Mantia <amantia@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_CLOSEJOB_H
21#define KIMAP2_CLOSEJOB_H
22
23#include "kimap2_export.h"
24
25#include "job.h"
26
27namespace KIMAP2
28{
29
30class Session;
31struct Message;
32class CloseJobPrivate;
33
34/**
35 * Closes the current mailbox.
36 *
37 * This job can only be run when the session is in the selected state.
38 *
39 * Permanently removes all messages that have the \\Deleted
40 * flag set from the currently selected mailbox, and returns
41 * to the authenticated state from the selected state.
42 *
43 * The server will not provide any notifications of which
44 * messages were expunged, so this is quicker than doing
45 * an expunge and then implicitly closing the mailbox
46 * (by selecting or examining another mailbox or logging
47 * out).
48 *
49 * No messages are removed if the mailbox is open in a read-only
50 * state, or if the server supports ACLs and the user does not
51 * have the Acl::Expunge right on the mailbox.
52 */
53class KIMAP2_EXPORT CloseJob : public Job
54{
55 Q_OBJECT
56 Q_DECLARE_PRIVATE(CloseJob)
57
58 friend class SessionPrivate;
59
60public:
61 explicit CloseJob(Session *session);
62 virtual ~CloseJob();
63
64protected:
65 void doStart() Q_DECL_OVERRIDE;
66};
67
68}
69
70#endif
Closes the current mailbox.
Definition closejob.h:54
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:21:18 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.