KMime::ContentIndex Class

class KMime::ContentIndex

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

Header: #include <KMime/ContentIndex>
CMake: find_package(KPim6 REQUIRED COMPONENTS Mime)
target_link_libraries(mytarget PRIVATE KPim6::Mime)

Public Functions

ContentIndex()
ContentIndex(QStringView index)
bool isValid() const
unsigned int pop()
void push(unsigned int index)
QString toString() const
unsigned int up()
bool operator==(const KMime::ContentIndex &index) const

Detailed Description

This class is implicitly shared.

Based on RFC3501 section 6.4.5 and thus compatible with IMAP.

Member Function Documentation

ContentIndex::ContentIndex()

Creates an empty content index.

[explicit] ContentIndex::ContentIndex(QStringView index)

Creates a content index based on the specified string representation.

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

bool ContentIndex::isValid() const

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

unsigned int ContentIndex::pop()

Removes and returns the top-most index. Used to recursively descend into the message part hierarchy.

See also push() and up().

void ContentIndex::push(unsigned int index)

Adds index to the content index. Used when ascending the message part hierarchy.

index is the top-most content index part.

See also pop() and up().

QString ContentIndex::toString() const

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

unsigned int ContentIndex::up()

Removes and returns the bottom-most index.

Used to navigate to the parent part.

See also push() and pop().

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

Compares this with index for equality.

index is the content index to compare.