KIMAP::CloseJob Class
Closes the current mailbox. More...
| Header: | #include <KIMAP/CloseJob> |
| CMake: | find_package(KPim6IMAP REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::IMAP) |
| Inherits: | KIMAP::Job |
Public Functions
| CloseJob(KIMAP::Session *session) | |
| virtual | ~CloseJob() override |
| quint64 | newHighestModSeq() const |
Reimplemented Protected Functions
| virtual void | doStart() override |
| virtual void | handleResponse(const KIMAP::Response &response) override |
Detailed Description
This job can only be run when the session is in the selected state.
Permanently removes all messages that have the Deleted flag set from the currently selected mailbox, and returns to the authenticated state from the selected state.
The server will not provide any notifications of which messages were expunged, so this is quicker than doing an expunge and then implicitly closing the mailbox (by selecting or examining another mailbox or logging out). If the QRESYNC extension (RFC5162) is available on the server and has been enabled, the job will provide a new modification sequence after expunging the deleted messages.
No messages are removed if the mailbox is open in a read-only state, or if the server supports ACLs and the user does not have the Acl::Expunge right on the mailbox.
Member Function Documentation
[explicit] CloseJob::CloseJob(KIMAP::Session *session)
[override virtual noexcept] CloseJob::~CloseJob()
[override virtual protected] void CloseJob::doStart()
[override virtual protected] void CloseJob::handleResponse(const KIMAP::Response &response)
quint64 CloseJob::newHighestModSeq() const
Returns new modification sequence number after expunging messages.
This value is only valid when server supports the QRESYNC extension (RFC5162) and it has been explicitly enabled on this session.
See also KIMAP::EnableJob.