KMime::ContentIndex

Search for usage in LXR

KMime::ContentIndex Class Reference

#include <kmime_contentindex.h>

Public Member Functions

 ContentIndex ()
 
 ContentIndex (const ContentIndex &other)
 
 ContentIndex (ContentIndex &&) noexcept
 
 ContentIndex (QStringView index)
 
 ~ContentIndex ()
 
bool isValid () const
 
bool operator!= (const ContentIndex &index) const
 
ContentIndexoperator= (const ContentIndex &other)
 
ContentIndexoperator= (ContentIndex &&) noexcept
 
bool operator== (const ContentIndex &index) const
 
unsigned int pop ()
 
void push (unsigned int index)
 
QString toString () const
 
unsigned int up ()
 

Detailed Description

A class to uniquely identify message parts (Content) in a hierarchy.

This class is implicitly shared.

Based on RFC3501 section 6.4.5 and thus compatible with IMAP.

Definition at line 40 of file kmime_contentindex.h.

Constructor & Destructor Documentation

◆ ContentIndex() [1/3]

KMime::ContentIndex::ContentIndex ( )

Creates an empty content index.

Definition at line 36 of file kmime_contentindex.cpp.

◆ ContentIndex() [2/3]

KMime::ContentIndex::ContentIndex ( QStringView index)
explicit

Creates a content index based on the specified string representation.

Parameters
indexis a string representation of a message part index according to RFC3501 section 6.4.5.

Definition at line 40 of file kmime_contentindex.cpp.

◆ ContentIndex() [3/3]

ContentIndex::ContentIndex ( const ContentIndex & other)
default

Copy constructor.

◆ ~ContentIndex()

ContentIndex::~ContentIndex ( )
default

Destructor.

Member Function Documentation

◆ isValid()

bool KMime::ContentIndex::isValid ( ) const

Returns true if this index is non-empty (valid).

Definition at line 58 of file kmime_contentindex.cpp.

◆ operator!=()

bool KMime::ContentIndex::operator!= ( const ContentIndex & index) const

Compares this with index for inequality.

Parameters
indexis the content index to compare.

Definition at line 93 of file kmime_contentindex.cpp.

◆ operator=()

ContentIndex & ContentIndex::operator= ( const ContentIndex & other)
default

Assignment operator.

◆ operator==()

bool KMime::ContentIndex::operator== ( const ContentIndex & index) const

Compares this with index for equality.

Parameters
indexis the content index to compare.

Definition at line 88 of file kmime_contentindex.cpp.

◆ pop()

unsigned int KMime::ContentIndex::pop ( )

Removes and returns the top-most index.

Used to recursively descend into the message part hierarchy.

See also
push(), up().

Definition at line 63 of file kmime_contentindex.cpp.

◆ push()

void KMime::ContentIndex::push ( unsigned int index)

Adds index to the content index.

Used when ascending the message part hierarchy.

Parameters
indexis the top-most content index part.
See also
pop(), up().

Definition at line 68 of file kmime_contentindex.cpp.

◆ toString()

QString KMime::ContentIndex::toString ( ) const

Returns a string representation of this content index according to RFC3501 section 6.4.5.

Definition at line 78 of file kmime_contentindex.cpp.

◆ up()

unsigned int ContentIndex::up ( )

Removes and returns the bottom-most index.

Used to navigate to the parent part.

See also
push(), pop().

Definition at line 73 of file kmime_contentindex.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 Tue Mar 26 2024 11:20:12 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.