KIMAP::MoveJob

Search for usage in LXR

#include <movejob.h>

Public Member Functions

 MoveJob (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

Moves messages from current mailbox to another.

Note that move functionality is not specified in the base IMAP protocol and is defined as an extension in RFC6851. That means that the MoveJob can only be used when the server lists "MOVE" in response to CAPABILITY command.

Unlike the traditional emulation of moving messages, i.e. COPY + STORE + EXPUNGE, MOVE guarantees the transaction to be atomic on the server.

Since
5.4

Definition at line 31 of file movejob.h.

Constructor & Destructor Documentation

◆ MoveJob()

MoveJob::MoveJob ( Session * session)
explicit

Definition at line 41 of file movejob.cpp.

◆ ~MoveJob()

MoveJob::~MoveJob ( )
override

Definition at line 48 of file movejob.cpp.

Member Function Documentation

◆ doStart()

void MoveJob::doStart ( )
overrideprotected

Definition at line 94 of file movejob.cpp.

◆ handleResponse()

void MoveJob::handleResponse ( const Response & response)
overrideprotected

Definition at line 110 of file movejob.cpp.

◆ isUidBased()

bool MoveJob::isUidBased ( ) const
nodiscard

How to interpret the sequence set.

Returns
if true the result of sequenceSet() should be interpreted as UIDs, if false it should be interpreted as sequence numbers

Definition at line 82 of file movejob.cpp.

◆ mailBox()

QString MoveJob::mailBox ( ) const
nodiscard

The destination mailbox.

Definition at line 58 of file movejob.cpp.

◆ resultingUids()

ImapSet MoveJob::resultingUids ( ) const
nodiscard

The UIDs of the moved messages in the destination mailbox.

This will be an empty set if no messages have been moved yet or if the server does not support the UIDPLUS extension.

Definition at line 88 of file movejob.cpp.

◆ sequenceSet()

ImapSet MoveJob::sequenceSet ( ) const
nodiscard

The messages that will be moved.

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 moved

Definition at line 70 of file movejob.cpp.

◆ setMailBox()

void MoveJob::setMailBox ( const QString & mailbox)

Set 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
mailBoxthe (unquoted) name of the mailbox where the messages should be moved to

Definition at line 52 of file movejob.cpp.

◆ setSequenceSet()

void MoveJob::setSequenceSet ( const ImapSet & set)

Sets the messages to be moved,.

If sequence numbers are given, isUidBased() should be false. If UIDs are given, isUidBased() should be true.

Parameters
setthe sequence numbers or UIDs of the messages to be moved

Definition at line 64 of file movejob.cpp.

◆ setUidBased()

void MoveJob::setUidBased ( bool uidBased)

Set how the sequence set should be interpreted.

Parameters
uidBasedif true the argument to setSequenceSet will be interpreted as UIDs, if false it will be interpreted as sequence numbers

Definition at line 76 of file movejob.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:13:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.