KIMAP::CopyJob
#include <copyjob.h>
Public Member Functions | |
CopyJob (Session *session) | |
bool | isUidBased () const |
QString | mailBox () const |
ImapSet | resultingUids () const |
ImapSet | sequenceSet () const |
void | setMailBox (const QString &mailBox) |
void | setSequenceSet (const ImapSet &set) |
void | setUidBased (bool uidBased) |
Protected Member Functions | |
void | doStart () override |
void | handleResponse (const Response &response) override |
Detailed Description
Copies one or more messages to another mailbox.
This job can only be run when the session is in the selected state.
If the server supports ACLs, the user will need the Acl::Insert right on the target mailbox. In order to preserve message flags, the user may also need some combination of Acl::DeleteMessage, Acl::KeepSeen and Acl::Write on the target mailbox.
Constructor & Destructor Documentation
◆ CopyJob()
|
explicit |
Definition at line 40 of file copyjob.cpp.
◆ ~CopyJob()
|
override |
Definition at line 47 of file copyjob.cpp.
Member Function Documentation
◆ doStart()
|
overrideprotected |
Definition at line 93 of file copyjob.cpp.
◆ handleResponse()
|
overrideprotected |
Definition at line 109 of file copyjob.cpp.
◆ isUidBased()
|
nodiscard |
How to interpret the sequence set.
- Returns
- if
true
the result of sequenceSet() should be interpreted as UIDs, iffalse
it should be interpreted as sequence numbers
Definition at line 81 of file copyjob.cpp.
◆ mailBox()
|
nodiscard |
The destination mailbox.
Definition at line 57 of file copyjob.cpp.
◆ resultingUids()
|
nodiscard |
The UIDs of the new copies of the messages.
This will be an empty set if no messages have been copied yet or if the server does not support the UIDPLUS extension.
Definition at line 87 of file copyjob.cpp.
◆ sequenceSet()
|
nodiscard |
The messages that will be copied.
isUidBased() can be used to check whether the ImapSet contains sequence numbers or UIDs.
- Returns
- the sequence numbers or UIDs of the messages to be copied
Definition at line 69 of file copyjob.cpp.
◆ setMailBox()
void CopyJob::setMailBox | ( | const QString & | mailBox | ) |
Sets the destination mailbox.
If the mailbox does not exist, the server should not create it automatically and the job should fail. Note, however, that a conforming server may create the mailbox automatically.
- Parameters
-
mailBox the (unquoted) name of the mailbox where the messages should be copied to
Definition at line 51 of file copyjob.cpp.
◆ setSequenceSet()
void CopyJob::setSequenceSet | ( | const ImapSet & | set | ) |
Sets the messages to be copied.
If sequence numbers are given, isUidBased() should be false. If UIDs are given, isUidBased() should be true.
RFC 3501 is unclear as to what should happen if invalid sequence numbers are passed. If non-existent UIDs are passed, they will be ignored.
- Parameters
-
set the sequence numbers or UIDs of the messages to be copied
Definition at line 63 of file copyjob.cpp.
◆ setUidBased()
void CopyJob::setUidBased | ( | bool | uidBased | ) |
Set how the sequence set should be interpreted.
- Parameters
-
uidBased if true
the argument to setSequenceSet will be interpreted as UIDs, iffalse
it will be interpreted as sequence numbers
Definition at line 75 of file copyjob.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:51:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.