MailCommon::ItemContext

Search for usage in LXR

MailCommon::ItemContext Class Reference

#include <itemcontext.h>

Public Member Functions

 ItemContext (const Akonadi::Item &item, bool needsFullPayload)
 
bool deleteItem () const
 
Akonadi::Itemitem ()
 
Akonadi::Collection moveTargetCollection () const
 
bool needsFlagStore () const
 
bool needsFullPayload () const
 
bool needsPayloadStore () const
 
void setDeleteItem ()
 
void setMoveTargetCollection (const Akonadi::Collection &collection)
 
void setNeedsFlagStore ()
 
void setNeedsPayloadStore ()
 

Detailed Description

A helper class for the filtering process.

The item context is used to pass the item together with meta data through the filter chain. This allows to 'record' all actions that shall be taken and execute them at the end of the filter chain.

Definition at line 26 of file itemcontext.h.

Constructor & Destructor Documentation

◆ ItemContext()

ItemContext::ItemContext ( const Akonadi::Item & item,
bool needsFullPayload )

Creates an item context for the given item.

requestedPart the part requested for the item (Envelope, Header or CompleteMessage)

Definition at line 12 of file itemcontext.cpp.

Member Function Documentation

◆ deleteItem()

bool ItemContext::deleteItem ( ) const
nodiscard

Definition at line 58 of file itemcontext.cpp.

◆ item()

Akonadi::Item & ItemContext::item ( )

Returns the item of the context.

Definition at line 18 of file itemcontext.cpp.

◆ moveTargetCollection()

Akonadi::Collection ItemContext::moveTargetCollection ( ) const
nodiscard

Returns the target collection the item should be moved to, or an invalid collection if the item should not be moved at all.

Definition at line 28 of file itemcontext.cpp.

◆ needsFlagStore()

bool ItemContext::needsFlagStore ( ) const
nodiscard

Returns whether the item's flags needs to be written back.

Definition at line 48 of file itemcontext.cpp.

◆ needsFullPayload()

bool ItemContext::needsFullPayload ( ) const
nodiscard

Returns true if the full payload was requested for the item or not.

Full payload is needed to change the headers or the body

Definition at line 63 of file itemcontext.cpp.

◆ needsPayloadStore()

bool ItemContext::needsPayloadStore ( ) const
nodiscard

Returns whether the item's payload needs to be written back.

Definition at line 38 of file itemcontext.cpp.

◆ setDeleteItem()

void ItemContext::setDeleteItem ( )

Definition at line 53 of file itemcontext.cpp.

◆ setMoveTargetCollection()

void ItemContext::setMoveTargetCollection ( const Akonadi::Collection & collection)

Sets the target collection the item should be moved to.

Definition at line 23 of file itemcontext.cpp.

◆ setNeedsFlagStore()

void ItemContext::setNeedsFlagStore ( )

Marks that the item's flags has been changed and needs to be written back.

Definition at line 43 of file itemcontext.cpp.

◆ setNeedsPayloadStore()

void ItemContext::setNeedsPayloadStore ( )

Marks that the item's payload has been changed and needs to be written back.

Definition at line 33 of file itemcontext.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 Nov 8 2024 12:07:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.